Skip to content

UBSAN error: call to function THDRequest_free through pointer to incorrect function type 'void (*)(void *)' #9054

@yf225

Description

@yf225

Both test_irecv and test_isend in TestDistBackend throws error with UBSAN (error line: https://github.com/pytorch/pytorch/blob/master/torch/csrc/PtrWrapper.cpp#L49):

test_irecv (__main__.TestDistBackend) ... torch/csrc/PtrWrapper.cpp:50:3: runtime error: call to function THDRequest_free through pointer to incorrect function type 'void (*)(void *)'
/var/lib/jenkins/pytorch/torch/lib/THD/base/DataChannelRequest.cpp:4: note: THDRequest_free defined here
    #0 0x7fef1eacff05 in THPWrapper_dealloc(THPWrapper*) /var/lib/jenkins/pytorch/torch/csrc/PtrWrapper.cpp:50:3
    #1 0x5623c8179e96 in dict_dealloc (/opt/conda/bin/python3.6+0xeee96)
    #2 0x5623c822a60d in subtype_dealloc (/opt/conda/bin/python3.6+0x19f60d)
    #3 0x5623c8179b1e in list_dealloc (/opt/conda/bin/python3.6+0xeeb1e)
    #4 0x5623c8179916 in frame_dealloc (/opt/conda/bin/python3.6+0xee916)
    #5 0x5623c8222dcf in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197dcf)
    #6 0x5623c8223940 in fast_function (/opt/conda/bin/python3.6+0x198940)
    #7 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #8 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #9 0x5623c8222c25 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197c25)
    #10 0x5623c8223940 in fast_function (/opt/conda/bin/python3.6+0x198940)
    #11 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #12 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #13 0x5623c8223d7a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198d7a)
    #14 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #15 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #16 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #17 0x5623c824d46f in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c246f)
    #18 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #19 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #20 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #21 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #22 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #23 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #24 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #25 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #26 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #27 0x5623c8223d7a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198d7a)
    #28 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #29 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #30 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #31 0x5623c81f602a in slot_tp_init (/opt/conda/bin/python3.6+0x16b02a)
    #32 0x5623c82299b6 in type_call (/opt/conda/bin/python3.6+0x19e9b6)
    #33 0x5623c8199d7a in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ed7a)
    #34 0x5623c82297cd in call_function (/opt/conda/bin/python3.6+0x19e7cd)
    #35 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #36 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #37 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #38 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #39 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #40 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #41 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #42 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #43 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #44 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #45 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #46 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #47 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #48 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #49 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #50 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #51 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #52 0x5623c822403a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x19903a)
    #53 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #54 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #55 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #56 0x5623c824d46f in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c246f)
    #57 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #58 0x5623c8223e1a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198e1a)
    #59 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #60 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #61 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #62 0x5623c81f69b6 in slot_tp_call (/opt/conda/bin/python3.6+0x16b9b6)
    #63 0x5623c8199d7a in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ed7a)
    #64 0x5623c82297cd in call_function (/opt/conda/bin/python3.6+0x19e7cd)
    #65 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #66 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #67 0x5623c822403a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x19903a)
    #68 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #69 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #70 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #71 0x5623c824d46f in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c246f)
    #72 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #73 0x5623c8223e1a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198e1a)
    #74 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #75 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #76 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #77 0x5623c81f69b6 in slot_tp_call (/opt/conda/bin/python3.6+0x16b9b6)
    #78 0x5623c8199d7a in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ed7a)
    #79 0x5623c82297cd in call_function (/opt/conda/bin/python3.6+0x19e7cd)
    #80 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #81 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #82 0x5623c822403a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x19903a)
    #83 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #84 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #85 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #86 0x5623c824d46f in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c246f)
    #87 0x5623c8222a93 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197a93)
    #88 0x5623c8223e1a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198e1a)
    #89 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #90 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #91 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #92 0x5623c81f69b6 in slot_tp_call (/opt/conda/bin/python3.6+0x16b9b6)
    #93 0x5623c8199d7a in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ed7a)
    #94 0x5623c82297cd in call_function (/opt/conda/bin/python3.6+0x19e7cd)
    #95 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #96 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #97 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #98 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #99 0x5623c822370a in fast_function (/opt/conda/bin/python3.6+0x19870a)
    #100 0x5623c8229754 in call_function (/opt/conda/bin/python3.6+0x19e754)
    #101 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #102 0x5623c8222f20 in _PyEval_EvalCodeWithName (/opt/conda/bin/python3.6+0x197f20)
    #103 0x5623c8223e1a in _PyFunction_FastCallDict (/opt/conda/bin/python3.6+0x198e1a)
    #104 0x5623c8199f5e in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ef5e)
    #105 0x5623c819ea02 in _PyObject_Call_Prepend (/opt/conda/bin/python3.6+0x113a02)
    #106 0x5623c819999d in PyObject_Call (/opt/conda/bin/python3.6+0x10e99d)
    #107 0x5623c81f602a in slot_tp_init (/opt/conda/bin/python3.6+0x16b02a)
    #108 0x5623c82299b6 in type_call (/opt/conda/bin/python3.6+0x19e9b6)
    #109 0x5623c8199d7a in _PyObject_FastCallDict (/opt/conda/bin/python3.6+0x10ed7a)
    #110 0x5623c82297cd in call_function (/opt/conda/bin/python3.6+0x19e7cd)
    #111 0x5623c824bcb9 in _PyEval_EvalFrameDefault (/opt/conda/bin/python3.6+0x1c0cb9)
    #112 0x5623c8224458 in PyEval_EvalCodeEx (/opt/conda/bin/python3.6+0x199458)
    #113 0x5623c82251eb in PyEval_EvalCode (/opt/conda/bin/python3.6+0x19a1eb)
    #114 0x5623c829f9a3 in run_mod (/opt/conda/bin/python3.6+0x2149a3)
    #115 0x5623c829fda0 in PyRun_FileExFlags (/opt/conda/bin/python3.6+0x214da0)
    #116 0x5623c829ffa3 in PyRun_SimpleFileExFlags (/opt/conda/bin/python3.6+0x214fa3)
    #117 0x5623c82a3a9d in Py_Main (/opt/conda/bin/python3.6+0x218a9d)
    #118 0x5623c816b4bd in main (/opt/conda/bin/python3.6+0xe04bd)
    #119 0x7fef3a2b482f in __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291
    #120 0x5623c8252772 in _start (/opt/conda/bin/python3.6+0x1c7772)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions