Skip to content

GetPythonFrames segfaultΒ #3900

@JackCaoG

Description

@JackCaoG

πŸ› Bug

torch::lazy::GetPythonFrames segfault

31β”‚ std::vector<SourceLocation> GetPythonFrames() {
32β”‚   std::vector<SourceLocation> frames;
33β”‚   if (Py_IsInitialized()) {
34β”‚     pybind11::gil_scoped_acquire gil;
35β”‚     PyFrameObject* frame = PyEval_GetFrame();
36β”œ>    Py_INCREF(frame);
37β”‚     while (frame != nullptr) {
Thread 573 "python" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff8c1ffb700 (LWP 112450)]
0x00007fffeacc52b2 in torch::lazy::GetPythonFrames () at ../torch/csrc/lazy/python/python_util.cpp:36
(gdb) p frame
$1 = (PyFrameObject *) 0x0

To Reproduce

XLA_IR_DEBUG=1 python ../test/test_nn.py TestNNDeviceTypeXLA.test_Dropout2d_xla

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions