Bug 1527904

Summary: glibc: PTHREAD_STACK_MIN is too small on x86-64
Product: Red Hat Enterprise Linux 7 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED ERRATA QA Contact: Sergey Kolosov <skolosov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: ashankar, bgollahe, codonell, fweimer, lmiksik, mnewsome, pandrade, pfrankli, skolosov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.17-221.el7 Doc Type: Bug Fix
Doc Text:
Applications with PTHREAD_STACK_MIN sized thread stacks may experience segmentation faults as those threads run out of stack space. Such applications have incorrectly expected PTHREAD_STACK_MIN to provide enough stack space to do more than just start the thread. Applications should add to PTHREAD_STACK_MIN the stack required for their own uses. As an intermediate solution to allow existing applications to continue to operate the C runtime has been adjusted to use less stack space for key functionality. Existing applications should now continue to operate with PTHREAD_STACK_MIN sized thread stacks.
Story Points: ---
Clone Of: 1527887 Environment:
Last Closed: 2018-04-10 14:04:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1527905    
Bug Blocks:    

Description Florian Weimer 2017-12-20 12:27:19 UTC
Bug 1527887 shows that PTHREAD_STACK_MIN is really low on x86-64 (at 16384) and cannot accommodate both a signal handler frame, the libgcc unwinder, and an ld.so trampoline on AVX-512 (where the XSAVE area is around 2.5 KiB, and it is needed twice on the stack).

We should investigate ways how we can make for of those 16 KiB usable from applications.  At the very list, if the application requests a 16 KiB stack, it should get as much stack space as indicated, and not just 8 KiB.

Comment 1 Florian Weimer 2017-12-20 13:50:28 UTC
This is a regression introduced by glibc-2.17-196.el7_4.2 in <https://access.redhat.com/errata/RHBA-2017:3296>.

Comment 7 Florian Weimer 2018-01-29 16:21:55 UTC
*** Bug 1538776 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2018-04-10 14:04:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0805