Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sqlite3.Open thread safe #790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 28, 2020

  1. Make sqlite3.Open thread safe

    * sqlite3_open_v2 implicitly calls sqlite3_initialize
    * sqlite3_initialize is not thread safe in the prologue
    * concurrent calls of sqlite3.Open even on different files
      may trigger mutex initialization race and crash
    * Fix: use go channel with a single message in it as a barrier
      letting only single-threaded sqlite3_open_v2 for the first time
    * Reproducibility: very low, couple hours of concurrent sqlite3.Open calls
      trigger a single crash
    algorandskiy committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    28b2391 View commit details
    Browse the repository at this point in the history