Skip to content

Fix: Prevent SQLite ENOENT/SIGSEGV, auto-create dirs, automate GitHub Releases#16

Merged
cto-new[bot] merged 1 commit into
mainfrom
bugfix-segfault-enoent-lseek-mmap-ci-publish-release
Nov 4, 2025
Merged

Fix: Prevent SQLite ENOENT/SIGSEGV, auto-create dirs, automate GitHub Releases#16
cto-new[bot] merged 1 commit into
mainfrom
bugfix-segfault-enoent-lseek-mmap-ci-publish-release

Conversation

@cto-new

@cto-new cto-new Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR fixes a critical segmentation fault caused by ENOENT errors in SQLite, improves database and upload reliability, and automates release creation for tagged versions.

Details

  • Ensures the database directory exists before opening, preventing ENOENT failures
  • Disables SQLite mmap (PRAGMA mmap_size=0), avoiding segfaults when db files go missing
  • Enables Write-Ahead Logging (WAL) mode and a 5-second busy timeout for improved concurrency
  • Auto-creates the file upload directory on startup, logging warnings on failure
  • Updates .gitignore to ignore SQLite WAL/shm files
  • CI workflow now creates automatic GitHub Releases (binary, checksums) when a new tag is pushed
  • Adds full changelog and release documentation

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

…irs, automate releases

Fixes segfaults caused by ENOENT errors during SQLite file operations by ensuring
database directories exist before opening, disabling mmap to prevent crashes when
db files are missing, and enabling WAL mode with a 5s busy timeout for concurrency.
Also auto-creates the upload directory on startup for file uploads, logs errors
if creation fails, and updates .gitignore for WAL/shm files. CI workflow now
automatically creates GitHub Releases and artifacts on tag push.

This improves reliability (no more memory errors if db/upload directory absent),
concurrency, and streamlines the release process. No migration is necessary for
existing databases.
@cto-new cto-new Bot merged commit 5def704 into main Nov 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants