Bug 1983703

Summary: firefox: Port to dynamic PTHREAD_STACK_MIN (glibc 2.34 related)
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: firefoxAssignee: Tomas Popela <tpopela>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Pelka <tpelka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, erack, jwboyer, tpelka, tpopela
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: firefox-78.12.0-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1983696 Environment:
Last Closed: 2021-12-07 21:52:33 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: 1983696    
Bug Blocks:    
Attachments:
Description Flags
PTHREAD_STACK_MIN patch none

Description Florian Weimer 2021-07-19 14:23:08 UTC
+++ This bug was initially created as a clone of Bug #1983696 +++

This code in js/xpconnect/src/XPCJSContext.cpp fails to build with glibc 2.34:

static constexpr size_t kWatchdogStackSize =
    PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;

I'm not sure to what extent this optimization is important, given that the kernel will not use memory for unused areas of the stack. The use of PTHREAD_STACK_MIN is dubious anyway because the constant only means that pthread_attr_setstack will not fail. It doesn't say that the thread stack is useful for running any application code.

Comment 1 Florian Weimer 2021-07-20 07:08:24 UTC
Created attachment 1803522 [details]
PTHREAD_STACK_MIN patch

Comment 2 Tomas Popela 2021-07-30 05:21:00 UTC
Eike, can you please get this in when you will be doing the next ESR 78.13 update in Stream? Also do the same for Thunderbird (see bug 1984794). Looking at the upstream bug it will probably be resolved upstream as well and will be part of ESR 91. If not then we have to backport it there when we will finish the rebase.

Comment 3 Tomas Popela 2021-08-02 08:01:29 UTC
I will take this as I have to do a Firefox/Thunderbird build now and without this change it's not possible to build Firefox/Thunderbird.

Comment 7 Florian Weimer 2021-08-03 11:38:53 UTC
Relevant merge request: https://gitlab.com/redhat/centos-stream/rpms/firefox/-/merge_requests/18