Closed
Bug 737084
Opened 12 years ago
Closed 12 years ago
Do pthread_atfork in jemalloc on mac and android
Categories
(Core :: mozglue, defect)
Core
mozglue
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
Currently, the pthread_atfork call from jemalloc is only done on Linux. There used to be a workaround in the ipc code, around a fork, but it went away recently. Anyways, to avoid any future surprise around this, we'd be better off doing pthread_atfork on Android, which "only" requires a few wrapped functions. And we should also do it on mac, since that's supported.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mh+mozilla
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #607211 -
Flags: review?(khuey)
Attachment #607211 -
Flags: review?(blassey.bugs)
Assignee | ||
Updated•12 years ago
|
Attachment #607211 -
Flags: feedback?(justin.lebar+bug)
Comment 2•12 years ago
|
||
I don't pretend to know exactly what's going on here, but WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror" + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=fork,--wrap=pthread_atfork" the second line doesn't overwrite the first one here?
Updated•12 years ago
|
Attachment #607211 -
Flags: feedback?(justin.lebar+bug) → feedback+
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #2) > I don't pretend to know exactly what's going on here, but > > WRAP_LDFLAGS="${WRAP_LDFLAGS} > -Wl,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror" > + WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=fork,--wrap=pthread_atfork" > > the second line doesn't overwrite the first one here? It's appends each time.
Comment 4•12 years ago
|
||
> It's appends each time.
Wow, it's like they *tried* to make a ridiculous language.
Comment 5•12 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #0) > Currently, the pthread_atfork call from jemalloc is only done on Linux. > There used to be a workaround in the ipc code, around a fork, but it went > away recently. What went away?
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #5) > (In reply to Mike Hommey [:glandium] from comment #0) > > Currently, the pthread_atfork call from jemalloc is only done on Linux. > > There used to be a workaround in the ipc code, around a fork, but it went > > away recently. > What went away? See bug 622992. While this avoids the problem that using the atfork callbacks solves, it doesn't ensure that future changes won't break assumptions again. Or that we won't be doing a fork() for some place else.
Updated•12 years ago
|
Attachment #607211 -
Flags: review?(blassey.bugs) → review+
Attachment #607211 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 7•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6634316f474
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c6634316f474
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
Comment 9•12 years ago
|
||
This breaks b2g build.
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Kan-Ru Chen [:kanru] from comment #9) > This breaks b2g build. Please file a bug. Do i guess right that it fails to link libmozglue because it can't find pthread_atfork?
You need to log in
before you can comment on or make changes to this bug.
Description
•