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.

Title: faulthandler: only allocate the signal handler stack when faulthandler is used
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords: patch

Created on 2019-08-14 13:44 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15358 merged vstinner, 2019-08-21 11:55
Messages (3)
msg349697 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-08-14 13:44
Currently at startup, Python always call _PyFaulthandler_Init() which allocates a stack of SIGSTKSZ bytes, even if faulthandler is never used. That's a waste of memory: the stack should be allocated the first time faulthandler is used.

bpo-21131 requires to enlarge this stack size.
msg350077 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-08-21 12:41
New changeset d8c5adf6f83024238545aac0bb465289cc2dde84 by Victor Stinner in branch 'master':
bpo-37851: faulthandler allocates its stack on demand (GH-15358)
msg350078 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-08-21 12:41
Note: faulthandler stack size is 16 KiB on my Fedora Linux 30 x86-64.
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82032
2019-08-21 12:41:58vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg350078

stage: patch review -> resolved
2019-08-21 12:41:04vstinnersetmessages: + msg350077
2019-08-21 11:55:16vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request15070
2019-08-14 13:44:00vstinnercreate