microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.76k stars 28.18k forks source link

SEGFAULT in @vscode/sqlite3 #219595

Open TheDevMinerTV opened 2 weeks ago

TheDevMinerTV commented 2 weeks ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Run VSCode on a Linux system
  2. Use KDE's "Crashed Processes Viewer"

Backtrace:

#0  sqlite3VdbeExec (p=p@entry=0x2c03bc8ca0) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:98848
#1  0x00007ffff5566d24 in sqlite3Step (p=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91222
#2  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91283
#3  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91272
#4  0x00007ffff15edec6 in node_sqlite3::Statement::Work_Run(napi_env__*, void*) ()
    at /opt/visual-studio-code/resources/app/node_modules.asar.unpacked/@vscode/sqlite3/build/Release/vscode-sqlite3.node
#5  0x000055555ea7ab20 in ??? ()
#6  0x0000000000000214 in ??? ()
#7  0x0000000000000000 in ??? ()

Issue in the module's repo: https://github.com/microsoft/vscode-node-sqlite3/issues/45

TheDevMinerTV commented 2 weeks ago

Apparently forcing VSCode to open a clean window using code -n and then just reopening my project fixed it.

wprzytula commented 1 week ago

I can confirm experiencing similar error on OSS-code 1.90.0

                #0  0x0000000001010101 n/a (n/a + 0x0)
                #1  0x0000750c28a82d24 sqlite3_step (libsqlite3.so.0 + 0x4bd24)
                #2  0x0000750b98ab2e0b _ZN12node_sqlite39Statement8Work_RunEP10napi_env__Pv (vscode-sqlite3.node + 0x47e0b)
                #3  0x000064ddeca233aa n/a (electron + 0x97123aa)
                #4  0x000064ddeca23281 n/a (electron + 0x9712281)
                #5  0x000064dde4a3314e n/a (electron + 0x172214e)
                #6  0x0000750c2bbd8ded n/a (libc.so.6 + 0x92ded)
                #7  0x0000750c2bc5c0dc n/a (libc.so.6 + 0x1160dc)
siakc commented 1 week ago
Stack trace of thread 3455:
                                                      #0  0x0000000001010101 n/a (n/a + 0x0)
                                                      #1  0x000072533f668d24 sqlite3_step (libsqlite3.so.0 + 0x4bd24)
                                                      #2  0x000072533d69de0b _ZN12node_sqlite39Statement8Work_RunEP10napi_env__Pv (vscode-sqlite3.node + 0x47e0b)
                                                      #3  0x00006214cc1cf3aa n/a (electron + 0x97123aa)
                                                      #4  0x00006214cc1cf281 n/a (electron + 0x9712281)
                                                      #5  0x00006214c41df14e n/a (electron + 0x172214e)
                                                      #6  0x00007253427ccded n/a (libc.so.6 + 0x92ded)
                                                      #7  0x00007253428500dc n/a (libc.so.6 + 0x1160dc)

Does not let me upload .zst core dump.

matthewwardrop commented 1 week ago

I'm seeing a similar stack trace here too (Arch Linux latest, VS Code 1.91):

#0  0x0000000001010101 in ?? ()
#1  0x000079bb5352edc7 in sqlite3VdbeExec (p=p@entry=0x23b803234ca0) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:98848
#2  0x000079bb53536d24 in sqlite3Step (p=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91222
#3  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91283
#4  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91272
#5  0x000079bb4c3edec6 in node_sqlite3::Statement::Work_Run(napi_env__*, void*) () from /opt/visual-studio-code/resources/app/node_modules.asar.unpacked/@vscode/sqlite3/build/Release/vscode-sqlite3.node
#6  0x00006302a2f3fb20 in ?? ()
#7  0x00000000000002f0 in ?? ()
#8  0x0000000000000000 in ?? ()

It definitely seems to be related to restoring of project state, since as above code -n fixes the issue. Will report back further if I can reproduce the error reliably.

matthewwardrop commented 1 week ago

Hmm... so I can reliably reproduce this starting from scratch, but I'm not at liberty to share the repositories I'm using publically. @deepak1556 Let me know if there's some way I can share relevant information with you about this one.