Message317377
Attached bug.py reproduces the bug with a daemonic thread but without fork():
$ ./python bug.py
ls coredpython: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed.
Aborted (core dumped)
(You might have to run the script a few times to get the crash, it's not deterministic.)
vstinner@apu$ gdb ./python -c coredump-python.24130
GNU gdb (GDB) Fedora 8.0.1-36.fc27
(..)
Core was generated by `./python bug.py'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f5136075660 in raise () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7f5136f64040 (LWP 24130))]
(gdb) where
#0 0x00007f5136075660 in raise () from /lib64/libc.so.6
#1 0x00007f5136076c41 in abort () from /lib64/libc.so.6
#2 0x00007f513606df7a in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f513606dff2 in __assert_fail () from /lib64/libc.so.6
#4 0x0000000000591dde in PyThreadState_Clear (tstate=0x1b7a430) at Python/pystate.c:589
#5 0x0000000000590274 in PyInterpreterState_Clear (interp=0x1b23930) at Python/pystate.c:204
#6 0x000000000058cf4c in Py_FinalizeEx () at Python/pylifecycle.c:1153
#7 0x00000000004257af in pymain_main (pymain=0x7ffe5f82f200) at Modules/main.c:2664
#8 0x0000000000425915 in _Py_UnixMain (argc=2, argv=0x7ffe5f82f448) at Modules/main.c:2697
#9 0x000000000041f1e7 in main (argc=2, argv=0x7ffe5f82f448) at ./Programs/python.c:15
(gdb) info threads
Id Target Id Frame
1 Thread 0x7f5136f64040 (LWP 24130) 0x00007f5136075660 in raise () from /lib64/libc.so.6
* 2 Thread 0x7f512e8c6700 (LWP 24138) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
3 Thread 0x7f512e0c5700 (LWP 24139) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
4 Thread 0x7f512d8c4700 (LWP 24147) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
5 Thread 0x7f512f0c7700 (LWP 24137) 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) t 2
[Switching to thread 2 (Thread 0x7f512e8c6700 (LWP 24138))]
#0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) where
#0 0x00007f5136b56be6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x000000000053458a in PyCOND_TIMEDWAIT (cond=0xa07248 <_PyRuntime+1224>, mut=0xa07278 <_PyRuntime+1272>, us=5000) at Python/condvar.h:90
#2 0x00000000005349a3 in take_gil (tstate=0x1b87980) at Python/ceval_gil.h:208 |
|
Date |
User |
Action |
Args |
2018-05-23 10:18:24 | vstinner | set | recipients:
+ vstinner, pitrou, Mark.Shannon, serhiy.storchaka, davin |
2018-05-23 10:18:24 | vstinner | set | messageid: <1527070704.75.0.682650639539.issue33612@psf.upfronthosting.co.za> |
2018-05-23 10:18:24 | vstinner | link | issue33612 messages |
2018-05-23 10:18:24 | vstinner | create | |
|