vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.42k stars 237 forks source link

Debug adapter exit code=255 (0xff), signal=null. #1086

Open stevensgy opened 3 months ago

stevensgy commented 3 months ago

OS: MAC OS 14.4 VSCode version: 1.87.2 CodeLLDB version: v1.10.0

Verbose log
thread '' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', adapter/codelldb/src/debug_session/breakpoints.rs:627:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Received signal: SIGABRT
   0: backtrace::capture::Backtrace::new
   1: codelldb::hook_crashes::handler
   2: __simple_esappend
   3: __pthread_atfork_prepare_handlers
   4: 
   5: std::sys::unix::abort_internal
   6: _rust_panic
   7: std::panicking::rust_panic_with_hook
   8: std::panicking::begin_panic_handler::{{closure}}
   9: std::sys_common::backtrace::__rust_end_short_backtrace
  10: _rust_begin_unwind
  11: core::panicking::panic_fmt
  12: core::panicking::panic_display
  13: tokio::runtime::scheduler::Handle::current
  14: codelldb::debug_session::breakpoints::::init_bp_actions::{{closure}}
  15: lldb::sb::sbbreakpoint::SBBreakpoint::set_callback::callback_thunk
  16: __ZN4lldb25SBBreakpointCallbackBaton28PrivateBreakpointHitCallbackEPvPN12lldb_private24StoppointCallbackContextEyy
  17: __ZN12lldb_private18StopInfoBreakpoint13PerformActionEPNS_5EventE
  18: __ZN12lldb_private7Process16ProcessEventData10ShouldStopEPNS_5EventERb
  19: __ZN12lldb_private7Process16ProcessEventData11DoOnRemovalEPNS_5EventE
  20: __ZN12lldb_private8Listener21FindNextEventInternalERNSt3__111unique_lockINS1_5mutexEEEPNS_11BroadcasterEjRNS1_10shared_ptrINS_5EventEEEb
  21: __ZN12lldb_private8Listener16GetEventInternalERKNS_7TimeoutINSt3__15ratioILl1ELl1000000EEEEEPNS_11BroadcasterEjRNS2_10shared_ptrINS_5EventEEE
  22: __ZN4lldb10SBListener26WaitForEventForBroadcasterEjRKNS_13SBBroadcasterERNS_7SBEventE
  23: __ZL43_wrap_SBListener_WaitForEventForBroadcasterP7_objectS0_
  24: _cfunction_call
  25: __PyObject_MakeTpCall
  26: _call_function
  27: __PyEval_EvalFrameDefault
  28: __PyFunction_Vectorcall
  29: _call_function
  30: __PyEval_EvalFrameDefault
  31: __PyFunction_Vectorcall
  32: __PyEval_EvalFrameDefault
  33: __PyFunction_Vectorcall
  34: _call_function
  35: __PyEval_EvalFrameDefault
  36: __PyFunction_Vectorcall
  37: _call_function
  38: __PyEval_EvalFrameDefault
  39: __PyFunction_Vectorcall
  40: _method_vectorcall
  41: _t_bootstrap
  42: _pythread_wrapper
  43: __pthread_joiner_wake

Debug adapter exit code=255 (0xff), signal=null.

joaorossi commented 3 months ago

Experiencing this whenever I hit a breakpoint, rendering the extension pretty much unusable.

CodeLLDB ver: v1.10.1-dev.2312052340

VSCode Environment:

Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.22631

Log output:

