Closed
Bug 1144535
Opened 9 years ago
Closed 9 years ago
Increase stack size in the Nuwa process
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: cyu, Assigned: cyu)
References
Details
Attachments
(1 file, 1 obsolete file)
5.93 KB,
patch
|
asuth
:
review+
|
Details | Diff | Splinter Review |
This is a followup to bug 1119157 comment #14 to increase the stack size of the threads cloned by Nuwa.
Assignee | ||
Comment 1•9 years ago
|
||
We allocate thread stacks using mmap() in the Nuwa process(). Increase the stack size to default (= 1MiB) should have no effect on memory usage.
Assignee: nobody → cyu
Attachment #8579256 -
Flags: review?(bugmail)
Assignee | ||
Comment 2•9 years ago
|
||
Try push log: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e917e7d3fec3
Is there not some way to do it based on the stack size that was actually requested when the thread was created? Hard-coding any size seems like it will bite us somewhere eventually.
Comment 4•9 years ago
|
||
Comment on attachment 8579256 [details] [diff] [review] Increase thread stack size in the Nuwa process I agree with Ben. The requested stack size (which defaults to 1 megabyte in at least some versions of bionic) is in the 'attr' attribute to pthread_create. We should just use that.
Attachment #8579256 -
Flags: review?(bugmail) → review-
Comment 5•9 years ago
|
||
(Using pthread_attr_getstacksize/pthread_attr_getstackaddr/pthread_attr_getstack. We may also want to care about pthread_attr_getguardsize too.)
Assignee | ||
Comment 6•9 years ago
|
||
Changes: * Respect the attributes (detachstate, stacksize, guardsize) when creating the threads in the Nuwa process. * If the caller doesn't specify pthread_attr_t, use the default 1MB stack size as Android does. Try push log: https://treeherder.mozilla.org/#/jobs?repo=try&revision=12f23ec99289 * We might still need to copy other pthread_attr_t attributes. Or maybe it's better if we don't copy the thread attributes one by one, but just modify the one as necessary (pthread_attr_setstack()).
Attachment #8579256 -
Attachment is obsolete: true
Attachment #8580649 -
Flags: review?(bugmail)
Comment 7•9 years ago
|
||
Comment on attachment 8580649 [details] [diff] [review] Respect caller-specified thread attributes. Yes, I think it would be an improvement to propagate the other pthread_attr_t attributes some way. And/or causing the thread creation to fail if the attributes aren't expected, like starting a thread in the detached state might be a concerning thing to happen in the pre-fork NuWa process. But that seems like it wants to be a separate bug.
Attachment #8580649 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/d8c2f3038fbd
https://hg.mozilla.org/mozilla-central/rev/d8c2f3038fbd
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•