dotnet 애플리케이션에서 덤프를 열려고 하면 lldb-3.9가 중단됩니다. 프로세스가 완전히 중단되어 CPU를 소비하지 않습니다.
$ gdb -v
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
$ lldb-3.9 -v
lldb version 3.9.1 ( revision )
$ dotnet --version
2.1.403
$ sudo gcore 27247
[New LWP 27248]
[New LWP 27249]
[New LWP 27250]
[New LWP 27251]
[New LWP 27252]
[New LWP 27253]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f6c157d8ed9 in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7ffff444dcd0, expected=0, futex_word=0x1cb3468) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
142 ../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
warning: target file /proc/27247/cmdline contained unexpected null characters
Saved corefile core.27247
$ ll core.27247
-rw-r--r-- 1 root root 2571743080 oct 20 19:17 core.27247
$ sudo lldb-3.9 `which dotnet` -c core.27247 -d
(lldb) target create "/usr/bin/dotnet" --core "core.27247"
프롬프트가 (lldb)
다시는 나타나지 않습니다. SOS 플러그인을 로드할 기회조차 얻지 못했습니다.
앱은 무한 루프를 만들고 "Hello world"를 인쇄한 다음 다시 루프하기 전에 잠시 대기합니다.
고쳐 쓰다
lldb-3.6을 로드하지만 불행하게도 lldb-3.6에는 관련 없는 오류가 있습니다.
https://superuser.com/questions/1098503/characters-turn-into-unicode-in-gnome-terminal-with-lldb
답변1
lldb-4.0을 사용하고 있습니다
yartat@TATARENKO:/mnt/e/Working/Dumps$ lldb-4.0 $(which dotnet) --core ./player-authentication.dump
(lldb) target create "/usr/bin/dotnet" --core "./player-authentication.dump"
Core file '/mnt/e/Working/Dumps/./player-authentication.dump' (x86_64) was loaded.
(lldb) plugin load /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.6/libsosplugin.so
(lldb) setclrpath /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.6
Set load path for sos/dac/dbi to '/usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.6/'
(lldb) clrthread
ThreadCount: 77
UnstartedThread: 0
BackgroundThread: 75
PendingThread: 0
DeadThread: 1
Hosted Runtime: no
Lock
ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception
XXXX 1 1 0000000001674CB0 2020020 Preemptive 0000000000000000:0000000000000000 000000000171D6F0 0 Ukn