SkyLined / BugId

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

Firefox hangs? #88

Closed aleks-zer0 closed 5 years ago

aleks-zer0 commented 5 years ago

Hi again. I've been using your setup from Fuzz in sixty seconds tutorial for the past two months successfully on firefox. Yesterday after updating BugId to laters ver, it just hangs at "Loading test 0" tab caption and never continue loading remaining .html tests. This is console output: firefox_error What am i doing wrong here? Did something significant got changed in the latest revision and i somehow missed it? Btw, i'm using Win 10 Pro x64 - v1803.

SkyLined commented 5 years ago

Hi,

That sounds like a problem with the fuzzer and not BugId but since I do not have a bug tracker for that, let's try to solve it here.

Unfortunately, that screenshot shows two lines of debug output from JavaScript running in Firefox; this does not provide me with information that might relate to your issue, so I cannot help you solve your problem with the information given.

You mentioned you updated to the latest version; what version of BugId are you using exactly? Please run BugId.py --version and copy+paste the output here. That would allow me to test with the same version.

If you want to make sure the problem is not in BugId you should use a release version and not the latest main branch. I frequently commit breaking changes to the main branch (and sometimes broken code) without any explicit warning. It only makes sense to use the latest main branch directly if you are developing BugId, testing a specific bug fix or want to try a new feature that's not in release yet.

aleks-zer0 commented 5 years ago

Thanks for responding. --version output is:

- Version check for mFileSystem failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for mMultiThreading failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for mDebugOutput failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for cBugId failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for mWindowsAPI failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for BugId failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for mProductDetails failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
- Version check for oConsole failed: latest product details JSON file from repository root contains an unexpected value u'oTrialPeriodDuration'=u'1m'
┌─ Version information ───────────────────────────────────────────────────────────────────────────────────────────────
│ ∙ BugId version: 2018-11-21 19:42 installed at G:\Fuzzing\BugId.
│ ∙ mFileSystem version: 2018-11-21 16:22 installed at G:\Fuzzing\BugId\modules\mFileSystem.
│ ∙ mMultiThreading version: 2018-11-21 16:22 installed at G:\Fuzzing\BugId\modules\mMultiThreading.
│ ∙ mDebugOutput version: 2018-11-06 17:00 installed at G:\Fuzzing\BugId\modules\mDebugOutput.
│ ∙ cBugId version: 2018-11-21 16:38 installed at G:\Fuzzing\BugId\modules\cBugId.
│ ∙ mWindowsAPI version: 2018-11-21 16:15 installed at G:\Fuzzing\BugId\modules\mWindowsAPI.
│ ∙ mProductDetails version: 2018-11-20 16:53 installed at G:\Fuzzing\BugId\modules\mProductDetails.
│ ∙ oConsole version: 2018-11-21 16:22 installed at G:\Fuzzing\BugId\modules\oConsole.
│ ∙ Windows version: Windows 10 Pro release 1803, build 17134 x64.
│ ∙ Python version: 2.7.15 x64.

I have a bugid license and these unexpected values are somehow tied to that i guess? Also, here is the complete console output when firefox hangs at "loading test 0":

