More tests.
(*) What is the output of signal.getsignal(signal.SIGUSR1) before importing faulthandler (before calling any faulthandler method)? Example:
$ python3
Python 3.7.3 (default, May 11 2019, 00:38:04)
>>> import signal; signal.getsignal(signal.SIGUSR1)
<Handlers.SIG_DFL: 0>
(*) Can you try to run attached script in gdb? If you get a crash, type "where" to get the traceback. Example:
$ gdb -args ./python script.py
(gdb) handle SIGUSR1 nostop
Signal Stop Print Pass to program Description
SIGUSR1 No Yes Yes User defined signal 1
(gdb) run
Starting program: /home/vstinner/python/master/python script.py
Program received signal SIGUSR1, User defined signal 1.
Current thread 0x00007ffff7c27740 (most recent call first):
File "/home/vstinner/python/master/script.py", line 13 in <module>
Program received signal SIGUSR1, User defined signal 1.
called True
[Inferior 1 (process 24361) exited normally] |