In linux dotnet-sos causes crash with latests LLVM releases (ex 21.1.0)

Đang mở
#5,564 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@hoyosjs đang làm issue này rồi.

Từ ngày 16/9/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug
Description

I was trying to debug with vscode lldb-dap extensions which imposes a recent version of LLVM.

The dotnet-sos causes lldb-dap and lldb to crash very early.

Minimal repro

Here is the minimal reproduction for versions LLVM-20.1.1-Linux-X64 and LLVM-21.1.0-Linux-X64:

  • start lldb
  • load the libsosplugin
  • setup ms symbols server
What occurs:

Pure virtual call crash

What is expected:

Not crashing and being able to use sos and lldb.

Example reproduction in a Ubuntu 22.04.3 LTS WSL image with LLVM 21.1.0:
# /usr/local/LLVM-21.1.0-Linux-X64/bin/lldb
(lldb) plugin load /root/.dotnet/sos/libsosplugin.so
(lldb) setsymbolserver -ms
libc++abi: Pure virtual function called!
LLDB diagnostics will be written to /tmp/diagnostics-3c21b5
Please include the directory content when filing a bug report
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /usr/local/LLVM-21.1.0-Linux-X64/bin/lldb
 #0 0x00005595426ebe77 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/LLVM-21.1.0-Linux-X64/bin/lldb+0x79e77)
 #1 0x00005595426ec8fb SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00007faef0f5f520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007faef103b88d syscall (/lib/x86_64-linux-gnu/libc.so.6+0x11e88d)
 #4 0x00007faef8055806 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #5 0x00007faef0f5f520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #6 0x00007faef0fb39fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #7 0x00007faef0f5f476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #8 0x00007faef0f457f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #9 0x00007faef7685b36 (/usr/local/LLVM-21.1.0-Linux-X64/bin/../lib/liblldb.so.21.1+0x6221b36)
#10 0x00007faef76859df (/usr/local/LLVM-21.1.0-Linux-X64/bin/../lib/liblldb.so.21.1+0x62219df)
#11 0x00007faef79fba1d lldb_private::CommandInterpreter::ResolveCommandImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, lldb_private::CommandReturnObject&) CommandInterpreter.cpp:0:0
#12 0x00007faef7a0a7a3 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, bool) CommandInterpreter.cpp:0:0
#13 0x00007faef7a11183 lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) CommandInterpreter.cpp:0:0
#14 0x00007faef7962735 lldb_private::IOHandlerEditline::Run() IOHandler.cpp:0:0
#15 0x00007faef793a87b lldb_private::Debugger::RunIOHandlers() Debugger.cpp:0:0
#16 0x00007faef7a130de lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&) CommandInterpreter.cpp:0:0
#17 0x00007faef771b56b lldb::SBDebugger::RunCommandInterpreter(bool, bool) (/usr/local/LLVM-21.1.0-Linux-X64/bin/../lib/liblldb.so.21.1+0x62b756b)
#18 0x00005595426df09b main (/usr/local/LLVM-21.1.0-Linux-X64/bin/lldb+0x6d09b)
#19 0x00007faef0f46d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#20 0x00007faef0f46e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#21 0x00005595426b7e75 _start (/usr/local/LLVM-21.1.0-Linux-X64/bin/lldb+0x45e75)
Aborted (core dumped)
Configuration

dotnet os information:
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /root/.dotnet/sdk/8.0.204/

This was run on a WSL image on windows 11 (intel 64 bits).

Regression?

It work with LLVM 19.3 but LLDBP-dap extension does not (no vscode IDE debugging).

Other information
Ngôn ngữ chính
C++
Star
1.3k
Fork
407
Merge trung bình
21 giờ 5 phút
Pull request đã merge (30 ngày)
78

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/diagnostics

Tất cả issue của dotnet/diagnostics

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.