Closed
Bug 274450
Opened 20 years ago
Closed 20 years ago
Linux now supports setstacksize
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
4.6
People
(Reporter: poumeyrol, Assigned: wtc)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
1.13 KB,
patch
|
bzbarsky
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
I am questioning the usefullness of the #ifndef LINUX surrounding the call to pthread_attr_setstacksize in ptthread.c . While debugging a heavy multithreaded application, I found out that pthread_attr_setstatcksize actualy exists on at least recent debian and redhat. And that it seams to do what it is supposed to do. I don't when it started to work, but are we sure we are not building a workaround around something which is no longer here ? I had to remove the #ifndef to get my application working fine. I can go on patching nsprpub, but it is a real pain...
| Assignee | ||
Comment 1•20 years ago
|
||
You said:
> I had to remove the #ifndef to get my application working fine.
Does this mean your application requires setting the
threads' stack size (to a smaller value)?Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #1) > Does this mean your application requires setting the > threads' stack size (to a smaller value)? Precisely. (I know an application should not start "that many" threads, so no need to waste your time on the lecture if you don't want to change the current behaviour ;) .)
| Assignee | ||
Comment 3•20 years ago
|
||
| Assignee | ||
Comment 4•20 years ago
|
||
I confirmed that Red Hat Linux Advanced Server 2.1 has pthread_attr_setstacksize. So I checked in the patch on the NSPR tip (NSPR 4.6) and the NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.8 Beta 2).
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.6
Updated•20 years ago
|
Summary: Linux now supports setstatcksize → Linux now supports setstacksize
This caused bug 285330.
| Assignee | ||
Comment 6•20 years ago
|
||
64K default stack size is too small for Linux. I will attach a new patch.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 7•20 years ago
|
||
In this patch, we abandon NSPR's old policy of having a cross-platform default thread stack size. Instead, we define NSPR's default thread stack size to be the native thread library's default stack size. It is hard to determine what the right default stack size is, so I propose we defer this decision to the native thread library's implementors.
Attachment #176658 -
Attachment is obsolete: true
Attachment #176775 -
Flags: superreview?(darin)
Attachment #176775 -
Flags: review?(bzbarsky)
Comment 8•20 years ago
|
||
Comment on attachment 176775 [details] [diff] [review] Proposed patch v2 Looks reasonable. r=bzbarsky
Attachment #176775 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 9•20 years ago
|
||
Comment on attachment 176775 [details] [diff] [review] Proposed patch v2 I checked in this patch on the NSPR tip (NSPR 4.6) and NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.8 Beta 2). Looking at the history of the code, I found that the _MD_MINIMUM_STACK_SIZE code was added to fix the same problem on OpenVMS (bug 69496) and AIX (bug 183907). Since we have a new fix for the "default stack size too small" problem, we should be able to remove the _MD_MINIMUM_STACK_SIZE code from ptthread.c. But doing that has a higher risk because some code may be passing a nonzero stackSize argument to PR_CreateThread and inadvertently depend on the _MD_MINIMUM_STACK_SIZE code to protect them.
Updated•20 years ago
|
Attachment #176775 -
Flags: superreview?(darin) → superreview+
| Assignee | ||
Comment 10•20 years ago
|
||
Marked the bug fixed again.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•