Closed Bug 405815 Opened 18 years ago Closed 18 years ago

Loop in sqlite3WinTempFileName

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mayhemer, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9pre) Gecko/20071026 BonEcho/2.0.0.9pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9pre) Gecko/20071026 BonEcho/2.0.0.9pre Happens probably just in the debug build of Firefox 2.0.0.*. I have installed a debug HEAD build (from time of this bug report) of the AllPeers extension (exactly the 0.75rc14pre version). Always happened only during very start or very shutdown of Firefox. There is for(;;) loop in db\sqlite3\src\os_win.c file line 874 that tries to find name for a temp file. The loop is stopped at the moment the sqlite3OsFileExists() function returns FALSE as a result. Problem is that this method pointer directs to AsyncFileExists in file storage\src\mozstorageasyncio.cpp(944) that at its very start checks for AsyncWriteError global variable value. When this variable is not set to SQLITE_OK value of the variable is returned immediately. In case of the loop occurrence AsyncWriteError has value 14. In the text console there is following error logged: !!! ASSERTION: FILE ERROR: 'Not Reached', file d:/mozilla/storage/src/mozStorageAsyncIO.cpp, line 1536 followed by our extension log of failing mozIStorageStatement::ExecuteStep() call on two separate thread. Both threads were accessing the database using two separate connections used just on those two threads respectively. After these logs the loop with 100% CPU load started. Reproducible: Sometimes
(In reply to comment #0) > followed by our extension log of failing mozIStorageStatement::ExecuteStep() > call on two separate thread. Both threads were accessing the database using two > separate connections used just on those two threads respectively. I'm fairly certain that that isn't safe still because of how we do IO (which is probably what you hit).
Just one more note: this has occurred also when there were just a single thread accessing only a single connection.
sqlite3OsFileExists() is gone on trunk. Marking as fixed because this bug is no more possible there.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
WORKSFORME since no specific change seems to have fixed it.
Resolution: FIXED → WORKSFORME
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.