SkyLined / BugId

Detect, analyze and uniquely identify crashes in Windows applications
https://bugid.skylined.nl
Other
501 stars 90 forks source link

BugID hangs on windows 7 #61

Closed saidelike closed 4 years ago

saidelike commented 6 years ago

Hi,

It looks like BugId hangs with latest release Firefox 57.0.2.6549 from 6 Dec (https://www.mozilla.org/en-US/firefox/new/). It should be possible to download it from https://ftp.mozilla.org/pub/firefox/releases/57.0.2/win64/en-US/Firefox%20Setup%2057.0.2.exe if not available anymore in first link. After installing Firefox, I've just modified "browser.tabs.remote.autostart.2=false" in "about:config" so it is single process.

test 1 - BugId not running Firefox

With BugId today's version from git, I get this:

C:\Users\User\Desktop\BugId>C:\Python27-x64\python.exe BugId.py -v "C:\Program Files\Mozilla Firefox\firefox.exe" -- C:\Users\User\Desktop\crash3.html
* Command line: C:\Program Files\Mozilla Firefox\firefox.exe C:\Users\User\Desktop\crash3.html
stdout>
stdout>Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
stdout>Copyright (c) Microsoft Corporation. All rights reserved.
stdout>
stdout>CommandLine: "C:\Windows\system32\cmd.exe" /K "ECHO OFF"
stdout>Symbol search path is: cache*;srv*http://msdl.microsoft.com/download/symbols
stdout>Executable search path is:
stdout>ModLoad: 00000000`4a8a0000 00000000`4a8f8000   cmd.exe
stdout>ModLoad: 00000000`77860000 00000000`77a0b000   ntdll.dll
stdout>ModLoad: 00000000`77640000 00000000`7775f000   C:\Windows\system32\kernel32.dll
stdout>ModLoad: 000007fe`fd930000 000007fe`fd99b000   C:\Windows\system32\KERNELBASE.dll
stdout>ModLoad: 000007fe`fe010000 000007fe`fe0af000   C:\Windows\system32\msvcrt.dll
stdout>ModLoad: 000007fe`f4370000 000007fe`f4378000   C:\Windows\system32\WINBRAND.dll
stdout>ModLoad: 00000000`77760000 00000000`7785a000   C:\Windows\system32\USER32.dll
stdout>ModLoad: 000007fe`ffb00000 000007fe`ffb67000   C:\Windows\system32\GDI32.dll
stdout>ModLoad: 000007fe`fe990000 000007fe`fe99e000   C:\Windows\system32\LPK.dll
stdout>ModLoad: 000007fe`fe1d0000 000007fe`fe29a000   C:\Windows\system32\USP10.dll
stdout>(684.a14): Break instruction exception - code 80000003 (first chance)
stdout>*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
stdout>ntdll!CsrSetPriorityClass+0x40:
stdout>00000000`77911220 cc              int     3
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .prompt_allow -dis -ea -reg -src -sym; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0
x3E; $$ Display only the prompt
stdout><☺[☻{
stdout>Allow the following information to be displayed at the prompt:
stdout>(Other settings can affect whether the information is actually displayed)
stdout>  None
stdout>Do not allow the following information to be displayed at the prompt:
stdout>   sym - Symbol for current instruction
stdout>   dis - Disassembly of current instruction
stdout>    ea - Effective address for current instruction
stdout>   reg - Register state
stdout>   src - Source info for current instruction
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .pcmd -s ".echo;"; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Output a CRL
F after running the application
stdout><☺[☻{
stdout>Set prompt command
stdout>Per-prompt command is '.echo;'
stdout>}☻]☺>
stdout>0:000>
<stdin<
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .lastevent; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get information abo
ut last event
stdout><☺[☻{
stdout>Last event: 684.a14: Break instruction exception - code 80000003 (first chance)
stdout>  debugger time: Thu Dec 21 14:15:30.175 2017 (GMT+0)
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ sxd *;sxi ld;sxi ud;sxd 0xC0000094;sxd 0xC0000095;sxd 0xC0000008;sxd 0xC0000235;sxd 0x80000
004;sxd 0x4000001E;sxd 0xE06D7363;sxd 0x40080201;sxd 0x40080202;sxe cpr;sxe ibp;sxe epr;sxe aph;sxe 0xC0000005;sxe 0xC0000420;sxe 0x80000003;sxe 0xC000008C;sxe
0x80000002;sxe 0xC0000602;sxe 0x80000001;sxe 0xC000001D;sxe 0xC0000006;sxe 0xC0000096;sxe 0xC0000409;sxe 0xC00000FD;sxe 0x4000001F;sxe 0x80000007; }; .printf "%
c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Setup exception handling
stdout><☺[☻{
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .attach -b 0x9A4; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Attach to pro
cess 2468
stdout><☺[☻{
stdout>Attach will occur on next execution
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .time; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get debugger time
stdout><☺[☻{
stdout>Debug session time: Thu Dec 21 14:15:30.299 2017 (GMT+0)
stdout>System Uptime: 0 days 0:08:42.709
stdout>Process Uptime: 0 days 0:00:00.140
stdout>  Kernel time: 0 days 0:00:00.015
stdout>  User time: 0 days 0:00:00.000
stdout>}☻]☺>
stdout>0:000>
<stdin<gn;
stdout>*** wait with pending attach
stdout>Symbol search path is: cache*;srv*http://msdl.microsoft.com/download/symbols
stdout>Executable search path is:
stdout>
stdout>1:001>
<stdin<
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .lastevent; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get information abo
ut last event
stdout><☺[☻{
stdout>Last event: 9a4.b7c: Create process 1:9a4
stdout>  debugger time: Thu Dec 21 14:15:30.315 2017 (GMT+0)
stdout>}☻]☺>
stdout>1:001>
+ Main process 2468/0x9A4 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" C:\Users\User\Desktop\crash3.html.
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .childdbg 1; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Debug child proces
ses
stdout><☺[☻{
stdout>Processes created by the current process will be debugged
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ ~*m; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Resume all threads
stdout><☺[☻{
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ lmov a 0x13FCE0000; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get module
information
stdout><☺[☻{
stdout>start             end                 module name
stdout>00000001`3fce0000 00000001`3fd53000   firefox    (deferred)
stdout>    Image path: firefox.exe
stdout>    Image name: firefox.exe
stdout>    Timestamp:        Wed Dec 06 19:37:35 2017 (5A2846FF)
stdout>    CheckSum:         000788A8
stdout>    ImageSize:        00073000
stdout>    File version:     57.0.2.6549
stdout>    Product version:  57.0.2.0
stdout>    File flags:       0 (Mask 3F)
stdout>    File OS:          4 Unknown Win32
stdout>    File type:        2.0 Dll
stdout>    File date:        00000000.00000000
stdout>    Translations:     0000.04b0
stdout>    CompanyName:      Mozilla Corporation
stdout>    ProductName:      Firefox
stdout>    InternalName:     Firefox
stdout>    OriginalFilename: firefox.exe
stdout>    ProductVersion:   57.0.2
stdout>    FileVersion:      57.0.2
stdout>    FileDescription:  Firefox
stdout>    LegalCopyright:   ¬Firefox and Mozilla Developers; available under the MPL 2 license.
stdout>    LegalTrademarks:  Firefox is a Trademark of The Mozilla Foundation.
stdout>    Comments:         Firefox is a Trademark of The Mozilla Foundation.
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .time; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get debugger time
stdout><☺[☻{
stdout>Debug session time: Thu Dec 21 14:15:30.455 2017 (GMT+0)
stdout>System Uptime: 0 days 0:08:42.865
stdout>Process Uptime: 0 days 0:00:00.171
stdout>  Kernel time: 0 days 0:00:00.000
stdout>  User time: 0 days 0:00:00.000
stdout>}☻]☺>
stdout>1:001>
<stdin<gh;
stdout>(9a4.b7c): Break instruction exception - code 80000003 (first chance)
stdout>
stdout>1:001>
<stdin<

Note that Firefox does not even spawn a window here due to it breaking early after starting.

Test 2 - BugId not handling exception

I've used the following diff to tell Firefox to continue execution when it hits exception above.

C:\Users\User\Desktop\BugId\modules\cBugId>git diff
diff --git a/cCdbWrapper_fCdbStdInOutThread.py b/cCdbWrapper_fCdbStdInOutThread.py
index 2acab89..4e94c31 100644
--- a/cCdbWrapper_fCdbStdInOutThread.py
+++ b/cCdbWrapper_fCdbStdInOutThread.py
@@ -44,6 +44,7 @@ def cCdbWrapper_fCdbStdInOutThread(oCdbWrapper):
       oJobObject.fSetMaxTotalMemoryUse(oCdbWrapper.uTotalMaxMemoryUse);
   else:
     oJobObject = None;
+  bState = 1
   # If we cannot apply memory limits, we'll fire an event. This should be done only once.
   bFailedToApplyApplicationMemoryLimitsEventFired = True;
   # We may want to reserve some memory, which we'll track using this variable
@@ -294,8 +295,13 @@ def cCdbWrapper_fCdbStdInOutThread(oCdbWrapper):
         sRunApplicationComment = "Starting UWP application %s" % oCdbWrapper.oUWPApplication.sPackageName;
       else:
         sRunApplicationComment = "Running application";
+      if bState == 2:
+        sCommand = "g%s;g%s" % (bHideLastExceptionFromApplication and "h" or "n", bHideLastExceptionFromApplication and "h" or "n")
+      else:
+        sCommand = "g%s;" % (bHideLastExceptionFromApplication and "h" or "n")
+      bState += 1
       asUnprocessedCdbOutput += oCdbWrapper.fasExecuteCdbCommand(
-        sCommand = "g%s;" % (bHideLastExceptionFromApplication and "h" or "n"),
+        sCommand = sCommand,
         sComment = sRunApplicationComment,
         bOutputIsInformative = True,
         bApplicationWillBeRun = True, # This command will cause the application to run.
diff --git a/dsDebuggingToolsPath_sISA.py b/dsDebuggingToolsPath_sISA.py
index f59ceaf..5b3585a 100644
--- a/dsDebuggingToolsPath_sISA.py
+++ b/dsDebuggingToolsPath_sISA.py
@@ -27,6 +27,7 @@ if oSystemInfo.sOSISA == "x64":
     os.path.join(sProgramFilesPath_x64, "Windows Kits", "8.1", "Debuggers", "x64"),
     os.path.join(sProgramFilesPath_x86, "Windows Kits", "10", "Debuggers", "x64"),
     os.path.join(sProgramFilesPath_x86, "Windows Kits", "8.1", "Debuggers", "x64"),
+    os.path.join(sProgramFilesPath_x64, "Debugging Tools for Windows (x64)"),
   ]);

 dsDebuggingToolsPath_sISA = {};

Now it goes further:

C:\Users\User\Desktop\BugId>C:\Python27-x64\python.exe BugId.py -v "C:\Program Files\Mozilla Firefox\firefox.exe" -- C:\Users\User\Desktop\crash3.html
* Command line: C:\Program Files\Mozilla Firefox\firefox.exe C:\Users\User\Desktop\crash3.html
stdout>
stdout>Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
stdout>Copyright (c) Microsoft Corporation. All rights reserved.
stdout>
stdout>CommandLine: "C:\Windows\system32\cmd.exe" /K "ECHO OFF"
stdout>Symbol search path is: cache*;srv*http://msdl.microsoft.com/download/symbols
stdout>Executable search path is:
stdout>ModLoad: 00000000`4a8a0000 00000000`4a8f8000   cmd.exe
stdout>ModLoad: 00000000`77860000 00000000`77a0b000   ntdll.dll
stdout>ModLoad: 00000000`77640000 00000000`7775f000   C:\Windows\system32\kernel32.dll
stdout>ModLoad: 000007fe`fd930000 000007fe`fd99b000   C:\Windows\system32\KERNELBASE.dll
stdout>ModLoad: 000007fe`fe010000 000007fe`fe0af000   C:\Windows\system32\msvcrt.dll
stdout>ModLoad: 000007fe`f4370000 000007fe`f4378000   C:\Windows\system32\WINBRAND.dll
stdout>ModLoad: 00000000`77760000 00000000`7785a000   C:\Windows\system32\USER32.dll
stdout>ModLoad: 000007fe`ffb00000 000007fe`ffb67000   C:\Windows\system32\GDI32.dll
stdout>ModLoad: 000007fe`fe990000 000007fe`fe99e000   C:\Windows\system32\LPK.dll
stdout>ModLoad: 000007fe`fe1d0000 000007fe`fe29a000   C:\Windows\system32\USP10.dll
stdout>(cb0.ab8): Break instruction exception - code 80000003 (first chance)
stdout>*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
stdout>ntdll!CsrSetPriorityClass+0x40:
stdout>00000000`77911220 cc              int     3
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .prompt_allow -dis -ea -reg -src -sym; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0
x3E; $$ Display only the prompt
stdout><☺[☻{
stdout>Allow the following information to be displayed at the prompt:
stdout>(Other settings can affect whether the information is actually displayed)
stdout>  None
stdout>Do not allow the following information to be displayed at the prompt:
stdout>   sym - Symbol for current instruction
stdout>   dis - Disassembly of current instruction
stdout>    ea - Effective address for current instruction
stdout>   reg - Register state
stdout>   src - Source info for current instruction
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .pcmd -s ".echo;"; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Output a CRL
F after running the application
stdout><☺[☻{
stdout>Set prompt command
stdout>Per-prompt command is '.echo;'
stdout>}☻]☺>
stdout>0:000>
<stdin<
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .lastevent; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get information abo
ut last event
stdout><☺[☻{
stdout>Last event: cb0.ab8: Break instruction exception - code 80000003 (first chance)
stdout>  debugger time: Thu Dec 21 14:19:03.722 2017 (GMT+0)
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ sxd *;sxi ld;sxi ud;sxd 0xC0000094;sxd 0xC0000095;sxd 0xC0000008;sxd 0xC0000235;sxd 0x80000
004;sxd 0x4000001E;sxd 0xE06D7363;sxd 0x40080201;sxd 0x40080202;sxe cpr;sxe ibp;sxe epr;sxe aph;sxe 0xC0000005;sxe 0xC0000420;sxe 0x80000003;sxe 0xC000008C;sxe
0x80000002;sxe 0xC0000602;sxe 0x80000001;sxe 0xC000001D;sxe 0xC0000006;sxe 0xC0000096;sxe 0xC0000409;sxe 0xC00000FD;sxe 0x4000001F;sxe 0x80000007; }; .printf "%
c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Setup exception handling
stdout><☺[☻{
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .attach -b 0xD00; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Attach to pro
cess 3328
stdout><☺[☻{
stdout>Attach will occur on next execution
stdout>}☻]☺>
stdout>0:000>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .time; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get debugger time
stdout><☺[☻{
stdout>Debug session time: Thu Dec 21 14:19:03.862 2017 (GMT+0)
stdout>System Uptime: 0 days 0:12:16.272
stdout>Process Uptime: 0 days 0:00:00.156
stdout>  Kernel time: 0 days 0:00:00.015
stdout>  User time: 0 days 0:00:00.000
stdout>}☻]☺>
stdout>0:000>
<stdin<gn;
stdout>*** wait with pending attach
stdout>Symbol search path is: cache*;srv*http://msdl.microsoft.com/download/symbols
stdout>Executable search path is:
stdout>
stdout>1:001>
<stdin<
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .lastevent; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get information abo
ut last event
stdout><☺[☻{
stdout>Last event: d00.cd4: Create process 1:d00
stdout>  debugger time: Thu Dec 21 14:19:03.878 2017 (GMT+0)
stdout>}☻]☺>
stdout>1:001>
+ Main process 3328/0xD00 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" C:\Users\User\Desktop\crash3.html.
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .childdbg 1; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Debug child proces
ses
stdout><☺[☻{
stdout>Processes created by the current process will be debugged
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ ~*m; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Resume all threads
stdout><☺[☻{
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ lmov a 0x13F080000; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get module
information
stdout><☺[☻{
stdout>start             end                 module name
stdout>00000001`3f080000 00000001`3f0f3000   firefox    (deferred)
stdout>    Image path: firefox.exe
stdout>    Image name: firefox.exe
stdout>    Timestamp:        Wed Dec 06 19:37:35 2017 (5A2846FF)
stdout>    CheckSum:         000788A8
stdout>    ImageSize:        00073000
stdout>    File version:     57.0.2.6549
stdout>    Product version:  57.0.2.0
stdout>    File flags:       0 (Mask 3F)
stdout>    File OS:          4 Unknown Win32
stdout>    File type:        2.0 Dll
stdout>    File date:        00000000.00000000
stdout>    Translations:     0000.04b0
stdout>    CompanyName:      Mozilla Corporation
stdout>    ProductName:      Firefox
stdout>    InternalName:     Firefox
stdout>    OriginalFilename: firefox.exe
stdout>    ProductVersion:   57.0.2
stdout>    FileVersion:      57.0.2
stdout>    FileDescription:  Firefox
stdout>    LegalCopyright:   ¬Firefox and Mozilla Developers; available under the MPL 2 license.
stdout>    LegalTrademarks:  Firefox is a Trademark of The Mozilla Foundation.
stdout>    Comments:         Firefox is a Trademark of The Mozilla Foundation.
stdout>}☻]☺>
stdout>1:001>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ .time; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get debugger time
stdout><☺[☻{
stdout>Debug session time: Thu Dec 21 14:19:04.003 2017 (GMT+0)
stdout>System Uptime: 0 days 0:12:16.413
stdout>Process Uptime: 0 days 0:00:00.156
stdout>  Kernel time: 0 days 0:00:00.000
stdout>  User time: 0 days 0:00:00.000
stdout>}☻]☺>
stdout>1:001>
<stdin<gh;gh
stdout>(d00.cd4): Break instruction exception - code 80000003 (first chance)
stdout>[JavaScript Warning: "Unknown pseudo-class or pseudo-element '-moz-tree-line'.  Ruleset ignored due to bad selector." {file: "chrome://global/content/xul
.css" line: 662}]
stdout>[JavaScript Warning: "Unknown property 'column-break-before'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
stdout>[JavaScript Warning: "Error in parsing value for 'font-variant'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
stdout>[JavaScript Warning: "Unknown property 'cellspacing'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
[...]
stdout>(d00.cd4): Access violation - code c0000005 (first chance)
stdout>First chance exceptions are reported before any exception handling.
stdout>This exception may be expected and handled.
stdout>
stdout>1:001>
<stdin<

At least here Firefox's window is displayed and the page is loaded. I can see it was loaded successfully in BugId output too (more precisely cdb output) as there are plenty JavaScript warnings that we didn't have before. Also it looks like it reached the exception for the crash but just didn't do anything (see test 3 below). Note that it may be due to the bad patch I did and I may miss something.

Test 3 (cdb / no BugId)

This is a test with cdb only to show it triggers a crash and cdb alone is able to catch it.

C:\Users\User>"C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe" "C:\Program Files\Mozilla Firefox\firefox.exe" C:\Users\User\Desktop\crash3.html

Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: "C:\Program Files\Mozilla Firefox\firefox.exe" C:\Users\User\Desktop\crash3.html
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00000001`3ffb0000 00000001`40023000   firefox.exe
ModLoad: 00000000`77860000 00000000`77a0b000   ntdll.dll
ModLoad: 00000000`77640000 00000000`7775f000   C:\Windows\system32\kernel32.dll
ModLoad: 000007fe`fd930000 000007fe`fd99b000   C:\Windows\system32\KERNELBASE.dll
ModLoad: 000007fe`f8d30000 000007fe`f8d5d000   C:\Program Files\Mozilla Firefox\mozglue.dll
ModLoad: 000007fe`f2ca0000 000007fe`f2dc5000   C:\Windows\system32\dbghelp.dll
ModLoad: 000007fe`fe010000 000007fe`fe0af000   C:\Windows\system32\msvcrt.dll
ModLoad: 000007fe`fc920000 000007fe`fc92c000   C:\Windows\system32\VERSION.dll
ModLoad: 000007fe`f5180000 000007fe`f521d000   C:\Program Files\Mozilla Firefox\MSVCP140.dll
ModLoad: 000007fe`f8d70000 000007fe`f8d87000   C:\Program Files\Mozilla Firefox\VCRUNTIME140.dll
ModLoad: 000007fe`f9270000 000007fe`f9274000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-runtime-l1-1-0.dll
ModLoad: 000007fe`f3150000 000007fe`f3245000   C:\Program Files\Mozilla Firefox\ucrtbase.DLL
ModLoad: 000007fe`f8d60000 000007fe`f8d63000   C:\Program Files\Mozilla Firefox\api-ms-win-core-timezone-l1-1-0.dll
ModLoad: 000007fe`f8d10000 000007fe`f8d13000   C:\Program Files\Mozilla Firefox\api-ms-win-core-file-l2-1-0.dll
ModLoad: 000007fe`f8d20000 000007fe`f8d23000   C:\Program Files\Mozilla Firefox\api-ms-win-core-localization-l1-2-0.dll
ModLoad: 000007fe`f8cf0000 000007fe`f8cf3000   C:\Program Files\Mozilla Firefox\api-ms-win-core-synch-l1-2-0.dll
ModLoad: 000007fe`f8d00000 000007fe`f8d03000   C:\Program Files\Mozilla Firefox\api-ms-win-core-processthreads-l1-1-1.dll
ModLoad: 000007fe`f6340000 000007fe`f6343000   C:\Program Files\Mozilla Firefox\api-ms-win-core-file-l1-2-0.dll
ModLoad: 000007fe`f6d30000 000007fe`f6d34000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-string-l1-1-0.dll
ModLoad: 000007fe`f6320000 000007fe`f6323000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-heap-l1-1-0.dll
ModLoad: 000007fe`f6330000 000007fe`f6334000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-stdio-l1-1-0.dll
ModLoad: 000007fe`f6300000 000007fe`f6304000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-convert-l1-1-0.dll
ModLoad: 000007fe`f6310000 000007fe`f6313000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-locale-l1-1-0.dll
ModLoad: 000007fe`f62e0000 000007fe`f62e5000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-math-l1-1-0.dll
ModLoad: 000007fe`f62f0000 000007fe`f62f5000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-multibyte-l1-1-0.dll
ModLoad: 000007fe`f5170000 000007fe`f5173000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-time-l1-1-0.dll
ModLoad: 000007fe`f5490000 000007fe`f5493000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-filesystem-l1-1-0.dll
ModLoad: 000007fe`f5160000 000007fe`f5163000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-environment-l1-1-0.dll
ModLoad: 000007fe`f5150000 000007fe`f5153000   C:\Program Files\Mozilla Firefox\api-ms-win-crt-utility-l1-1-0.dll
ModLoad: 000007fe`ffa20000 000007fe`ffafb000   C:\Windows\system32\ADVAPI32.dll
ModLoad: 000007fe`ffa00000 000007fe`ffa1f000   C:\Windows\SYSTEM32\sechost.dll
ModLoad: 000007fe`fe2a0000 000007fe`fe3ce000   C:\Windows\system32\RPCRT4.dll
(ed8.edc): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!CsrSetPriorityClass+0x40:
00000000`77911220 cc              int     3
0:000> g
ModLoad: 000007fe`f2ee0000 000007fe`f3059000   C:\Program Files\Mozilla Firefox\nss3.dll
ModLoad: 000007fe`f90a0000 000007fe`f90db000   C:\Windows\system32\WINMM.dll
ModLoad: 00000000`77760000 00000000`7785a000   C:\Windows\system32\USER32.dll
ModLoad: 000007fe`ffb00000 000007fe`ffb67000   C:\Windows\system32\GDI32.dll
ModLoad: 000007fe`fe990000 000007fe`fe99e000   C:\Windows\system32\LPK.dll
ModLoad: 000007fe`fe1d0000 000007fe`fe29a000   C:\Windows\system32\USP10.dll
ModLoad: 000007fe`f77e0000 000007fe`f77e9000   C:\Windows\system32\WSOCK32.dll
ModLoad: 000007fe`fe500000 000007fe`fe54d000   C:\Windows\system32\WS2_32.dll
ModLoad: 000007fe`feb80000 000007fe`feb88000   C:\Windows\system32\NSI.dll
ModLoad: 000007fe`feb50000 000007fe`feb7e000   C:\Windows\system32\IMM32.DLL
ModLoad: 000007fe`fe3d0000 000007fe`fe4d9000   C:\Windows\system32\MSCTF.dll
ModLoad: 000007fe`f2e20000 000007fe`f2ed2000   C:\Program Files\Mozilla Firefox\lgpllibs.dll
ModLoad: 000007fe`e87c0000 000007fe`ecbfa000   C:\Program Files\Mozilla Firefox\xul.dll
ModLoad: 000007fe`fec70000 000007fe`ff9f6000   C:\Windows\system32\SHELL32.dll
ModLoad: 000007fe`fe0b0000 000007fe`fe121000   C:\Windows\system32\SHLWAPI.dll
ModLoad: 000007fe`fbb90000 000007fe`fbb9b000   C:\Windows\system32\HID.DLL
ModLoad: 000007fe`fc740000 000007fe`fc749000   C:\Windows\system32\AVRT.dll
ModLoad: 000007fe`fde00000 000007fe`fe001000   C:\Windows\system32\ole32.dll
ModLoad: 000007fe`f6d40000 000007fe`f6d47000   C:\Windows\system32\MSIMG32.dll
ModLoad: 000007fe`fb510000 000007fe`fb537000   C:\Windows\system32\IPHLPAPI.DLL
ModLoad: 000007fe`fb4f0000 000007fe`fb4fb000   C:\Windows\system32\WINNSI.DLL
ModLoad: 000007fe`fda20000 000007fe`fdb86000   C:\Windows\system32\CRYPT32.dll
ModLoad: 000007fe`fd860000 000007fe`fd86f000   C:\Windows\system32\MSASN1.dll
ModLoad: 000007fe`fbb70000 000007fe`fbb88000   C:\Windows\system32\dwmapi.dll
ModLoad: 000007fe`fbf50000 000007fe`fbfa6000   C:\Windows\system32\UxTheme.dll
ModLoad: 000007fe`fe7b0000 000007fe`fe987000   C:\Windows\system32\SETUPAPI.dll
ModLoad: 000007fe`fd9e0000 000007fe`fda16000   C:\Windows\system32\CFGMGR32.dll
ModLoad: 000007fe`feb90000 000007fe`fec67000   C:\Windows\system32\OLEAUT32.dll
ModLoad: 000007fe`fd870000 000007fe`fd88a000   C:\Windows\system32\DEVOBJ.dll
ModLoad: 000007fe`fd9a0000 000007fe`fd9d9000   C:\Windows\system32\WINTRUST.dll
ModLoad: 000007fe`fb580000 000007fe`fb591000   C:\Windows\system32\WTSAPI32.dll
ModLoad: 000007fe`fb9d0000 000007fe`fb9fd000   C:\Windows\system32\ntmarta.dll
ModLoad: 000007fe`fdb90000 000007fe`fdbe0000   C:\Windows\system32\WLDAP32.dll
ModLoad: 000007fe`f5140000 000007fe`f5144000   C:\Windows\system32\KBDUK.DLL
ModLoad: 000007fe`fd6f0000 000007fe`fd6ff000   C:\Windows\system32\CRYPTBASE.dll
ModLoad: 000007fe`f2b20000 000007fe`f2c9b000   C:\Windows\system32\dwrite.dll
ModLoad: 000007fe`fe130000 000007fe`fe1c9000   C:\Windows\system32\CLBCatQ.DLL
ModLoad: 000007fe`fce30000 000007fe`fce8b000   C:\Windows\system32\Dnsapi.dll
ModLoad: 000007fe`fb830000 000007fe`fb845000   C:\Windows\system32\NLAapi.dll
ModLoad: 000007fe`fcfb0000 000007fe`fd004000   C:\Windows\System32\mswsock.dll
ModLoad: 000007fe`f7730000 000007fe`f773b000   C:\Windows\System32\winrnr.dll
ModLoad: 000007fe`f76c0000 000007fe`f76d5000   C:\Windows\system32\napinsp.dll
ModLoad: 000007fe`f76a0000 000007fe`f76b9000   C:\Windows\system32\pnrpnsp.dll
ModLoad: 000007fe`f7690000 000007fe`f76a0000   C:\Windows\system32\wshbth.dll
ModLoad: 000007fe`fc9f0000 000007fe`fc9f7000   C:\Windows\System32\wshtcpip.dll
ModLoad: 000007fe`fb380000 000007fe`fb398000   C:\Windows\system32\dhcpcsvc.DLL
ModLoad: 000007fe`f9dc0000 000007fe`f9dcf000   C:\Windows\system32\wbem\wbemprox.dll
ModLoad: 000007fe`fa1b0000 000007fe`fa236000   C:\Windows\system32\wbemcomn.dll
ModLoad: 000007fe`fd180000 000007fe`fd197000   C:\Windows\system32\CRYPTSP.dll
ModLoad: 000007fe`fcd50000 000007fe`fcd97000   C:\Windows\system32\rsaenh.dll
ModLoad: 000007fe`fd7a0000 000007fe`fd7b4000   C:\Windows\system32\RpcRtRemote.dll
ModLoad: 000007fe`f9780000 000007fe`f9794000   C:\Windows\system32\wbem\wbemsvc.dll
ModLoad: 000007fe`f9e00000 000007fe`f9ee2000   C:\Windows\system32\wbem\fastprox.dll
ModLoad: 000007fe`f9dd0000 000007fe`f9df7000   C:\Windows\system32\NTDSAPI.dll
ModLoad: 000007fe`fd7c0000 000007fe`fd7cf000   C:\Windows\system32\profapi.dll
ModLoad: 000007fe`f30e0000 000007fe`f314f000   C:\Windows\System32\Wpc.dll
ModLoad: 000007fe`fcb00000 000007fe`fcb1e000   C:\Windows\System32\USERENV.dll
ModLoad: 000007fe`fd260000 000007fe`fd2cd000   C:\Windows\System32\wevtapi.dll
ModLoad: 000007fe`fafd0000 000007fe`fafe4000   C:\Windows\system32\samcli.dll
ModLoad: 000007fe`fc720000 000007fe`fc73d000   C:\Windows\system32\SAMLIB.dll
ModLoad: 000007fe`fb1c0000 000007fe`fb1cc000   C:\Windows\system32\netutils.dll
ModLoad: 000007fe`f7c40000 000007fe`f7ce7000   C:\Windows\system32\dxgi.dll
ModLoad: 000007fe`f2a80000 000007fe`f2b1c000   C:\Windows\system32\mscms.dll
ModLoad: 000007fe`fd620000 000007fe`fd65d000   C:\Windows\system32\WINSTA.dll
ModLoad: 000007fe`fc130000 000007fe`fc17b000   C:\Windows\System32\MMDevApi.dll
ModLoad: 000007fe`fc000000 000007fe`fc12c000   C:\Windows\System32\PROPSYS.dll
ModLoad: 000007fe`f8a40000 000007fe`f8a8f000   C:\Windows\system32\AUDIOSES.DLL
[JavaScript Warning: "Unknown pseudo-class or pseudo-element '-moz-tree-line'.  Ruleset ignored due to bad selector." {file: "chrome://global/content/xul.css" l
ine: 662}]
ModLoad: 000007fe`f7800000 000007fe`f79ca000   C:\Windows\system32\explorerframe.dll
ModLoad: 000007fe`fbbe0000 000007fe`fbc23000   C:\Windows\system32\DUser.dll
ModLoad: 000007fe`fbc30000 000007fe`fbd22000   C:\Windows\system32\DUI70.dll
ModLoad: 000007fe`f35a0000 000007fe`f35cf000   C:\Program Files\Mozilla Firefox\softokn3.dll
ModLoad: 000007fe`f5130000 000007fe`f514f000   C:\Program Files\Mozilla Firefox\nssdbm3.dll
ModLoad: 000007fe`f2770000 000007fe`f27e6000   C:\Program Files\Mozilla Firefox\freebl3.dll
ModLoad: 000007fe`f26f0000 000007fe`f2764000   C:\Program Files\Mozilla Firefox\nssckbi.dll
ModLoad: 000007fe`fe9a0000 000007fe`feaca000   C:\Windows\system32\WININET.dll
ModLoad: 00000000`77a30000 00000000`77a33000   C:\Windows\system32\Normaliz.dll
ModLoad: 000007fe`fdc80000 000007fe`fddf8000   C:\Windows\system32\urlmon.dll
ModLoad: 000007fe`fe550000 000007fe`fe7a8000   C:\Windows\system32\iertutil.dll
ModLoad: 000007fe`fc230000 000007fe`fc424000   C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_fa645303170382f6\c
omctl32.dll
ModLoad: 000007fe`fd660000 000007fe`fd685000   C:\Windows\system32\SspiCli.dll
ModLoad: 000007fe`f54d0000 000007fe`f5532000   C:\Windows\system32\RASAPI32.dll
ModLoad: 000007fe`f54b0000 000007fe`f54cc000   C:\Windows\system32\rasman.dll
ModLoad: 000007fe`fae70000 000007fe`fae81000   C:\Windows\system32\rtutils.dll
ModLoad: 000007fe`f3590000 000007fe`f3599000   C:\Windows\system32\sensapi.dll
ModLoad: 000007fe`fcfa0000 000007fe`fcfa7000   C:\Windows\System32\wship6.dll
ModLoad: 000007fe`f9a90000 000007fe`f9a98000   C:\Windows\system32\rasadhlp.dll
[JavaScript Warning: "Unknown property 'column-break-before'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
[JavaScript Warning: "Error in parsing value for 'font-variant'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
[JavaScript Warning: "Unknown property 'cellspacing'.  Declaration dropped." {file: "file:///C:/Users/User/Desktop/crash3.html" line: 6}]
[...]
(ed8.edc): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Mozilla Firefox\xul.dll -
xul+0x51665c:
000007fe`e8cd665c 488b4120        mov     rax,qword ptr [rcx+20h] ds:00000000`00000020=????????????????
0:000>
SkyLined commented 6 years ago

This is very odd; from the first output, it appears that BugId is sending an empty line to cdb.exe after cdb.exe reported a breakpoint exception. This should cause cdb.exe to print a "clean" prompt, but BugId appears to be hung waiting for this prompt.

<stdin<gh; Starts the newly attached firefox.exe process. stdout>(9a4.b7c): Break instruction exception - code 80000003 (first chance) stdout> cdb.exe is reporting a breakpoint in this firefox.exe process. stdout>1:001> <stdin< cdb.exe is showing a prompt and BugId is sending an empty line to get cdb.exe to print another prompt. Obviously that never happens and I have no idea why not. I also cannot reproduce this behavior at all.

It does appear that you have a very old version of Windows Debugging Tools: Version 6.11.0001.404, whereas I am testing with 10.0.15063.468. Can you see if updating to the latest fixes this?

saidelike commented 6 years ago

Thanks for the feedback. So I confirmed that:

So I guess it is a problem with Windows 7...

SkyLined commented 6 years ago

Alright, I'll set up a Win7 VM for testing. I was going to set up a VM specifically for testing all "supported" keyword applications before I release new versions, I might as well create a few VMs for various windows versions and Debugging Tools.

ea commented 6 years ago

if it helps in any way, i went back a couple of releases and last working version (for me at least) was 2d222805fd314457d882a921f08e37fc2fcc70a8 from 1st of November.

Couldn't really pin point which change causes this trouble. Cheers!

ea commented 6 years ago

Forgot to add, same environment as @saidelike , win7 with latest debugging tools (10.0.16299.91 )

SkyLined commented 6 years ago

Just to let you know that I have not forgotten about this issue; I've focused on other improvements to BugId (I hope to release the dev channel to stable soon). Compatibility with older versions of Windows is not a priority for me personally, but I would like to make sure it works for as many people on as many systems as possible.

SkyLined commented 6 years ago

The root cause is that cdb.exe for some unknown reason stops responding to commands send by BugId after a breakpoint has interrupted the application. cdb.exe will report the breakpoint and show its command prompt and BugId will detect that and send a command for cdb to execute (e.g. .lastevent). Unfortunately, cdb.exe does not respond to any command anymore at that point. I have tried various ways to getting it to respond or avoiding this situation, but have been unsuccessful.

Unfortunately I have no idea why this is and cannot debug it because I do not have cdb.exe source. Another good reason to move away from using Debugging Tools for Windows as soon as that is possible :(

saidelike commented 6 years ago

Thanks for checking. Ya moving away from Debugging Tools for Windows is the solution/workaround for that.