Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

XUnitLogChecker: Unable to find dumps in Linux #96818

Closed

Description

@carlossanlop

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.

Examples:

@ivdiazsa @hoyosjs @JulieLeeMSFT

Activity

  1. ghost added
    untriaged
    on Jan 10, 2024
  2. ericstj commented on Jan 11, 2024

    @ericstj
    Member

    @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

  3. carlossanlop commented on Jan 11, 2024

    @carlossanlop
    ContributorAuthor

    Yes, they're being set:

    export DOTNET_DbgEnableMiniDump=1
    export DOTNET_EnableCrashReport=1
    export DOTNET_DbgMiniDumpName=$HELIX_DUMP_FOLDER/coredump.%d.dmp

  4. ericstj commented on Jan 11, 2024

    @ericstj
    Member

    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

  5. ericstj commented on Jan 12, 2024

    @ericstj
    Member

    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?

  6. hoyosjs commented on Jan 12, 2024

    @hoyosjs
    Member

    The environment variable configured dumps happen prior to process teardown. That means their dump, which is declared successful, happens before system dump.

  7. ericstj commented on Jan 12, 2024

    @ericstj
    Member

    But there was no dump created -- it only created a report. Could it be that createdump has a bug here?

    // Gather all the useful memory regions from the DAC
    if (!crashInfo->EnumerateMemoryRegionsWithDAC(options.DumpType))
    {
    goto exit;
    }

    Or do you think someone set

    - `DOTNET_EnableCrashReportOnly`: In .NET 7.0 or greater, same as DOTNET_EnableCrashReport except the core dump is not generated.
    ?

    I couldn't find any evidence of the latter - so this really looks like a problem with createdump.

  8. added this to the 9.0.0 milestone on Jan 12, 2024
  9. ghost removed
    untriaged
    on Jan 12, 2024
  10. tommcdon commented on Jan 16, 2024

    @tommcdon
    Member

    But there was no dump created -- it only created a report. Could it be that createdump has a bug here?

    @mikem8361

  11. 4 remaining items

  12. mikem8361 commented on Jan 19, 2024

    @mikem8361
    Contributor

    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.

  13. ericstj commented on Jan 31, 2024

    @ericstj
    Member

    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

  14. mikem8361 commented on Jan 31, 2024

    @mikem8361
    Contributor

    I've made some fixes to createdump for arm32 too that are in.

  15. tommcdon commented on Feb 6, 2024

    @tommcdon
    Member

    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.

  16. added
    needs-author-action
    on Feb 6, 2024
  17. ericstj commented on Feb 7, 2024

    @ericstj
    Member

    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:

    [createdump] Gathering state for process 25502 dotnet
    [createdump] Crashing thread 63ae signal 11 (000b)
    ./RunTests.sh: line 180: 25502 Segmentation fault      (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.IO.Compression.Brotli.Tests.runtimeconfig.json --depsfile System.IO.Compression.Brotli.Tests.deps.json xunit.console.dll System.IO.Compression.Brotli.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
    

    But still no .dmp file produced.

    No dumps found in /home/helixbot/dotnetbuild/dumps.
    

    I think the next steps might be to iterate in that PR to test that createdump will work correctly in the CI machines.

  18. removed
    needs-author-action
    on Feb 7, 2024
  19. ericstj commented on Feb 7, 2024

    @ericstj
    Member

    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.

  20. JulieLeeMSFT commented on Feb 7, 2024

    @JulieLeeMSFT
    Member

    @carlossanlop, can you link the example PR that shows it does not create dump?
    Eric already shared the PR above.

  21. ericstj commented on Feb 7, 2024

    @ericstj
    Member

    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

  22. mikem8361 commented on Feb 7, 2024

    @mikem8361
    Contributor

    It looks like the test PR is successfully creating dumps. Juan rebased it on the latest which had a remote stack unwinder fix.

  23. ericstj commented on Feb 8, 2024

    @ericstj
    Member
  24. locked and limited conversation to collaborators on Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions