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.

Author vstinner
Recipients oleksandr-pavlyk, vstinner
Date 2022-03-12.01:31:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647048713.26.0.945540661851.issue46968@roundup.psfhosted.org>
In-reply-to
Content
> So where getauxval(AT_MINSIGSTKSZ) < SIGSTKSZ the merged changes actually resulted in decrease of the allocated signal deliver stack. 

faulthandler stack is only used in the least likely case: on a fatal error. It should reduce its memory footprint, so it's good that it uses less memory.

To fix bpo-21131, I chose to use SIGSTKSZ * 2 because:

* the fix is trivial: add "* 2"
* it "just works"
* there was no API to query how many bytes Linux uses on the stack

Previously, faulthandler had between 0 and SIGSTKSZ bytes depending on which CPU extension was used or not on the process.

If I understood correctly, on Linux 5.14 with the change, faulthandler now always has SIGSTKSZ bytes for its own usage, and the other bytes are used by the Linux kernel. So it's more reliable for faulthandler, to always have the same amount of memory for its personal use.
History
Date User Action Args
2022-03-12 01:31:53vstinnersetrecipients: + vstinner, oleksandr-pavlyk
2022-03-12 01:31:53vstinnersetmessageid: <1647048713.26.0.945540661851.issue46968@roundup.psfhosted.org>
2022-03-12 01:31:53vstinnerlinkissue46968 messages
2022-03-12 01:31:53vstinnercreate