打开转储时 lldb 挂起

打开转储时 lldb 挂起

当我尝试从 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

相关内容