vadimcn / codelldb

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

debugger crashes on launch #1159

Open Spongman opened 2 weeks ago

Spongman commented 2 weeks ago

something changed recently, it used to work fine. now it just crashes immediately on startup. also, after it crashes the vscode debug UI continues to show that it's debugging, and the 'stop' button does nothing. a 'reload window' is required to try again...

image

OS: rocky 9.4 VSCode version: 1.94.0 CodeLLDB version: 1.11.0 Compiler: gcc (GCC) 13.3.1 20240611 (Red Hat 13.3.1-2) Debuggee: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=c69dc0f66ac264b0fac0350c1b39ec25592f2ab5, for GNU/Linux 3.2.0, with debug_info, not stripped

Verbose log
Initial debug configuration: {
  name: '(lldb) APP1',
  type: 'lldb',
  request: 'launch',
  program: '${workspaceFolder}/output/bin/APP',
  cwd: '${workspaceFolder}/output',
  args: [ '-v', '-s', 'APP1' ],
  env: {
    PRODUCT_NAME: 'm2m',
    GN_HOME: '${workspaceFolder}/output',
    LD_LIBRARY_PATH: '${workspaceFolder}/output/lib:/home/user/gperftools/build/'
  },
  __configurationTarget: 6
}
Resolved debug configuration: {
  name: '(lldb) APP1',
  type: 'lldb',
  request: 'launch',
  program: '${workspaceFolder}/output/bin/APP',
  cwd: '${workspaceFolder}/output',
  args: [ '-v', '-s', 'APP1' ],
  env: {
    PRODUCT_NAME: 'm2m',
    GN_HOME: '${workspaceFolder}/output',
    LD_LIBRARY_PATH: '${workspaceFolder}/output/lib:/home/user/gperftools/build/'
  },
  __configurationTarget: 6,
  relativePathBase: '/home/user/project',
  _adapterSettings: {
    displayFormat: 'auto',
    showDisassembly: 'auto',
    dereferencePointers: true,
    suppressMissingSourceFiles: true,
    evaluationTimeout: 5,
    consoleMode: 'commands',
    sourceLanguages: null,
    scriptConfig: {},
    terminalPromptClear: null,
    evaluateForHovers: true,
    commandCompletions: true,
    reproducer: false
  }
}
liblldb: /usr/lib64/liblldb.so.17
environment: { LLDB_DEBUGSERVER_PATH: '/usr/bin/lldb-server' }
settings: { evaluateForHovers: true, commandCompletions: true }
Received signal: SIGSEGV
   0: codelldb::hook_crashes::handler
   1: 

Debug adapter exit code=255 (0xff), signal=null.
$ /usr/bin/lldb-server v
lldb version 17.0.6
vadimcn commented 2 weeks ago

I see you use a custom liblldb. Try the bundled one.

dawidl022 commented 1 week ago

I encountered a similar issue on MacOS 13.5.2. Downgrading CodeLLDB to v1.10.0 fixed the issue for me.

vadimcn commented 4 days ago

@dawidl022 See #999. TL;DR: try deleting debugserver in the extension directory. Are you running on x86 machine?

etelstan commented 3 days ago

@vadimcn I have the same issue on Oracle Linux 8.10 trying to work with LLDB 17. I cannot use bundled, since we are using customized version of LLDB and the whole point is to have vscode UI on top of that particular LLDB distribution. v1.11.0 crashes, while v1.10.0 does work. Does that mean, that 1.11 doesn't support LLDB 17 ?