SkyLined / BugId

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

CDB error when using BugID #97

Closed ethanhunnt closed 3 years ago

ethanhunnt commented 4 years ago

I am using Windows Server 2016 as a AWS VM and am using BugID to analyze crashes on browsers that are triggered by a fuzzer. However for some reason when doing that it seems that BugID crashes after a few runs. Below is the error information generated by BugID

Sub process 908/0x38C (edge.exe): Terminated. ┌─ An internal exception has occured ────────────────────────────────────────────────────────────────────────────────── │ KeyError('deferred',) │ │ Stack: │ 0 bSymbolsAvailable @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cModule.py/60 │ > }[oModule.sSymbolStatus]; │ 1 foCreate @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cStack.py/205 │ > elif oModule and not oModule.bSymbolsAvailable and uTryCount < dxConfig["uMaxSymbolLoadingRetries"]: │ 2 oStack @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cBugReport.py/93 │ > oBugReport.oStack = cStack.foCreate(oBugReport.oProcess, oBugReport.oWindowsAPIThread, oBugReport.uStackFramesCount); │ 3 fbApplyToBugReport @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\BugTranslations\cBugTranslation.py/98 │ > if oBugReport.oStack.fbTopFramesMatchSymbols(asAdditionalIrrelevantStackFrameSymbols, \ │ 4 fApplyBugTranslationsToBugReport @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\BugTranslations\fApplyBugTranslationsToBugReport.py/53 │ > if oBugTranslation.fbApplyToBugReport(oBugReport): │ 5 foCreateForException @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cBugReport.py/124 │ > fApplyBugTranslationsToBugReport(oBugReport); │ 6 cCdbWrapper_fCdbStdInOutHelperThread @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cCdbWrapper_fCdbStdInOutHelperThread.py/409 │ > oException, │ 7 fCdbStdInOutHelperThread @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cCdbWrapper.py/397 │ > return cCdbWrapper_fCdbStdInOutHelperThread(oCdbWrapper); │ 8 __fRun @ C:\Users\Administrator\Desktop\Fuzzing_edge\BugId\modules\cBugId\cHelperThread.py/67 │ > oSelf.fActivity(*oSelf.axActivityArguments); └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Please report the above details at the below web-page so it can be addressed: https://github.com/SkyLined/BugId/issues/new If you do not have a github account, or you want to report this issue privately, you can also send an email to: BugId@skylined.nl

In your report, please copy the information about the exception reported above, as well as the stack trace and BugId version information. This makes it easier to determine the cause of this issue and makes for faster fixes.

If you can reproduce the issue, it would help a lot if you can run BugId in verbose mode by adding the --verbose command-line argument. as in: BugId -v C:\Program Files (x86)\Microsoft\Edge\Application\edge.exe --sReportFolderPath="C:\Users\Administrator\Desktop\Fuzzing_edge\Report" --nApplicationMaxRunTimeInSeconds=96 -- file://C:\Users\Administrator\Desktop\Fuzzing_edge\Tests\index.html

┌─ Version information ──────────────────────────────────────────────────────────────────────────────────────────────── │ ∙ BugId version: 2020-07-02 21:18 (in trial period). │ ∙ mFileSystem2 version: 2020-06-17 16:26. │ ∙ mWindowsAPI version: 2020-06-17 16:03. │ ∙ cBugId version: 2020-06-17 22:45 (in trial period). │ ∙ mWindowsSDK version: 2020-06-17 15:53. │ ∙ mMultiThreading version: 2020-06-17 22:43. │ ∙ mDateTime version: 2020-06-17 16:03. │ ∙ mRegistry version: 2020-06-17 15:57. │ ∙ mProductDetails version: 2020-06-17 16:25. │ ∙ oConsole version: 2020-07-01 21:26. │ ∙ Windows version: Windows Server 2016 Datacenter release 1607, build 14393 x64. │ ∙ Python version: 2.7.0 x64. └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

┌─ Software license warning ─────────────────────────────────────────────────────────────────────────────────────────── │ You have no license for cBugId and your trial period will expire on September 26th, 2020 │ You have no license for BugId and your trial period will expire on September 26th, 2020 └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Thank you in advance for helping to improve BugId!

SkyLined commented 3 years ago

Thanks for the bug report. It appears cdb is not loading symbols for unknown reasons and the code is not handling this particular situation correctly. I have a fix for this: https://github.com/SkyLined/cBugId/commit/77499d2541ac812c40485d219bbe843e871c6a20

cdb is normally asked to "defer" symbol loading: only load the symbol files into memory when we need them. This saves memory and is much faster because in most cases we do not need the symbols for all loaded modules. In this particular case cdb reports that the symbols for a module that BugId is interested in have been "deferred". So we kindly ask it to load them using the "ld" command. For unknown reasons, cdb does not do this, so we ask it to load them again, this time more forcefully using the ".reload" command. Unfortunately, this fails too and cdb still hasn't loaded the symbols, telling us the are still "deferred". I do not know why cdb does this - it seems like an error. However, I do not to work around it, so I've added a line to the code that allows it to handle this situation.

ethanhunnt commented 3 years ago

@SkyLined : Thanks for that. Appreciate your prompt response..

ethanhunnt commented 3 years ago

Also would you be creating a new release with the above change as I have been using your release files from here https://github.com/SkyLined/BugId/releases

SkyLined commented 3 years ago

Yes, I will. I am hoping you can confirm that this change fixes the issue for you first. I would like to avoid creating a release that does not actually fix it. Would it be possible for you to apply this change to your local copy and see if it works?

ethanhunnt commented 3 years ago

I have tested the fix for last 2 days and I have not seen that error now, so I assume that the fix is working..

SkyLined commented 3 years ago

Thanks, closing issue. Release will be out in a few days - I have some other new features I added that need some more testing first.