You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
XUnitLogChecker: Unable to find dumps in Linux #96818
I created a test PR to see the status of XUnitLogChecker. #96806
I discovered that XUnitLogChecker is unable to find dumps in the expected directory in Unix. Did anything change recently? This was working in my last PR.
@carlossanlop are you setting DOTNET variables to trigger dump creation? I think we were supposed to set DOTNET_DbgMiniDumpName and maybe some others. cc @hoyosjs
I see - so given the docs of those variables they should produce a dump, but they didn't. Looks like all those logs have this:
[createdump] Gathering state for process 56 dotnet
[createdump] Crashing thread 0047 signal 11 (000b)
[createdump] Writing crash report to file /home/helixbot/dotnetbuild/dumps/coredump.56.dmp.crashreport.json
[createdump] Crash report successfully written
waitpid() returned successfully (wstatus 0000008b) WEXITSTATUS 0 WTERMSIG b
@hoyosjs wouldn't that indicate a problem with CoreCLR's dump writing logic? Looks like it's only writing .crashreport.json and not the .dmp
The environment variable configured dumps happen prior to process teardown. That means their dump, which is declared successful, happens before system dump.
It looks like after the createdump logging was enabled, the dumps in the various runs I looked at were successful. The logging did expose some sign extension bugs on arm32 which I'm fixing, but the rest of the platforms looked ok.
I went ahead and removed the DOTNET_CreateDumpVerboseDiagnostics setting. We can see if the problem returns. If it does then perhaps we'll need to look into other ways to understand why the dumps aren't created.
You can look for the results of this PR to see the state: #96806
I wonder if the system dump being produced interferes with createdump, and enabling more verbose logging slows down createdump enough so that the system dump process no longer interferes? Just guessing as I don't know why createdump might not produce a dump at all even when running.
Activity
ericstj commentedon Jan 11, 2024
@carlossanlop are you setting DOTNET variables to trigger dump creation? I think we were supposed to set DOTNET_DbgMiniDumpName and maybe some others. cc @hoyosjs
carlossanlop commentedon Jan 11, 2024
Yes, they're being set:
runtime/eng/testing/RunnerTemplate.sh
Lines 125 to 127 in 31fa079
ericstj commentedon Jan 11, 2024
I see - so given the docs of those variables they should produce a dump, but they didn't. Looks like all those logs have this:
@hoyosjs wouldn't that indicate a problem with CoreCLR's dump writing logic? Looks like it's only writing
.crashreport.jsonand not the.dmpericstj commentedon Jan 12, 2024
Have a look at https://dev.azure.com/dnceng-public/public/_build/results?buildId=522611&view=ms.vss-test-web.build-test-results-tab&runId=12281022&paneView=debug&resultId=207997
There are dumps captured and uploaded - they were probably configured as system dumps. @hoyosjs - could that be what's going on? Some system setting is taking precedence over the environment variables?
hoyosjs commentedon Jan 12, 2024
The environment variable configured dumps happen prior to process teardown. That means their dump, which is declared successful, happens before system dump.
ericstj commentedon Jan 12, 2024
But there was no dump created -- it only created a report. Could it be that
createdumphas a bug here?runtime/src/coreclr/debug/createdump/createdumpunix.cpp
Lines 74 to 78 in 54530c7
Or do you think someone set
runtime/docs/design/coreclr/botr/xplat-minidump-generation.md
Line 68 in 54530c7
I couldn't find any evidence of the latter - so this really looks like a problem with createdump.
tommcdon commentedon Jan 16, 2024
@mikem8361
4 remaining items
mikem8361 commentedon Jan 19, 2024
It looks like after the createdump logging was enabled, the dumps in the various runs I looked at were successful. The logging did expose some sign extension bugs on arm32 which I'm fixing, but the rest of the platforms looked ok.
ericstj commentedon Jan 31, 2024
I went ahead and removed the
DOTNET_CreateDumpVerboseDiagnosticssetting. We can see if the problem returns. If it does then perhaps we'll need to look into other ways to understand why the dumps aren't created.You can look for the results of this PR to see the state: #96806
mikem8361 commentedon Jan 31, 2024
I've made some fixes to createdump for arm32 too that are in.
tommcdon commentedon Feb 6, 2024
Hi @ericstj, just checking in - please let us know if there is any further action for the diagnostics team or if this issue can be closed.
ericstj commentedon Feb 7, 2024
Tagging @carlossanlop to help as well.
You should be able to look at the linked PR to see if its producing dumps or not. That's effectively testing createdump on the CI machines. I just had a look and it seems to me it's not producing the dumps:
https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-96806-merge-a9ff7e2f92b842e080/System.IO.Compression.Brotli.Tests/1/console.8faf5d93.log?helixlogtype=result
As you can see, createdump is doing something:
But still no
.dmpfile produced.I think the next steps might be to iterate in that PR to test that createdump will work correctly in the CI machines.
ericstj commentedon Feb 7, 2024
I wonder if the system dump being produced interferes with createdump, and enabling more verbose logging slows down createdump enough so that the system dump process no longer interferes? Just guessing as I don't know why createdump might not produce a dump at all even when running.
JulieLeeMSFT commentedon Feb 7, 2024
@carlossanlop, can you link the example PR that shows it does not create dump?
Eric already shared the PR above.
ericstj commentedon Feb 7, 2024
Yeah, it's the same PR as before. Check the linux coreCLR legs (the above is from an x64 one).
What I do to check is examine all failing tests, then look for the .dmp and the console log for the stack.
https://dev.azure.com/dnceng-public/public/_build/results?buildId=548264&view=ms.vss-test-web.build-test-results-tab
mikem8361 commentedon Feb 7, 2024
It looks like the test PR is successfully creating dumps. Juan rebased it on the latest which had a remote stack unwinder fix.
ericstj commentedon Feb 8, 2024
Confirmed, https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-96806-merge-48852c8dc9bb4f22bc/System.IO.Compression.Brotli.Tests/1/console.47cae588.log?helixlogtype=result
@mikem8361 @hoyosjs - could one of you link the PR that fixed this? Are you putting tests in place to make sure it doesn't regress again?