When both PyTorch and Pandas are imported, calling loss.backward() results in a segfault. The issue was originally reported by @EthanRosenthal here
It looks like calling PyThreadState_GET() returns a null pointer here: https://github.com/python/cpython/blob/5fd33b5926eb8c9352bf5718369b4a8d72c4bb44/Python/errors.c#L28
Examining in GDB:
(gdb) down
#0 PyErr_Restore (type=0x0, value=<optimised out>, traceback=0x0) at Python/errors.c:42
42 Python/errors.c: No such file or directory.
(gdb) info locals
tstate = 0x0
oldtype = <optimised out>
oldvalue = <optimised out>
oldtraceback = <optimised out>
(gdb) tstate
Undefined command: "tstate". Try "help".
(gdb) p tstate
I suspect it's both PyTorch and Pandas doing threading magic and somehow getting in each other's way.
I haven't yet been able to provide a minimal example that triggers this behaviour and does not use my package; it's likely that I'm doing something odd that causes this.
More documentation here: maciejkula/spotlight#42
Possibly related issues: #1318 and #1868.
Python version: 3.6
PyTorch version: v0.2.0
Pandas version: 0.20.1
When both PyTorch and Pandas are imported, calling
loss.backward()results in a segfault. The issue was originally reported by @EthanRosenthal hereIt looks like calling
PyThreadState_GET()returns a null pointer here: https://github.com/python/cpython/blob/5fd33b5926eb8c9352bf5718369b4a8d72c4bb44/Python/errors.c#L28Examining in GDB:
I suspect it's both PyTorch and Pandas doing threading magic and somehow getting in each other's way.
I haven't yet been able to provide a minimal example that triggers this behaviour and does not use my package; it's likely that I'm doing something odd that causes this.
More documentation here: maciejkula/spotlight#42
Possibly related issues: #1318 and #1868.
Python version: 3.6
PyTorch version: v0.2.0
Pandas version: 0.20.1