Initial debug configuration: {
  name: 'Dimitri Standalone LLDB',
  type: 'lldb',
  request: 'launch',
  program: '${workspaceFolder}\\build\\plugin_artefacts\\Debug\\Standalone\\Dimitri.exe',
  args: [],
  cwd: '${workspaceFolder}',
  __configurationTarget: 6
}
Resolved debug configuration: {
  name: 'Dimitri Standalone LLDB',
  type: 'lldb',
  request: 'launch',
  program: '${workspaceFolder}\\build\\plugin_artefacts\\Debug\\Standalone\\Dimitri.exe',
  args: [],
  cwd: '${workspaceFolder}',
  __configurationTarget: 6,
  relativePathBase: 'c:\\Users\\joaor\\dev\\plugin',
  _adapterSettings: {
    displayFormat: 'auto',
    showDisassembly: 'auto',
    dereferencePointers: true,
    suppressMissingSourceFiles: true,
    evaluationTimeout: 5,
    consoleMode: 'commands',
    sourceLanguages: null,
    terminalPromptClear: null,
    evaluateForHovers: true,
    commandCompletions: true,
    reproducer: false
  }
}
[adapter\codelldb\src\terminal.rs:101] winapi::um::wincon::FreeConsole() = 1
[adapter\codelldb\src\terminal.rs:102] winapi::um::wincon::AttachConsole(pid) = 1
[adapter\codelldb\src\terminal.rs:109] winapi::um::wincon::FreeConsole() = 1
error: Dimitri.exe :: Class 'std::strong_ordering' has a member 'less' of type 'std::strong_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'std::partial_ordering' has a member 'less' of type 'std::partial_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'std::weak_ordering' has a member 'less' of type 'std::weak_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::FileInputStream' has a member 'file' of type 'juce::File' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::AffineTransform' has a member 'identity' of type 'juce::AffineTransform' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::ModifierKeys' has a member 'currentModifiers' of type 'juce::ModifierKeys' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::Identifier' has a member 'null' of type 'juce::Identifier' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::DynamicObject' has a member 'properties' of type 'juce::NamedValueSet' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::XmlElement::XmlAttributeNode' has a member 'nextListItem' of type 'juce::LinkedListPointer<juce::XmlElement::XmlAttributeNode>' which does not have a complete definition.
Debug adapter exit code=3221225477 (0xc0000005), signal=null.

Verbose log when hitting a breakpoint:

