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 bkabrda, justbennet, markmcclain, miss-islington, opoplawski, peadar, vstinner
Date 2019-08-14.22:13:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565820833.38.0.916054924331.issue21131@roundup.psfhosted.org>
In-reply-to
Content
"I can confirm that on the specific hardware I could reproduce this, that
PR14276 and setting the stacksize to SIGSTKSZ*2 passes the test_faulthandler test."

Thanks for testing. I merged my PR.

About PR 13649, I'm not sure that _PyThread_preferred_stacksize() is still relevant, since my change fixed test_faulthandler test_register_chain(). I chose my change since it's less invasive: it only impacts faulthandler, and it minimalizes the memory usage (especially when faulthandler is not used).

Python/thread_pthread.h refactor changes of PR 13649 are interested. Would you like to extract them into a new PR which doesn't add _PyThread_preferred_stacksize() but just add new PLATFORM_xxx macros?

--

Maybe test_faulthandler will fail tomorrow on a new platform, but I prefer to open a discussion once such case happens, rather than guessing how faulthandler can crash on an hypothetical platforms. I'm sure that libc developers are well aware of the FPU state size and update SIGSTKSZ accordingly.

glibc code computing xsave_state_size:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86/cpu-features.c;h=4bab1549132fe8a4c203a70b8c7a51c1dc304049;hb=HEAD#l223

--

If tomorrow, it becomes too hard to choose a good default value for faulthandler stack size, another workaround would be to make it configurable, as Python lets developers choose the thread stack size: _thread.stack_size(size).
History
Date User Action Args
2019-08-14 22:13:53vstinnersetrecipients: + vstinner, bkabrda, opoplawski, miss-islington, markmcclain, peadar, justbennet
2019-08-14 22:13:53vstinnersetmessageid: <1565820833.38.0.916054924331.issue21131@roundup.psfhosted.org>
2019-08-14 22:13:53vstinnerlinkissue21131 messages
2019-08-14 22:13:52vstinnercreate