This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2018-12-13 15:38 by kulikjak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
crash_stack.txt kulikjak, 2018-12-13 15:38 stack trace
reproduce.py kulikjak, 2018-12-13 15:38
Messages (4)
msg331763 - (view) Author: Jakub Kulik (kulikjak) * Date: 2018-12-13 15:38
When running tests on Solaris (amd64) I noticed that one test in test_faulthandler.py 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/test_faulthandler.py", line 708, in test_register_chain
    self.check_register(chain=True)
  File "xxx/Python-3.7.1/Lib/test/test_faulthandler.py", line 686, in check_register
    self.assertEqual(exitcode, 0)
AssertionError: -11 != 0
msg349179 - (view) Author: Peter Edwards (peadar) * Date: 2019-08-07 17:32
This is likely a duplicate of issue 21131
msg349227 - (view) Author: Jakub Kulik (kulikjak) * Date: 2019-08-08 09:25
Oh, thanks for the catch, it most likely is.
History
Date User Action Args
2022-04-11 14:59:09adminsetgithub: 79665
2019-08-08 09:25:58kulikjaksetstatus: open -> closed
resolution: duplicate
messages: + msg349227

stage: resolved
2019-08-07 17:32:30peadarsetnosy: + peadar
messages: + msg349179
2018-12-13 15:44:47kulikjaksetmessages: + msg331764
2018-12-13 15:38:47kulikjaksetfiles: + reproduce.py
2018-12-13 15:38:08kulikjakcreate