Title: Segmentation fault due to faulthandler on Solaris
Type: crash Stage:
Components: Extension Modules, Interpreter Core Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: kulikjak
Priority: normal Keywords:

Created on 2018-12-13 15:38 by kulikjak, last changed 2018-12-13 15:44 by kulikjak.

File name Uploaded Description Edit
crash_stack.txt kulikjak, 2018-12-13 15:38 stack trace kulikjak, 2018-12-13 15:38
Messages (2)
msg331763 - (view) Author: Jakub Kulik (kulikjak) * Date: 2018-12-13 15:38
When running tests on Solaris (amd64) I noticed that one test in fails with the segmentation fault.

I have attached program reproducing this issue and its core stack trace. Program runs entirely with *Ending* printed as well and segfaults somewhere in the sys.exit() during deallocation. 

Problem doesn't appear when chain variable is set to False or if faulthandler is unregistered. Also, this bug appears only with --enable-optimizations on, but probably it just doesn't manifest itself in non optimized build (or on sparc).

I am not sure how to diagnose it more so I am at least reporting this issue.
msg331764 - (view) Author: Jakub Kulik (kulikjak) * Date: 2018-12-13 15:44
The exact failing test is test_register_chain().

Output of this failed test (as expected for segmentation fault):

FAIL: test_register_chain (test.test_faulthandler.FaultHandlerTests)
Traceback (most recent call last):
  File "xxx/Python-3.7.1/Lib/test/", line 708, in test_register_chain
  File "xxx/Python-3.7.1/Lib/test/", line 686, in check_register
    self.assertEqual(exitcode, 0)
AssertionError: -11 != 0
Date User Action Args
2018-12-13 15:44:47kulikjaksetmessages: + msg331764
2018-12-13 15:38:47kulikjaksetfiles: +
2018-12-13 15:38:08kulikjakcreate