Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault in 3.11.5, frame and multithreading conflict #111363

Open
vkhodygo opened this issue Oct 26, 2023 · 2 comments
Open

Segmentation fault in 3.11.5, frame and multithreading conflict #111363

vkhodygo opened this issue Oct 26, 2023 · 2 comments
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@vkhodygo
Copy link

vkhodygo commented Oct 26, 2023

Crash report

What happened?

The code is a stripped down version of https://github.com/mckinsey/causalnex. I tried to make it as short as possible, but that takes time I'm afraid.

test.zip

lldb output when I tun the script:

Process 94644 launched: '/home/vlad/.conda/envs/test_311_valid/bin/python' (x86_64)
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped and restarted: thread 1 received signal: SIGCHLD
Process 94644 stopped
* thread #1, name = 'python', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x000000000050ed50 python`_PyEval_EvalFrameDefault at ceval.c:3187:23

gdb extracts this from a coredump:

[Thread debugging using libthread_db enabled]                                                                                                                                                                        
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/home/vlad/.conda/envs/test_311_valid/bin/python /home/vlad/Work/IHW/_mwe/test.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	     return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                                              
[Current thread is 1 (Thread 0x7fd0437c2340 (LWP 92633))]

I have a feeling this might be related to #106883 and probably to #99729. The code works fine with the latest 3.10, I failed to test it with 3.12 though: there is an implicit torch dependency but no build for 3.12 yet.

CPython versions tested on:

3.10, 3.11

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0]

@vkhodygo vkhodygo added the type-crash A hard crash of the interpreter, possibly with a core dump label Oct 26, 2023
@novialriptide
Copy link
Contributor

Hello! I have narrowed it down from the python file that potential *= bbn_node.func(*arg_list) is the line of code that causes the segfault.

@vkhodygo
Copy link
Author

vkhodygo commented Nov 6, 2023

Thanks, I appreciate that. However, it goes a bit deeper than that, and I'm not sure how to narrow it down better, without this much extra code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants