On 9/21/2017 1:18 PM, Richard Hipp wrote:
> The problem is that the Windows VFS has logic that retries failed I/O
> operations repeatedly before giving up.  This is a work-around to the
> common issue of anti-virus software holding files hostage while they
> are being scanned.

It was a mistake to ever let the humans use computers.

> As an interim fix, can you recompile with -DSQLITE_WIN32_IOERR_RETRY=0
> and let me know if that clears the problem for you?

This improves matters but doesn't totally fix everything.  Fossil starts
far faster and no longer has the lock/sharing conflict warning.
However, it still has the access denied error:

SQLITE_CANTOPEN: os_win.c:43319: (5)
winOpen(c:\Users\andy\repos\fossil.fossil) - Access is denied.

This time I'm running it on a different computer with a different
database, just Fossil itself, so I don't have to bother deploying the
new fossil.exe.

The major consequence of having the error message is that it breaks CSS
due to appearing right at the start of style.css, which is not HTML.

Here's what gdb has to say:

#0  winOpen (pVfs=0x77e360 <winVfs.39531>,
    zName=0x16c1ef8 "C:\\Users\\andy\\repos\\fossil.fossil",
    id=0x16c1e20, flags=262, pOutFlags=0x28ed8c) at src/sqlite3.c:43319
#1  0x00518533 in sqlite3OsOpen (pVfs=0x77e360 <winVfs.39531>,
    zPath=0x16c1ef8 "C:\\Users\\andy\\repos\\fossil.fossil",
    pFile=0x16c1e20, flags=262, pFlagsOut=0x28ed8c) at
#2  0x00529aa2 in sqlite3PagerOpen (pVfs=0x77e360 <winVfs.39531>,
    ppPager=0x16c1cb0, zFilename=0x16c1970
    flags=0, vfsFlags=262, xReinit=0x5322fe <pageReinit>) at
#3  0x005324b8 in sqlite3BtreeOpen (pVfs=0x77e360 <winVfs.39531>,
    db=0x17c1c28, ppBtree=0x16835cc, flags=0, vfsFlags=262) at
#4  0x00561da7 in attachFunc (context=0x1687298, NotUsed=3,
    argv=0x16872b4) at src/sqlite3.c:99901
#5  0x0055027d in sqlite3VdbeExec (p=0x1686de8) at src/sqlite3.c:86102
#6  0x0054619f in sqlite3Step (p=0x1686de8) at src/sqlite3.c:77478
#7  0x005463b2 in sqlite3_step (pStmt=0x1686de8) at src/sqlite3.c:77541
#8  0x00420cda in db_multi_exec (
    zSql=0x16c1ac8 "ATTACH DATABASE
    'C:/Users/andy/devel/fossil/../../repos/fossil.fossil' AS
    'repository' KEY ''") at src/db.c:572
#9  0x00421a13 in db_attach (zDbName=0x16c19f8
    zLabel=0x7dc395 <empty_Stmt+1653> "repository") at src/db.c:1139
#10 0x00421b8f in db_open_or_attach (zDbName=0x16c19f8
    zLabel=0x7dc395 <empty_Stmt+1653> "repository") at src/db.c:1205
#11 0x0042248a in db_open_repository (zDbName=0x16c1920
    "C:/Users/andy/devel/fossil/../../repos/fossil.fossil") at
#12 0x00422240 in db_open_local (zDbName=0x0) at src/db.c:1433
#13 0x0042257c in db_find_and_open_repository (bFlags=0, nArgUsed=0)
    at src/db.c:1560
#14 0x00446473 in info_cmd () at src/info.c:216
#15 0x00452844 in main (argc=3, argv=0x17c1b58) at src/main.c:760

The flags=262 argument decodes to:


The winOpen() function then successfully retries with flags altered to
succeeds.  Trouble is, winLog() was already called, and the error
message propagated back to Fossil and eventually the web server as
garbage at the beginning of the CSS file.

Andy Goth | <andrew.m.goth/at/gmail/dot/com>

Attachment: signature.asc
Description: OpenPGP digital signature

fossil-users mailing list

Reply via email to