Hi there! I believe I've found a SQLite bug that triggers TSAN. I'm hoping to either confirm this bug or learn what I'm doing wrong. Some background: in our code, we make sure to synchronize writes to our database such that only one write can happen at any given time for the same database in our application (i.e. there's one synchronized writer connection). However, we allow any number of reads (readers create their own connections, which are similarly not shared with other threads) to happen on the same database (with a cap on the number of connections to respect resource limits). Additionally, the database has PRAGMA journal_mode=WAL; set. At the moment when TSAN is triggered, there is one reader and one writer each with their own connection to the same db performing a read and a write:
- Reader is running: sqlite3WalFindFrame, specifically the line with this code (line 59679 in my sqlite.c): for(iKey=walHash(pgno); aHash[iKey]; iKey=walNextHash(iKey)){ - Writer is running walIndexAppend, specifically the line with this code (line 57856 in my sqlite.c): aHash[iKey] = (ht_slot)idx; I apologize if those line numbers aren't helpful, however I hope the function names + code are unique enough to locate the lines in question. This is sqlite3 version 3.23.1. Please let me know if there's any other information I can provide. Thanks! Ben _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users