Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minidump can't tell source/line info for the managed stack frame #63

Closed
patricksuo opened this issue Aug 23, 2018 · 1 comment
Closed
Assignees
Labels
question Further information is requested

Comments

@patricksuo
Copy link

patricksuo commented Aug 23, 2018

env:

COMPlus_DbgEnableMiniDump=1
COMPlus_DbgMiniDumpType=4
DOTNET_SDK_VERSION=2.1.401
DOTNET_USE_POLLING_FILE_WATCHER=true
DOTNET_RUNNING_IN_CONTAINER=true

program:

using System;

namespace CrashApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
	    throw new Exception("crasing");
        }
    }
}

my debugcore script:

#!/usr/bin/env bash

if [ "$#" -ne 1 ]; then
    echo 'USEAGE: debugcore $CORE_FILE_PATH'
    exit 0
fi

COREFILE=$1
RUNTIME_PATH='/usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.3/'
PATH_TO_LIBSOSPLUGIN='/usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.3/libsosplugin.so'
HOST_PATH='/usr/share/dotnet/dotnet '

echo $COREFILE


lldb-3.9 -O "settings set target.exec-search-paths $RUNTIME_PATH" -o "plugin load $PATH_TO_LIBSOSPLUGIN" --core $COREFILE $HOST_PATH
(lldb) bt
* thread #1: tid = 157, 0x00007fcfe0972b3a libpthread.so.0`__waitpid + 106, name = 'dotnet', stop reason = signal SIGABRT
  * frame #0: 0x00007fcfe0972b3a libpthread.so.0`__waitpid + 106
    frame #1: 0x00007fcfdf498d3e libcoreclr.so`::PROCCreateCrashDumpIfEnabled() + 110 at process.cpp:3039
    frame #2: 0x00007fcfdf498d6e libcoreclr.so`::PROCAbort() + 14 at process.cpp:3065
    frame #3: 0x00007fcfdf497bdb libcoreclr.so`PROCEndProcess(hProcess=<unavailable>, uExitCode=<unavailable>, bTerminateUnconditionally=<unavailable>) + 235 at process.cpp:1394
    frame #4: 0x00007fcfdf207668 libcoreclr.so`UnwindManagedExceptionPass1(ex=<unavailable>, frameContext=<unavailable>) + 760 at exceptionhandling.cpp:4681
    frame #5: 0x00007fcfdf2077e3 libcoreclr.so`DispatchManagedException(ex=<unavailable>, isHardwareException=<unavailable>) + 275 at exceptionhandling.cpp:4752
    frame #6: 0x00007fcfdf1841da libcoreclr.so`IL_Throw(obj=<unavailable>) + 714 at jithelpers.cpp:4862
    frame #7: 0x00007fcf6604171b // EXPECTED symbol/source/line etc
    frame #8: 0x00007fcfdf213eaf libcoreclr.so`CallDescrWorkerInternal + 124
    frame #9: 0x00007fcfdf1345dc libcoreclr.so`MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 83 at callhelpers.cpp:78
    frame #10: 0x00007fcfdf134589 libcoreclr.so`MethodDescCallSite::CallTargetWorker(this=<unavailable>, pArguments=<unavailable>, pReturnValue=0x0000000000000000, cbReturnValue=0) + 857 at callhelpers.cpp:620
    frame #11: 0x00007fcfdf235046 libcoreclr.so`RunMain(MethodDesc*, short, int*, PtrArray**) [inlined] MethodDescCallSite::Call(this=<unavailable>, pArguments=<unavailable>) + 23 at callhelpers.h:433
    frame #12: 0x00007fcfdf23502f libcoreclr.so`RunMain(MethodDesc*, short, int*, PtrArray**) + 340 at assembly.cpp:1705
    frame #13: 0x00007fcfdf234edb libcoreclr.so`RunMain(MethodDesc*, short, int*, PtrArray**) + 87 at assembly.cpp:1720
    frame #14: 0x00007fcfdf234e84 libcoreclr.so`RunMain(pFD=<unavailable>, numSkipArgs=<unavailable>, piRetVal=<unavailable>, stringArgs=<unavailable>) + 292 at assembly.cpp:1720
    frame #15: 0x00007fcfdf2352e5 libcoreclr.so`Assembly::ExecuteMainMethod(this=0x00000000020f3600, stringArgs=0x00007ffeeda6e488, waitForOtherThreads=YES) + 229 at assembly.cpp:1817
    frame #16: 0x00007fcfdf07de92 libcoreclr.so`CorHost2::ExecuteAssembly(this=<unavailable>, dwAppDomainId=<unavailable>, pwzAssemblyPath=<unavailable>, argc=<unavailable>, argv=<unavailable>, pReturnValue=<unavailable>) + 482 at corhost.cpp:491
    frame #17: 0x00007fcfdf058fb4 libcoreclr.so`::coreclr_execute_assembly(hostHandle=<unavailable>, domainId=<unavailable>, argc=<unavailable>, argv=<unavailable>, managedAssemblyPath=<unavailable>, exitCode=<unavailable>) + 212 at unixinterface.cpp:407
    frame #18: 0x00007fcfdf83087d libhostpolicy.so`coreclr::execute_assembly(host_handle=0x0000000002110060, domain_id=1, argc=0, argv=0x0000000000000000, managed_assembly_path="/workspace/CrashApp/bin/Debug/netcoreapp2.1/CrashApp.dll", exit_code=0x00007ffeeda6e97c) + 125 at coreclr.cpp:104
    frame #19: 0x00007fcfdf8232fd libhostpolicy.so`run(args=0x00007ffeeda6ed30, out_host_command_result=error: summary string parsing error) + 6781 at hostpolicy.cpp:289
    frame #20: 0x00007fcfdf823b4c libhostpolicy.so`::corehost_main(argc=2, argv=0x00007ffeeda6fca8) + 236 at hostpolicy.cpp:386
    frame #21: 0x00007fcfdfad6cbf libhostfxr.so`___lldb_unnamed_symbol1564$$libhostfxr.so + 207
    frame #22: 0x00007fcfdfae236c libhostfxr.so`___lldb_unnamed_symbol1609$$libhostfxr.so + 5436
    frame #23: 0x00007fcfdfae34c5 libhostfxr.so`___lldb_unnamed_symbol1612$$libhostfxr.so + 437
    frame #24: 0x00007fcfdfae2a39 libhostfxr.so`___lldb_unnamed_symbol1610$$libhostfxr.so + 1001
    frame #25: 0x00007fcfdfad6f0c libhostfxr.so`hostfxr_main_startupinfo + 156
    frame #26: 0x000000000040ac74 dotnet`___lldb_unnamed_symbol30$$dotnet + 1572
    frame #27: 0x000000000040af05 dotnet`___lldb_unnamed_symbol31$$dotnet + 165
    frame #28: 0x00007fcfdfd462e1 libc.so.6`__libc_start_main + 241
    frame #29: 0x0000000000408a54 dotnet`_start + 41

in frame 7, no symbol/source/line info:

    frame #7: 0x00007fcf6604171b 
@mikem8361
Copy link
Member

The "bt" command only displays native stack frames. You need to use the SOS command "clrstack". And if you want both managed and native frames "clrstack -f"

@mikem8361 mikem8361 self-assigned this Aug 24, 2018
@mikem8361 mikem8361 added the question Further information is requested label Aug 24, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants