Open Bug 1130782 Opened 9 years ago Updated 1 year ago

RunWatchdog should not fire when a debugger is present

Categories

(Core :: XPCOM, defect, P5)

defect

Tracking

()

People

(Reporter: mayhemer, Unassigned)

References

(Blocks 1 open bug)

Details

      No description provided.
Uh, why not?
Flags: needinfo?(honzab.moz)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> Uh, why not?

Maybe I should rephrase the title: the watch dog should ignore delays caused by debugger sessions.  I'm currently not sure if this is an issue.  I recall I've reported this bug after debugging some shutdown code and just got hit by this artificial crash.  Very annoying.
Flags: needinfo?(honzab.moz)
Ah, ok, that is a reasonable ask.  Resummarizing.
Summary: RunWatchdog should not run in debug builds → RunWatchdog should not fire when a debugger is present
On windows, it can be easily discovered with a call to BOOL IsDebuggerPresent() function.
Severity: normal → S3

So IIUC IsDebuggerPresent is a WinAPI function we have no general equivalent for. It checks if there is an external debugger attached (probably Visual Studio?).

There is an easy workaround for this: just set the pref toolkit.asyncshutdown.crash_timeout to something much higher than the default. Checking IsDebuggerPresent would be easy to do but is it worth to have a special case here just for Windows? If someone is debugging shutdown I hope they know how it works in general...

Flags: needinfo?(nika)

I don't really see the harm in adding a special case for Windows to the code, it seems straightforward enough to add by setting the timeout to INT32_MAX if ::IsDebuggerPresent(), and like it'd be unlikely to cause problems. Might be worth asking if it would be handy for folks in #windev on matrix?

Flags: needinfo?(nika)

Asking (and keeping the ni?)

Flags: needinfo?(jstutte)

By now no response on #windev. If someone stumbles again over this, we are happy to look at a patch.

Severity: S3 → S4
Flags: needinfo?(jstutte)
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.