Closed Bug 500126 Opened 16 years ago Closed 16 years ago

--debugger=gdb option for runtests.py doesn't work when crashreporter is enabled

Categories

(Toolkit :: Crash Reporting, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 485531

People

(Reporter: jaas, Unassigned)

Details

The --debugger=gdb option for runtests.py doesn't work when crashreporter is enabled. After instructing gdb to run the build goes down with something like "error code 06". Disable crashreporter and everything works fine. Tested on Mac OS X 10.5.7.
This behaviour isn't specific to the test harness, it just happens to show up there because the MOZ_CRASHREPORTER environment variable is set by the automation harness. You can also reproduce it like so: % MOZ_CRASHREPORTER=1 gdb --args ../obj-i386-apple-darwin9.7.0/dist/MinefieldDebug.app/Contents/MacOS/firefox-bin -no-remote -P minefield (gdb) r ... Program exited with code 06. And the crash reporter UI pops up. Crash report: http://crash-stats.mozilla.com/report/index/895b4b0a-284b-4bbe-a7d3-0a3f62090624?p=1 If I try to trace this in gdb, gdb hangs in google_breakpad::ExceptionHandler::InstallHandler (at toolkit/crashreporter/google-breakpad/src/client/mac/handler/exception_handler.cc:568) when calling task_set_exception_ports. I can't attach to the hung gdb with another gdb session, and the only way to kill it is with a SIGKILL. I guess it's possible that this is just a known limitation of Breakpad and we should try to work around it in the automation harness by not setting MOZ_CRASHREPORTER if --debugger has been specified, but I had a look through the Breakpad bug tracker and couldn't find any evidence that this behaviour is expected. It could also be a gdb bug. I'm seeing this with: gdb 6.3.50-20050815 (Apple version gdb-960). Josh mentioned he was using gdb-966 from XCode 3.1.3. Moving this to Toolkit/Breakpad Integration.
Component: Mochitest → Breakpad Integration
Product: Testing → Toolkit
QA Contact: mochitest → breakpad.integration
It could just be that gdb and Breakpad step on each other's toes since they both try to use the same Mach ports for the process. I'm not really well versed enough to know, but I think we should just work around this in the Mochitest harness if you specify --debugger.
This is a duplicate of bug 485531, no?
Yes, it is.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.