[DEBUG codelldb::debug_session::breakpoints] Callback for breakpoint location 1.1: where = Dimitri.exe`public: void __cdecl mobius::aligned_allocator<float>::deallocate(float *) + 76 at aligned_allocator.cpp:119, address = 0x00007ff7bbb69c7c, resolved, hit count = 1 

[DEBUG codelldb::debug_session] Debug event: 000002459C4A0A00 Event: broadcaster = 0000024594A09B38 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0000024594A09B10 (pid = 20324), state = stopped}
[DEBUG codelldb::dap_codec] <-- {"seq":182,"type":"event","event":"stopped","body":{"allThreadsStopped":true,"reason":"breakpoint","threadId":14576}}
[DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":11}
[DEBUG codelldb::dap_codec] <-- {"seq":183,"type":"response","request_seq":11,"success":true,"command":"threads","body":{"threads":[{"id":6488,"name":"4: tid=6488"},{"id":14576,"name":"1: tid=14576"},{"id":16428,"name":"2: tid=16428"},{"id":17204,"name":"3: tid=17204"},{"id":6220,"name":"5: tid=6220"},{"id":9800,"name":"6: tid=9800"},{"id":13872,"name":"8: tid=13872"},{"id":19684,"name":"7: tid=19684"},{"id":20248,"name":"9: tid=20248"},{"id":21512,"name":"13: tid=21512"},{"id":22108,"name":"12: tid=22108"},{"id":24188,"name":"11: tid=24188"}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":14576,"startFrame":0,"levels":1},"type":"request","seq":12}
[DEBUG codelldb::dap_codec] <-- {"seq":184,"type":"response","request_seq":12,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":0,"id":1001,"instructionPointerReference":"0x7FF7BBB69C7C","line":119,"name":"public: void __cdecl mobius::aligned_allocator<float>::deallocate(float *)","source":{"name":"aligned_allocator.cpp","path":"C:\\Users\\joaor\\dev\\repo\\prototypes\\dsp\\aligned_allocator\\aligned_allocator.cpp"}}]}}
[DEBUG codelldb::dap_codec] --> {"command":"scopes","arguments":{"frameId":1001},"type":"request","seq":13}
[DEBUG codelldb::dap_codec] <-- {"seq":185,"type":"response","request_seq":13,"success":true,"command":"scopes","body":{"scopes":[{"expensive":false,"name":"Local","variablesReference":1002},{"expensive":false,"name":"Static","variablesReference":1003},{"expensive":false,"name":"Global","variablesReference":1004},{"expensive":false,"name":"Registers","variablesReference":1005}]}}
[DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":14576,"startFrame":1,"levels":19},"type":"request","seq":14}
[DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1002},"type":"request","seq":15}
error: Dimitri.exe :: Class 'std::strong_ordering' has a member 'less' of type 'std::strong_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'std::partial_ordering' has a member 'less' of type 'std::partial_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'std::weak_ordering' has a member 'less' of type 'std::weak_ordering' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::FileInputStream' has a member 'file' of type 'juce::File' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::AffineTransform' has a member 'identity' of type 'juce::AffineTransform' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::ModifierKeys' has a member 'currentModifiers' of type 'juce::ModifierKeys' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::Identifier' has a member 'null' of type 'juce::Identifier' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::DynamicObject' has a member 'properties' of type 'juce::NamedValueSet' which does not have a complete definition.
error: Dimitri.exe :: Class 'juce::XmlElement::XmlAttributeNode' has a member 'nextListItem' of type 'juce::LinkedListPointer<juce::XmlElement::XmlAttributeNode>' which does not have a complete definition.
Debug adapter exit code=3221225477 (0xc0000005), signal=null.
AntonBondarenkoArm commented 2 months ago

Similar issue Running on MacOS host and Ubuntu 22.04 remote via SSH. Happens when try hover over some variables. Also a bunch of python exceptions before when hovering over code.

Versions

Version: 1.88.1 (Universal)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:42:52.765Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

CodeLLDB version 1.10.0

Trace log

[ERROR codelldb::debug_session] unknown error
Received signal: SIGSEGV
   0: codelldb::hook_crashes::handler
   1: <unknown>
   2: __strlen_evex
             at ./string/../sysdeps/x86_64/multiarch/strlen-evex.S:73
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: <unknown>
  39: <unknown>
  40: <unknown>
  41: <unknown>
  42: <unknown>
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <unknown>
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: <unknown>
  53: <unknown>
  54: <unknown>
  55: <unknown>
  56: <unknown>
  57: <unknown>
  58: <unknown>
  59: <unknown>
  60: <unknown>
  61: <unknown>
  62: <unknown>
  63: <unknown>
  64: <unknown>
  65: <unknown>
  66: <unknown>
  67: <unknown>
  68: <unknown>
  69: <unknown>
  70: <unknown>
  71: <unknown>
  72: <unknown>
  73: <unknown>
  74: <unknown>
  75: <unknown>
  76: <unknown>
  77: <unknown>
  78: <unknown>
  79: <unknown>
  80: <unknown>
  81: <unknown>
  82: <unknown>
  83: <unknown>
  84: _ZN4lldb7SBFrame18EvaluateExpressionEPKcRKNS_19SBExpressionOptionsE
  85: _ZN4lldb7SBFrame18EvaluateExpressionEPKc
  86: <unknown>
  87: <unknown>
  88: _PyObject_Call
  89: _PyEval_EvalFrameDefault
  90: <unknown>
  91: _PyFunction_Vectorcall
  92: <unknown>
  93: <unknown>
  94: _PyEval_EvalFrameDefault
  95: _PyFunction_Vectorcall
  96: <unknown>
  97: _PyEval_EvalFrameDefault
  98: <unknown>
  99: _PyFunction_Vectorcall
 100: <unknown>
 101: _PyEval_EvalFrameDefault
 102: <unknown>
 103: PyEval_EvalCode
 104: <unknown>
 105: <unknown>
 106: <unknown>
 107: _PyEval_EvalFrameDefault
 108: <unknown>
 109: _PyFunction_Vectorcall
 110: <unknown>
 111: _PyEval_EvalFrameDefault
 112: _PyFunction_Vectorcall
 113: <unknown>
 114: <unknown>
 115: <unknown>
 116: <unknown>
 117: codelldb::python::PythonInterface::evaluate
 118: codelldb::debug_session::variables::<impl codelldb::debug_session::DebugSession>::evaluate_expr_in_frame
 119: codelldb::debug_session::variables::<impl codelldb::debug_session::DebugSession>::handle_evaluate_expression
 120: codelldb::debug_session::variables::<impl codelldb::debug_session::DebugSession>::handle_evaluate
 121: codelldb::debug_session::DebugSession::handle_request
 122: tokio::runtime::task::core::Core<T,S>::poll
 123: tokio::runtime::task::harness::Harness<T,S>::poll
 124: tokio::task::local::LocalSet::tick
 125: std::thread::local::LocalKey<T>::with
 126: <tokio::task::local::LocalSet as core::future::future::Future>::poll
 127: codelldb::run_debug_session::{{closure}}
 128: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
 129: tokio::runtime::context::runtime::enter_runtime
 130: codelldb::debug_server
 131: codelldb::main
 132: std::sys_common::backtrace::__rust_begin_short_backtrace
 133: std::rt::lang_start::{{closure}}
 134: std::rt::lang_start_internal
 135: main
 136: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
 137: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:392:3
 138: _start

Debug adapter exit code=255 (0xff), signal=null.