Bug 1983696 - firefox: Port to dynamic PTHREAD_STACK_MIN (glibc 2.34 related)
Summary: firefox: Port to dynamic PTHREAD_STACK_MIN (glibc 2.34 related)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1976892 1983703 1984792
TreeView+ depends on / blocked
 
Reported: 2021-07-19 14:12 UTC by Florian Weimer
Modified: 2021-08-04 18:20 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
: 1983703 1984792 (view as bug list)
Environment:
Last Closed: 2021-07-23 11:08:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to remove stack size optimization for the Watchdog thread (1.22 KB, patch)
2021-07-19 14:12 UTC, Florian Weimer
no flags Details | Diff
https://bugzilla.redhat.com/show_bug.cgi?id=1983703 patch (2.65 KB, patch)
2021-07-20 07:09 UTC, Florian Weimer
no flags Details | Diff


Links
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:16 UTC

Description Florian Weimer 2021-07-19 14:12:28 UTC
Created attachment 1803339 [details]
Patch to remove stack size optimization for the Watchdog thread

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:09:56 UTC
Created attachment 1803523 [details]
https://bugzilla.redhat.com/show_bug.cgi?id=1983703 patch

Comment 2 Florian Weimer 2021-07-22 08:58:12 UTC
There is another use of PTHREAD_STACK_MIN in security/sandbox/linux/launch/SandboxLaunch.cpp, also fixed by the patch.


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