Bug 1983703 - firefox: Port to dynamic PTHREAD_STACK_MIN (glibc 2.34 related)
Summary: firefox: Port to dynamic PTHREAD_STACK_MIN (glibc 2.34 related)
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: firefox
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: ---
Assignee: Tomas Popela
QA Contact: Tomas Pelka
Depends On: 1983696
TreeView+ depends on / blocked
Reported: 2021-07-19 14:23 UTC by Florian Weimer
Modified: 2021-08-03 11:38 UTC (History)
5 users (show)

Fixed In Version: firefox-78.12.0-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1983696
Last Closed:
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)
PTHREAD_STACK_MIN patch (2.65 KB, patch)
2021-07-20 07:08 UTC, Florian Weimer
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1721326 0 -- UNCONFIRMED Port to glibc 2.34 dynamic PTHREAD_STACK_MIN 2021-07-20 07:01:04 UTC

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]

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

Note You need to log in before you can comment on or make changes to this bug.