Skip to content

sqlite: keep database alive while a session is open#63797

Open
3zrv wants to merge 2 commits into
nodejs:mainfrom
3zrv:fix/sqlite-session-crash
Open

sqlite: keep database alive while a session is open#63797
3zrv wants to merge 2 commits into
nodejs:mainfrom
3zrv:fix/sqlite-session-crash

Conversation

@3zrv
Copy link
Copy Markdown
Contributor

@3zrv 3zrv commented Jun 8, 2026

fixes: #63796

Verification

  • Repro crashes (SIGSEGV, exit 139) before the change; throws ERR_INVALID_STATE after.
  • New regression test fails (segfault) on an unfixed build and passes on the fixed build.
  • Full test/parallel/test-sqlite-session.js suite passes (26/26).

Signed-off-by: Mohamed Sayed <k@3zrv.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Jun 8, 2026
@louwers
Copy link
Copy Markdown
Contributor

louwers commented Jun 8, 2026

I think a session is supposed to keep the database alive...

Signed-off-by: Mohamed Sayed <k@3zrv.com>
@3zrv 3zrv changed the title sqlite: fix crash when a session outlives its database sqlite: keep database alive while a session is open Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:sqlite: process crash (SIGSEGV) when a Session outlives its garbage-collected DatabaseSync

3 participants