RunWatchdog should not fire when a debugger is present
Categories
(Core :: XPCOM, defect, P5)
Tracking
()
People
(Reporter: mayhemer, Unassigned)
References
(Blocks 1 open bug)
Details
No description provided.
Uh, why not?
Reporter | ||
Comment 2•8 years ago
|
||
(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.
Ah, ok, that is a reasonable ask. Resummarizing.
Reporter | ||
Comment 4•8 years ago
|
||
On windows, it can be easily discovered with a call to BOOL IsDebuggerPresent() function.
Updated•6 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
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...
Comment 6•2 years ago
|
||
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?
Comment 8•1 year ago
|
||
By now no response on #windev. If someone stumbles again over this, we are happy to look at a patch.
Description
•