Status

()

Core
Build Config
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: bc, Assigned: davel)

Tracking

({fixed1.8.0.5, fixed1.8.1})

Trunk
x86
All
fixed1.8.0.5, fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
ah_crap_handler sleep time should be configurable by environment variable

In *nix debug builds, the default signal handler does a sleep(300) after a crash to enable the developer time to attach a debugger. The 300 seconds is hard coded and not configurable.

This causes problems in automated testing of debug builds by preventing a crash from returning in a reasonable amount of time. This results in misidentifying crashes as hangs as well as increases the time required to cycle through crash tests.
(Assignee)

Comment 1

11 years ago
Bob,

I'm not sure if PR_GetEnv() and atoi() are safe to call from inside a signal handler.  If they are, then this is a trivial change.

If not, then would a workable alternative be a flag or env var to suppress the signal handler entirely?
(Reporter)

Comment 2

11 years ago
(In reply to comment #1)

> If not, then would a workable alternative be a flag or env var to suppress the
> signal handler entirely?

That would work for me.
(Reporter)

Comment 3

11 years ago
but I think this could be done in configure.in and some preprocessor foo as well.
(Assignee)

Updated

11 years ago
Assignee: nobody → davel
(Assignee)

Comment 4

11 years ago
Created attachment 210196 [details] [diff] [review]
make gdb sleep interval configurable via env var

attaching patch for bc to try on private builds
(Reporter)

Comment 5

11 years ago
Works fine for me. You need to update the "Sleeping for 5 minutes." message though. With that it is good to go.

Updated

11 years ago
Blocks: 156692
(Assignee)

Comment 6

11 years ago
Created attachment 210355 [details] [diff] [review]
previous patch + change message to report actual sleep time

updating message printed to stdout, submitting for review
Attachment #210196 - Attachment is obsolete: true
Attachment #210355 - Flags: review?
(Assignee)

Updated

11 years ago
Attachment #210355 - Flags: review? → review?(dbaron)
Comment on attachment 210355 [details] [diff] [review]
previous patch + change message to report actual sleep time

I'm not crazy about the name MOZ_GDB_SLEEP, but I can't think of anything better offhand.  r=dbaron
Attachment #210355 - Flags: review?(dbaron) → review+
Attachment #210355 - Flags: superreview+
(Assignee)

Comment 8

11 years ago
checked in on trunk:

/cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v  <--  nsSigHandlers.cpp
new revision: 1.45; previous revision: 1.44                                     
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
(Reporter)

Comment 9

11 years ago
Created attachment 226469 [details] [diff] [review]
patch for 1.8 branches

I know it is late for the 1.8.x trains, but this should be very low risk and would make my life easier on the branches. This has baked on the trunk for 4 months.
Attachment #226469 - Flags: review?
Attachment #226469 - Flags: approval1.8.1?
Attachment #226469 - Flags: approval1.8.0.5?
(Reporter)

Updated

11 years ago
Attachment #226469 - Flags: review?(dbaron)
Attachment #226469 - Flags: review?(davel)
Attachment #226469 - Flags: review?
(Assignee)

Comment 10

11 years ago
Comment on attachment 226469 [details] [diff] [review]
patch for 1.8 branches

looks to be identical to the trunk patch, so I think it will be ok.  I suggest you get additional review, just to be sure.
Attachment #226469 - Flags: review?(davel) → review+
(Reporter)

Comment 11

11 years ago
(In reply to comment #10)

Yeah, the original patch didn't apply due to bit rot. This patch is just a hand coded version of yours that would apply to the 1.8.x trees.
Comment on attachment 226469 [details] [diff] [review]
patch for 1.8 branches

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #226469 - Flags: approval1.8.0.5? → approval1.8.0.5+
Attachment #226469 - Flags: review?(dbaron) → review+
Attachment #226469 - Flags: superreview+
(Reporter)

Comment 13

11 years ago
checked in on MOZILLA_1_8_0_BRANCH

Checking in nsSigHandlers.cpp;
/cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v  <--  nsSigHandlers.cpp
new revision: 1.41.26.1; previous revision: 1.41
done
Keywords: fixed1.8.0.5

Updated

11 years ago
Attachment #226469 - Flags: approval1.8.1? → approval1.8.1+
(Reporter)

Comment 14

11 years ago
checked in on MOZILLA_1_8_BRANCH

Checking in nsSigHandlers.cpp;
/cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v  <--  nsSigHandlers.cpp
new revision: 1.41.18.1; previous revision: 1.41
done
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.