SkyLined / BugId

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

Internal exception has occurred; AssertionError- Expected at least 3 lines of list module output #95

Closed modpr0be closed 3 years ago

modpr0be commented 4 years ago

We knew that csgo.exe will crash when accessing our malformed map file but BugID crashed while analyzing server.dll.

stdout>start    end        module name
stdout>b82f0000 b8f8a000   server     (export symbols)       c:\program files (x86)\steam\steamapps\common\counter-strike global offensive\csgo\bin\server.dll
stdout>    Loaded symbol image file: c:\program files (x86)\steam\steamapps\common\counter-strike global offensive\csgo\bin\server.dll
stdout>    Image path: c:\program files (x86)\steam\steamapps\common\counter-strike global offensive\csgo\bin\server.dll
stdout>    Image name: server.dll
stdout>    Timestamp:        Fri Aug  7 06:42:57 2020 (5F2C9581)
stdout>    CheckSum:         00B4887C
stdout>    ImageSize:        00C9A000
stdout>    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4
stdout>    Information from resource tables:
stdout>}☻]☺>
stdout>1:004>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ ld server; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Load symbols for module server@0xB82F0000
stdout><☺[☻{
stdout>Symbols already loaded for server
stdout>}☻]☺>
stdout>1:004>
<stdin<.printf "%c%c%c%c%c\r\n", 0x3C, 0x1, 0x5B, 0x2, 0x7B; .block{ lmov a 0xB82F0000; }; .printf "%c%c%c%c%c\r\n", 0x7D, 0x2, 0x5D, 0x1, 0x3E; $$ Get module information for module server@0xB82F0000
stdout><☺[☻{
stdout>start    end        module name
stdout>}☻]☺>
stdout>1:004>
┌─ An internal exception has occured ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ AssertionError('Expected at least 3 lines of list module output, got 1:\r\nstart    end        module name',)
│
│  Stack:
│   0 fProcess_lmov_Output @ C:\tmp-build\BugId\modules\cBugId\cModule.py/234
│   1 __fGetModuleSymbolAndVersionInformation @ C:\tmp-build\BugId\modules\cBugId\cModule.py/180
│      > bOutputIsInformative = True,
│   2 bSymbolsAvailable @ C:\tmp-build\BugId\modules\cBugId\cModule.py/41
│      > oModule.__fGetModuleSymbolAndVersionInformation();
│   3 foCreate @ C:\tmp-build\BugId\modules\cBugId\cStack.py/205
│      > elif oModule and not oModule.bSymbolsAvailable and uTryCount < dxConfig["uMaxSymbolLoadingRetries"]:
│   4 oStack @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/93
│      > oBugReport.__oStack = cStack.foCreate(oBugReport.__oProcess, oBugReport.__oWindowsAPIThread, oBugReport.uStackFramesCount);
│   5 fbApplyToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\cBugTranslation.py/98
│      > if oBugReport.oStack.fbTopFramesMatchSymbols(asAdditionalIrrelevantStackFrameSymbols, \
│   6 fApplyBugTranslationsToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\fApplyBugTranslationsToBugReport.py/53
│      > if oBugTranslation.fbApplyToBugReport(oBugReport):
│   7 foCreateForException @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/124
│      > fApplyBugTranslationsToBugReport(oBugReport);
│   8 cCdbWrapper_fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper_fCdbStdInOutHelperThread.py/409
│      > oException,
│   9 fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper.py/397
│      > return cCdbWrapper_fCdbStdInOutHelperThread(oCdbWrapper);
│  10 __fRun @ C:\tmp-build\BugId\modules\cBugId\cHelperThread.py/67
│      > oSelf.__fActivity(*oSelf.__axActivityArguments);
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Those happened during csgo.exe bug confirmation, below is the command line:

PS C:\tmp-build\BugId> .\BugId.cmd --isa=x86 -v "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo.exe" -- -window -windowed -novid -console -insecure -textmode +map cs_italy

Here are the version information:

┌─ Version information ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ ∙ BugId version: 2020-08-12 11:51 (in trial period).
│ ∙ mFileSystem2 version: 2020-06-17 16:26.
│ ∙ mWindowsAPI version: 2020-06-17 16:03.
│ ∙ cBugId version: 2020-08-12 11:49 (in trial period).
│ ∙ mWindowsSDK version: 2020-06-17 15:53.
│ ∙ mMultiThreading version: 2020-06-17 22:43.
│ ∙ mDateTime version: 2020-08-12 11:47.
│ ∙ mRegistry version: 2020-06-17 15:57.
│ ∙ mProductDetails version: 2020-08-12 11:48.
│ ∙ oConsole version: 2020-07-01 21:26.
│ ∙ Windows version: Windows 10 Pro release 1909, build 18363 x64.
│ ∙ Python version: 2.7.16 x64.
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
SkyLined commented 4 years ago

That is odd: cdb is telling BugId the module "server" is loaded at address 0xb82f0000 but when BugId then asks for more information about he modules loaded at that address, cdb does not give it anything...

I'll add code to fall back to using the module name if the address does not provide any info. That should hopefully work around this issue.

SkyLined commented 4 years ago

This should hopefully fix this: https://github.com/SkyLined/cBugId/commit/8daa2d7eb861087dc9f8c00bf4e46d935cf9d5c3 Please let me know if the issue persists or if I can close this bug!

modpr0be commented 4 years ago

Hi SkyLined, thank you I'll check it with your latest commit. I'll let you know the result ASAP.

modpr0be commented 4 years ago

Hi SkyLined, the issue still persist with different error below

┌─ An internal exception has occured ──────────────────────────────────────────────────────────────────────────────────
│ AttributeError("'cModule' object has no attribute '_cModule__fzGetModuleSymbolAndVersionInformation'",)
│
│  Stack:
│   0 bSymbolsAvailable @ C:\tmp-build\BugId\modules\cBugId\cModule.py/41
│      > oModule.__fzGetModuleSymbolAndVersionInformation();
│   1 foCreate @ C:\tmp-build\BugId\modules\cBugId\cStack.py/205
│      > elif oModule and not oModule.bSymbolsAvailable and uTryCount < dxConfig["uMaxSymbolLoadingRetries"]:
│   2 oStack @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/93
│      > oBugReport.__oStack = cStack.foCreate(oBugReport.__oProcess, oBugReport.__oWindowsAPIThread, oBugReport.uStackFramesCount);
│   3 fbApplyToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\cBugTranslation.py/98
│      > if oBugReport.oStack.fbTopFramesMatchSymbols(asAdditionalIrrelevantStackFrameSymbols, \
│   4 fApplyBugTranslationsToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\fApplyBugTranslationsToBugReport.py/53
│      > if oBugTranslation.fbApplyToBugReport(oBugReport):
│   5 foCreateForException @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/124
│      > fApplyBugTranslationsToBugReport(oBugReport);
│   6 cCdbWrapper_fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper_fCdbStdInOutHelperThread.py/409
│      > oException,
│   7 fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper.py/397
│      > return cCdbWrapper_fCdbStdInOutHelperThread(oCdbWrapper);
│   8 __fRun @ C:\tmp-build\BugId\modules\cBugId\cHelperThread.py/67
│      > oSelf.__fActivity(*oSelf.__axActivityArguments);
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
SkyLined commented 4 years ago

Sorry, I forgot to add a single character and did not run full tests before uploading. I've fix this, can you try again?

modpr0be commented 4 years ago

Sorry, I forgot to add a single character and did not run full tests before uploading. I've fix this, can you try again?

will do.. I'll let you know when I get the result. Thanks SkyLined.

modpr0be commented 4 years ago

Hi, just tested it and still throwing errors below:

┌─ An internal exception has occured ──────────────────────────────────────────────────────────────────────────────────
│ AssertionError("End-of-command-output marker missing:\r\n             ^ Syntax error in ' lmov server; '",)
│
│  Stack:
│   0 cCdbWrapper_fasExecuteCdbCommand @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper_fasExecuteCdbCommand.py/85
│      > "End-of-command-output marker missing:\r\n%s" % "\r\n".join(oEndOfCommandOutputMarkerMissingException.asCommandOutput);
│   1 fasExecuteCdbCommand @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper.py/387
│      > return cCdbWrapper_fasExecuteCdbCommand(oCdbWrapper, *axArguments, **dxArguments);
│   2 fasExecuteCdbCommand @ C:\tmp-build\BugId\modules\cBugId\cProcess.py/117
│      > return oProcess.oCdbWrapper.fasExecuteCdbCommand(sCommand, sComment, **dxArguments);
│   3 __fzGetModuleSymbolAndVersionInformation @ C:\tmp-build\BugId\modules\cBugId\cModule.py/187
│      > bOutputIsInformative = True,
│   4 bSymbolsAvailable @ C:\tmp-build\BugId\modules\cBugId\cModule.py/41
│      > oModule.__fzGetModuleSymbolAndVersionInformation();
│   5 foCreate @ C:\tmp-build\BugId\modules\cBugId\cStack.py/205
│      > elif oModule and not oModule.bSymbolsAvailable and uTryCount < dxConfig["uMaxSymbolLoadingRetries"]:
│   6 oStack @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/93
│      > oBugReport.__oStack = cStack.foCreate(oBugReport.__oProcess, oBugReport.__oWindowsAPIThread, oBugReport.uStackFramesCount);
│   7 fbApplyToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\cBugTranslation.py/98
│      > if oBugReport.oStack.fbTopFramesMatchSymbols(asAdditionalIrrelevantStackFrameSymbols, \
│   8 fApplyBugTranslationsToBugReport @ C:\tmp-build\BugId\modules\cBugId\BugTranslations\fApplyBugTranslationsToBugReport.py/53
│      > if oBugTranslation.fbApplyToBugReport(oBugReport):
│   9 foCreateForException @ C:\tmp-build\BugId\modules\cBugId\cBugReport.py/124
│      > fApplyBugTranslationsToBugReport(oBugReport);
│  10 cCdbWrapper_fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper_fCdbStdInOutHelperThread.py/409
│      > oException,
│  11 fCdbStdInOutHelperThread @ C:\tmp-build\BugId\modules\cBugId\cCdbWrapper.py/397
│      > return cCdbWrapper_fCdbStdInOutHelperThread(oCdbWrapper);
│  12 __fRun @ C:\tmp-build\BugId\modules\cBugId\cHelperThread.py/67
│      > oSelf.__fActivity(*oSelf.__axActivityArguments);
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
SkyLined commented 3 years ago

Apologies, this dropped off my radar for a bit. I created a better patch but forgot to upload it.

This should fix it: https://github.com/SkyLined/cBugId/commit/34cd11720ba5b1ce56771bfa56e9975113f085a7

modpr0be commented 3 years ago

Hi SkyLined, thanks for this! it works! Thank you again!

SkyLined commented 3 years ago

Thanks, I'll put it in the next release!