... # Generates samples using domato: ...
Writing a sample to G:\Fuzzing\Tests\fuzz-98.html
Writing a sample to G:\Fuzzing\Tests\fuzz-99.html
# And then it starts:
* Command line: C:\Program Files\Mozilla Firefox\firefox.exe --no-remote -profile C:\Users\Alex\AppData\Local\Temp\FIREFO~1 file://G:\Fuzzing\Tests\index.html
+ Main process 6908/0x1AFC (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" --no-remote -profile C:\Users\Alex\AppData\Local\Temp\FIREFO~1 file://G:\Fuzzing\Tests\index.html.
* Main process 6908/0x1AFC (firefox.exe): debug\u25001547299465009      addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/
* Main process 6908/0x1AFC (firefox.exe): debug\u25001547299465077      addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader*
+ Sub process 6964/0x1B34 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.0.1033624508\1150141059" -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - "C:\Users\Alex\AppData\Local\Temp" 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 1976 gpu.
+ Sub process 14104/0x3718 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.6.115331357\803532010" -childID 1 -isForBrowser -prefsHandle 2744 -prefMapHandle 2740 -prefsLen 1 -prefMapSize 174502 -schedulerPrefs 0001,2 -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 2596 tab.
* Sub process 14104/0x3718 (firefox.exe): debug\u2500Could not map contract ID '@mozilla.org/widget/printdialog-service;1' to CID {06beec76-a183-4d9f-85dd-085f26da565a} because no implementation of the CID is registered.
+ Sub process 668/0x29C (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.13.903945806\723659130" -childID 2 -isForBrowser -prefsHandle 2596 -prefMapHandle 2772 -prefsLen 1 -prefMapSize 174502 -schedulerPrefs 0001,2 -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 2504 tab.
+ Sub process 12736/0x31C0 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.20.1655892105\1884748786" -childID 3 -isForBrowser -prefsHandle 2880 -prefMapHandle 2864 -prefsLen 41 -prefMapSize 174502 -schedulerPrefs 0001,2 -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 2852 tab.
* Sub process 668/0x29C (firefox.exe): debug\u2500Could not map contract ID '@mozilla.org/widget/printdialog-service;1' to CID {06beec76-a183-4d9f-85dd-085f26da565a} because no implementation of the CID is registered.
* Sub process 12736/0x31C0 (firefox.exe): debug\u2500Could not map contract ID '@mozilla.org/widget/printdialog-service;1' to CID {06beec76-a183-4d9f-85dd-085f26da565a} because no implementation of the CID is registered.
+ Sub process 8464/0x2110 (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.27.589002677\2044642385" -childID 4 -isForBrowser -prefsHandle 3728 -prefMapHandle 3732 -prefsLen 6628 -prefMapSize 174502 -schedulerPrefs 0001,2 -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 3740 tab.
* Sub process 14104/0x3718 (firefox.exe): debug\u2500[JavaScript Warning: "Content Security Policy: Directive æchild-srcÆ has been deprecated. Please use directive æworker-srcÆ to control workers, or directive æframe-srcÆ to control frames respectively."]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Content Security Policy: Directive æchild-srcÆ has been deprecated. Please use directive æworker-srcÆ to control workers, or directive æframe-srcÆ to control frames respectively."]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500Could not map contract ID '@mozilla.org/widget/printdialog-service;1' to CID {06beec76-a183-4d9f-85dd-085f26da565a} because no implementation of the CID is registered.
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "file:///G:/Fuzzing/Tests/index.html" line: 0}]
* Sub process 8464/0x2110 (firefox.exe): debug┬[JavaScript Error: "SecurityError: Permission denied to access property "addEventListener" on cross-origin object" {file: "file:///G:/Fuzzing/Tests/index.html" line: 18}]
                                              └fLoadNext@file:///G:/Fuzzing/Tests/index.html:18:9
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "file:///G:/Fuzzing/Tests/index.html" line: 0}]
* Main process 6908/0x1AFC (firefox.exe): debug┬[JavaScript Error: "SecurityError: Permission denied to access property "addEventListener" on cross-origin object" {file: "file:///G:/Fuzzing/Tests/index.html" line: 18}]
                                               └fLoadNext@file:///G:/Fuzzing/Tests/index.html:18:9
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener" {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 280}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Request for fullscreen was denied because Element.requestFullscreen() was not called from inside a short running user-generated event handler." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 644}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Keyframe property value ô0ö is invalid according to the syntax for ôcursorö." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 777}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Keyframe property value ô0ö is invalid according to the syntax for ôcursorö." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 777}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because Pointer Lock API is restricted via sandbox." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1001}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener" {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 280}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1817}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Use of releaseEvents() is deprecated. To upgrade your code, use the DOM 2 removeEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener" {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1833}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value 0 0 -1 parsing y attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1615}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value 0 0 -1 parsing y attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1615}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because the requesting element is not in a document." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2511}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because the requesting element is not in a document." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2511}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value none parsing fill attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2036}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 644}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 3141}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 3141}]
* Sub process 8464/0x2110 (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2227}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Request for fullscreen was denied because Element.requestFullscreen() was not called from inside a short running user-generated event handler." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 644}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Keyframe property value ô0ö is invalid according to the syntax for ôcursorö." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 777}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Keyframe property value ô0ö is invalid according to the syntax for ôcursorö." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 777}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because Pointer Lock API is restricted via sandbox." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1001}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1817}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Use of releaseEvents() is deprecated. To upgrade your code, use the DOM 2 removeEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener" {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1833}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value 0 0 -1 parsing y attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1615}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value 0 0 -1 parsing y attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 1615}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because the requesting element is not in a document." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2511}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Request for pointer lock was denied because the requesting element is not in a document." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2511}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Warning: "Unexpected value none parsing fill attribute." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2036}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 644}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 3141}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 3141}]
* Main process 6908/0x1AFC (firefox.exe): debug\u2500[JavaScript Error: "TypeError: The expression cannot be converted to return the specified type." {file: "file:///G:/Fuzzing/Tests/fuzz-1.html" line: 2227}]
+ Sub process 11772/0x2DFC (firefox.exe): Attached; command line = "C:\Program Files\Mozilla Firefox\firefox.exe" -contentproc --channel="6908.34.1719313363\216006695" -childID 5 -isForBrowser -prefsHandle 4400 -prefMapHandle 4416 -prefsLen 7279 -prefMapSize 174502 -schedulerPrefs 0001,2 -parentBuildID 20190108160530 -greomni "C:\Program Files\Mozilla Firefox\omni.ja" -appomni "C:\Program Files\Mozilla Firefox\browser\omni.ja" -appdir "C:\Program Files\Mozilla Firefox\browser" - 6908 "\\.\pipe\gecko-crash-server-pipe.6908" 3960 tab.
* Sub process 11772/0x2DFC (firefox.exe): debug\u2500Could not map contract ID '@mozilla.org/widget/printdialog-service;1' to CID {06beec76-a183-4d9f-85dd-085f26da565a} because no implementation of the CID is registered.
* Main process 6908/0x1AFC (firefox.exe): debug┬[JavaScript Error: "InvalidStateError: A mutation operation was attempted on a database that did not allow mutations."]
                                               │transaction@resource://gre/modules/IndexedDB.jsm:349:39
                                               │objectStore@resource://gre/modules/IndexedDB.jsm:377:23
                                               │getStore@resource://normandy/lib/AddonStudies.jsm:82:10
                                               └getAll@resource://normandy/lib/AddonStudies.jsm:204:12
