codelldb
codelldb copied to clipboard
Debugger works for a minute or two and then crashes
OS: Raspbian 10 Buster (debugging remotely from Win 10 PC using VSCode SSH extension) VSCode version: 1.47.3 (both host and client) Extension version: 1.5.3 Toolchain version: g++ (Raspbian 8.3.0-6+rpi1) 8.3.0 Build target: Not sure what this one is asking for Python version: 3.7.3
I am attempting to debug my c++ code and the debugger works great for typically 1-2 minutes (sometimes shorter, sometimes longer) and then it will just crash without warning. I have not been able to find any specific line or action that can reproduce the problem instantly. It usually doesn't crash right after I do something (i.e. step or inspect a variable). It will usually just happen as I'm sitting and looking at my various debug values and code. I've reproduced with htop running and verified the memory and CPU usage look totally reasonable on the host as well.
Debug log
configuration: { name: 'Debug test', type: 'lldb', request: 'launch', program: '${workspaceFolder}/src/robot/build/test-main', args: [ '~[socket]' ], relativePathBase: '/home/pi/DominoRobot' } liblldb: /home/pi/.vscode-server/extensions/vadimcn.vscode-lldb-1.5.3/lldb/lib/liblldb.so libpython: libpython3.7m.so.1.0 environment: {} params: {} Listening on port 44023 [2020-08-15T17:15:48Z DEBUG codelldb] New debug session INFO(Python) 10:15:49 rust: Initializing, module name=rust DEBUG(Python) 10:15:49 rust: attaching summary get_tuple_summary to "^\(.*\)$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StrSliceSynthProvider to "&str", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StrSliceSynthProvider to "&str", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StrSliceSynthProvider to "str*", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StrSliceSynthProvider to "str*", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdStringSynthProvider to "collections::string::String", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdStringSynthProvider to "collections::string::String", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdStringSynthProvider to "alloc::string::String", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdStringSynthProvider to "alloc::string::String", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdVectorSynthProvider to "^collections::vec::Vec<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdVectorSynthProvider to "^collections::vec::Vec<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdVectorSynthProvider to "^alloc::vec::Vec<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdVectorSynthProvider to "^alloc::vec::Vec<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic SliceSynthProvider to "^&(mut\s*)?\[.*\]$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_SliceSynthProvider to "^&(mut\s*)?\[.*\]$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic SliceSynthProvider to "^slice<.>.*$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_SliceSynthProvider to "^slice<.>.*$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdCStringSynthProvider to "std::ffi::c_str::CString", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdCStringSynthProvider to "std::ffi::c_str::CString", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdCStrSynthProvider to "std::ffi::c_str::CStr", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdCStrSynthProvider to "std::ffi::c_str::CStr", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdOsStringSynthProvider to "std::ffi::os_str::OsString", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdOsStringSynthProvider to "std::ffi::os_str::OsString", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdOsStrSynthProvider to "std::ffi::os_str::OsStr", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdOsStrSynthProvider to "std::ffi::os_str::OsStr", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdPathBufSynthProvider to "std::path::PathBuf", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdPathBufSynthProvider to "std::path::PathBuf", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdPathSynthProvider to "std::path::Path", is_regex=False DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdPathSynthProvider to "std::path::Path", is_regex=False DEBUG(Python) 10:15:49 rust: attaching synthetic StdRcSynthProvider to "^alloc::rc::Rc<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdRcSynthProvider to "^alloc::rc::Rc<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdRcSynthProvider to "^alloc::rc::Weak<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdRcSynthProvider to "^alloc::rc::Weak<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdArcSynthProvider to "^alloc::(sync|arc)::Arc<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdArcSynthProvider to "^alloc::(sync|arc)::Arc<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdArcSynthProvider to "^alloc::(sync|arc)::Weak<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdArcSynthProvider to "^alloc::(sync|arc)::Weak<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdMutexSynthProvider to "^std::sync::mutex::Mutex<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdMutexSynthProvider to "^std::sync::mutex::Mutex<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdCellSynthProvider to "^core::cell::Cell<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdCellSynthProvider to "^core::cell::Cell<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdRefCellSynthProvider to "^core::cell::RefCell<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdRefCellSynthProvider to "^core::cell::RefCell<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdRefCellBorrowSynthProvider to "^core::cell::Ref<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdRefCellBorrowSynthProvider to "^core::cell::Ref<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdRefCellBorrowSynthProvider to "^core::cell::RefMut<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdRefCellBorrowSynthProvider to "^core::cell::RefMut<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdHashMapSynthProvider to "^std::collections::hash::map::HashMap<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdHashMapSynthProvider to "^std::collections::hash::map::HashMap<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdHashSetSynthProvider to "^std::collections::hash::set::HashSet<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdHashSetSynthProvider to "^std::collections::hash::set::HashSet<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdOptionSynthProvider to "^core::option::Option<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdOptionSynthProvider to "^core::option::Option<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdResultSynthProvider to "^core::result::Result<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdResultSynthProvider to "^core::result::Result<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching synthetic StdCowSynthProvider to "^alloc::borrow::Cow<.>$", is_regex=True DEBUG(Python) 10:15:49 rust: attaching summary _get_synth_summary_StdCowSynthProvider to "^alloc::borrow::Cow<.>$", is_regex=True [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true},"type":"request","seq":1} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"launch","arguments":{"name":"Debug test","type":"lldb","request":"launch","program":"/home/pi/DominoRobot/src/robot/build/test-main","args":["~[socket]"],"relativePathBase":"/home/pi/DominoRobot","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":["\n"]},"__sessionId":"3a71d73a-2224-40b2-96cf-0513f7a29b9f"},"type":"request","seq":2} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"setBreakpoints","arguments":{"source":{"name":"SmoothTrajectoryGenerator.cpp","path":"/home/pi/DominoRobot/src/robot/src/SmoothTrajectoryGenerator.cpp"},"lines":[148,167],"breakpoints":[{"line":148},{"line":167}],"sourceModified":false},"type":"request","seq":3} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] --> {"type":"response","seq":4,"command":"runInTerminal","request_seq":2,"success":true,"body":{"shellProcessId":26990}} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"type":"response","seq":6,"command":"runInTerminal","request_seq":3,"success":true,"body":{"shellProcessId":26990}} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":7} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"setExceptionBreakpoints","arguments":{"filters":[]},"type":"request","seq":8} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"configurationDone","type":"request","seq":9} [2020-08-15T17:15:49Z DEBUG codelldb::dap_codec] {"command":"threads","type":"request","seq":10} warning: (arm) /lib/arm-linux-gnueabihf/ld-2.28.so Unable to initialize decompressor for section '.debug_abbrev': zlib is not available warning: (arm) /lib/arm-linux-gnueabihf/ld-2.28.so Unable to initialize decompressor for section '.debug_str': zlib is not available warning: (arm) /lib/arm-linux-gnueabihf/ld-2.28.so Unable to initialize decompressor for section '.debug_info': zlib is not available [2020-08-15T17:15:51Z DEBUG codelldb::dap_codec] [2020-08-15T17:15:52Z DEBUG codelldb::debug_session] Debug event: 0xafb01060 Event: broadcaster = 0x2121fc8 (lldb.process), type = 0x00000001 (state-changed), data = { process = 0x2121fa8 (pid = 27337), state = stopped} [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":26,"event":"stopped","body":{"allThreadsStopped":true,"reason":"breakpoint","threadId":27337}} [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":11} [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":11,"success":true,"command":"threads","body":{"threads":[{"id":27337,"name":"1: tid=27337 "test-main""}]}} [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":27337,"startFrame":0,"levels":1},"type":"request","seq":12} [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":27337,"startFrame":0,"levels":20},"type":"request","seq":13} warning: (arm) /lib/arm-linux-gnueabihf/libc.so.6 Unable to initialize decompressor for section '.debug_frame': zlib is not available [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":12,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":92,"id":1001,"line":148,"name":"SmoothTrajectoryGenerator::buildMotionPlanningProblem(Point, Point, bool)","source":{"name":"SmoothTrajectoryGenerator.cpp","path":"/home/pi/DominoRobot/src/robot/src/SmoothTrajectoryGenerator.cpp"}}],"totalFrames":15}} [2020-08-15T17:15:52Z DEBUG codelldb::disassembly] libc.so.6__libc_start_main + 268 [2020-08-15T17:15:52Z DEBUG codelldb::disassembly] test-main
_start + 44 [2020-08-15T17:15:52Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":13,"success":true,"command":"stackTrace","body":{"stackFrames":[{"column":92,"id":1002,"line":148,"name":"SmoothTrajectoryGenerator::buildMotionPlanningProblem(Point, Point, bool)","source":{"name":"SmoothTrajectoryGenerator.cpp","path":"/home/pi/DominoRobot/src/robot/src/SmoothTrajectoryGenerator.cpp"}},{"column":95,"id":1003,"line":86,"name":"SmoothTrajectoryGenerator::generatePointToPointTrajectory(Point, Point, bool)","source":{"name":"SmoothTrajectoryGenerator.cpp","path":"/home/pi/DominoRobot/src/robot/src/SmoothTrajectoryGenerator.cpp"}},{"column":49,"id":1004,"line":42,"name":"::_C_A_T_C_H____T_E_S_T____0()","source":{"name":"SmoothTrajectoryGenerator_Test.cpp","path":"/home/pi/DominoRobot/src/robot/test/SmoothTrajectoryGenerator_Test.cpp"}},{"column":25,"id":1005,"line":14222,"name":"Catch::TestInvokerAsFunction::invoke() const","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":21,"id":1006,"line":14065,"name":"Catch::TestCase::invoke() const","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":33,"id":1007,"line":12924,"name":"Catch::RunContext::invokeActiveTestCase()","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":37,"id":1008,"line":12897,"name":"Catch::RunContext::runCurrentTest(std::cxx11::basic_string<char, std::char_traits, std::allocator :0.200000003, max_acc:0.5, ...}","variablesReference":1025},{"evaluateName":"rotationalLimits","name":"rotationalLimits","type":"DynamicLimits","value":"{max_vel:1, max_acc:1, max_jerk:2}","variablesReference":1026}]}} [2020-08-15T17:15:55Z DEBUG codelldb::dap_codec] --> {"command":"evaluate","arguments":{"expression":"trajectory","frameId":1001,"context":"hover"},"type":"request","seq":17} free(): invalid next size (fast) Received signal: SIGABRT 0: backtrace::backtrace::trace 1: backtrace::capture::Backtrace::new 2: codelldb::hook_crashes::handler 3:>&, std::cxx11::basic_string<char, std::char_traits , std::allocator :0, a:0}","variablesReference":1023},{"evaluateName":"fineMode","name":"fineMode","type":"bool","value":"false","variablesReference":0},{"evaluateName":"mpp","name":"mpp","type":"MotionPlanningProblem","value":"{...}","variablesReference":1024},{"evaluateName":"translationalLimits","name":"translationalLimits","type":"DynamicLimits","value":"{max_vel>&)","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":27,"id":1009,"line":12658,"name":"Catch::RunContext::runTest(Catch::TestCase const&)","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":62,"id":1010,"line":13252,"name":"Catch::(anonymous namespace)::TestGroup::execute() const","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":47,"id":1011,"line":13458,"name":"Catch::Session::runInternal()","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":35,"id":1012,"line":13414,"name":"Catch::Session::run()","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":33,"id":1013,"line":13136,"name":"int Catch::Session::run (int, char const* const*)","source":{"name":"catch.hpp","path":"/home/pi/DominoRobot/src/robot/lib/Catch/catch.hpp"}},{"column":38,"id":1014,"line":11,"name":"main","source":{"name":"test-main.cpp","path":"/home/pi/DominoRobot/src/robot/test/test-main.cpp"}},{"column":0,"id":1015,"line":70,"name":"libc_start_main","presentationHint":"subtle","source":{"name":"@libc_start_main","sourceReference":1000}},{"column":0,"id":1016,"line":14,"name":"start","presentationHint":"subtle","source":{"name":"@start","sourceReference":1001}}],"totalFrames":15}} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":27337,"startFrame":15,"levels":19},"type":"request","seq":14} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":14,"success":true,"command":"stackTrace","body":{"stackFrames":[],"totalFrames":15}} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] --> {"command":"scopes","arguments":{"frameId":1001},"type":"request","seq":15} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":15,"success":true,"command":"scopes","body":{"scopes":[{"expensive":false,"name":"Local","variablesReference":1017},{"expensive":false,"name":"Static","variablesReference":1018},{"expensive":false,"name":"Global","variablesReference":1019},{"expensive":false,"name":"Registers","variablesReference":1020}]}} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] --> {"command":"variables","arguments":{"variablesReference":1017},"type":"request","seq":16} [2020-08-15T17:15:53Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":16,"success":true,"command":"variables","body":{"variables":[{"evaluateName":"this","name":"this","type":"SmoothTrajectoryGenerator *const","value":"{solver_max_loops:10, solver_beta_decay:0.800000011, ...}","variablesReference":1021},{"evaluateName":"initialPoint","name":"initialPoint","type":"Point","value":"{x:0, y:0, a:0}","variablesReference":1022},{"evaluateName":"targetPoint","name":"targetPoint","type":"Point","value":"{x:10, y Debug adapter exit code=255, signal=null.
The last entry in the debug log is evaluation on hover, so I assume this is where it crashed. LLDB is not bug-free, unfortunately. :(
Ah so this is an issue with LLDB itself then? Not an issue with the plugin? Is this something that I could potentially work around by not hovering over variables?
It seems like it happens sometimes without me even having any sort of input (i.e. I'm just sitting and looking at the screen not moving the mouse or anything) so that is what is particularly confusing to me.