Closed
Bug 522332
Opened 15 years ago
Closed 14 years ago
nsProfileLock::FatalSignalHandler is not async-signal-safe
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: karlt, Assigned: justin.lebar+bug)
References
Details
Attachments
(1 file, 1 obsolete file)
5.79 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
nsProfileLock::FatalSignalHandler() -> RemovePidLockFiles() -> lock->Unlock() -> free() Perhaps either nsProfileLock could use a free-list instead of free, or perhaps special Unlock()ing is needed for signal handling. (There also seems to be an assumption here that the handler will only be called on one thread.)
Assignee | ||
Comment 1•14 years ago
|
||
Since it's a fatal signal, do we need to bother calling free()?
Assignee | ||
Comment 2•14 years ago
|
||
Jesse, could you see if this patch fixes the hang you reported in bug 566208?
Attachment #457722 -
Flags: feedback?
Assignee | ||
Updated•14 years ago
|
Attachment #457722 -
Flags: feedback? → feedback?(jruderman)
Comment 3•14 years ago
|
||
Comment on attachment 457722 [details] [diff] [review] Patch v1 I can't reproduce my bug at will. I tried various combinations of long and short timeouts, builds with and without breakpad. Sorry I can't usefully test this patch.
Attachment #457722 -
Flags: feedback?(jruderman)
Comment 4•14 years ago
|
||
Is it only in the killed-by-abort case that we skip the "free"? Or does this introduce a leak into normal shutdown that I'll need to tell Valgrind to ignore?
Comment 5•14 years ago
|
||
Rather than "See bug 522332", I think the comment should explain exactly why it's not safe to call free() in this case, and what the implications of not calling free() are.
Assignee | ||
Comment 6•14 years ago
|
||
This one should only leak on a fatal signal. I dunno if that's worth informing Valgrind of.
Assignee: nobody → justin.lebar+bug
Attachment #457722 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Assignee | ||
Updated•14 years ago
|
Attachment #460279 -
Flags: review?(benjamin)
Comment 7•14 years ago
|
||
Thanks. We're going to "leak" almost everything when we get a fatal signal, so "leaking" one additional thing is fine.
+ if (!aFatalSignal) + free(mPidLockFileName); free is under-indented
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8) > free is under-indented Fixed locally. Thanks.
Assignee | ||
Comment 10•14 years ago
|
||
Nominating as blocking 2.0 since this harms user experience when FF crashes -- it's much better for it to cleanly die than to hang.
blocking2.0: --- → ?
Comment 11•14 years ago
|
||
On the fence really but I guess being able to kill Firefox cleanly is important.
blocking2.0: ? → final+
Updated•14 years ago
|
Attachment #460279 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 12•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/52172131101f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•