nodejs / nodejs/node

Web Storage Maybe leaks SQLite connections when database initialization fails

Open
#64,640 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

sqlite
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Version

latest main branch

Platform

Subsystem

No response

What steps will reproduce the bug?

use broken db or many of condition

How often does it reproduce? Is there a required condition?

Every failed init

What is the expected behavior? Why is that the expected behavior?

A connection created by sqlite3_open() should be closed whenever database initialization fails. Repeated failed Web Storage operations should not increase the number of open file descriptors.

What do you see instead?

The number of open descriptors increases with every failed initialization attempt.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a failed Web Storage database initialization and tracing the sqlite3_open() connection lifecycle during the failure path. Done means every failed initialization closes its connection, and repeated failed Web Storage operations no longer increase the number of open file descriptors.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.