* Main process 6908/0x1AFC (firefox.exe): debug┬[JavaScript Error: "InvalidStateError: A mutation operation was attempted on a database that did not allow mutations."]
                                               │transaction@resource://gre/modules/IndexedDB.jsm:349:39
                                               │objectStore@resource://gre/modules/IndexedDB.jsm:377:23
                                               │getStore@resource://normandy/lib/AddonStudies.jsm:82:10
                                               └getAll@resource://normandy/lib/AddonStudies.jsm:204:12
* The application is running...

I don't think that the issue is in fuzzer because it works with chrome like it worked before with firefox 😕

aleks-zer0 commented 5 years ago

No any ideas?

SkyLined commented 5 years ago

Sorry, last week was my first week working at Intel, so I haven't had time to look at this yet.

I've made some changes to BugId that are not yet in the release version, which is why you are seeing the latest product details JSON file from repository root contains an unexpected value-errors. That is nothing to worry about and shouldn't affect anything but the latest version check.

Once I've settled in at Intel I'll set up a clean VM and test if I can reproduce the issue. It may be another week before I find some time though. I apologize for these delays; I try to handle issues asap.

SkyLined commented 5 years ago

I released a new version but did not have time to check if it fixes this issue. Please let me know if you still experience this issue with the latest version.

aninax commented 5 years ago

Hi, I am experiencing same issue with Firefox, and Edge with new BugId version. IE is working ok.

SkyLined commented 5 years ago

So I finally had some time to look at this and it turns out to be quite simple and easy to fix. The problem was in the index.html file that facilitates loading all the fuzzed files. It attempted to call addEventListener on the window object of an iframe. Some browsers treat pages loaded from different files on the local file system as being in different origins. This causes that call to throw an exception, which stopped the index.html file from loading the fuzzed files.

The fix was to wrap the addEventListener call in a try ... catch block to catch and ignore the exception. I have updated the blog post. The new index.html file can be downloaded here.

SkyLined commented 5 years ago

FYI This was the line that reported the underlying issue:

* Sub process 8464/0x2110 (firefox.exe): debug┬[JavaScript Error: "SecurityError: Permission denied to access property "addEventListener" on cross-origin object" {file: "file:///G:/Fuzzing/Tests/index.html" line: 18}]
                                              └fLoadNext@file:///G:/Fuzzing/Tests/index.html:18:9