Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
(In reply to Paulo Andrade from comment #0)
> This should be a known issue, as it is corrected with glibc-2.17-221.el7,
> but the later is not yet available to customers.
> The issue should be the backport of
> https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;
> h=b52b0d793dcb226ecb0ecca1e672ca265973233c
> and the latest patches (glibc-2.17-221.el7) appear to correct it.
The issue is more complicated than this.
Customers have used PTHREAD_STACK_MIN incorrectly over the years. The minimum stack is only guaranteed to start the thread, and nothing else. All other allocations required by the thread function must be added to the minimum stack. We have seen two cases now where small-stack threads have failed because they did not include enough stack space and instead used PTHREAD_STACK_MIN, hoping there would be enough slack there to allow them to operate. In particular, pthread_cancel() is not guaranteed to complete in a PTHREAD_STACK_MIN sized stack.
Having said this, we will be fixing this issue in RHEL 7.5, using a two-pronged strategy, first by changing some of the accounting for guard pages, and second by shifting some of the normal pthread_cancel() work back to the dynamic loader. Those two options should be enough to allow existing RHEL 7.5 applications like those in the example, to keep running. We do this because we value stability and backwards compatibility in RHEL. However, this should be a warning to application authors that they have relied upon leftover space in PTHREAD_STACK_MIN to run their thread routines, and that is not a guaranteed assumption. That leftover space belongs to the implementation to use.