Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
On 9/21/2017 4:13 PM, Richard Hipp wrote:
> I think you can omit the IOERR_RETRY now.  I believe I have fixed that
> problem in the Windows VFS of SQLite.  At least, it works for me on my
> Win10 laptop when I set the repository file to read-only.  Please try
> it and let me know either way.

Oh good, I didn't realize you changed that as well.  This fix works for
me too, no need for CFLAGS=-DSQLITE_WIN32_IOERR_RETRY=0.

-- 
Andy Goth | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/21/17, Andy Goth  wrote:
> On 9/21/2017 3:48 PM, Richard Hipp wrote:
>> The latest check-in
>> (https://www.fossil-scm.org/fossil/info/e97d4443d5628702) loads a new
>> version of SQLite which should address the issues of trying to open a
>> read-only database file.  Please try it and let me know.
>
> Looks good to me, provided I compile Fossil thus:
>
> make -f win/Makefile.mingw FOSSIL_ENABLE_SSL=1
> OPENSSLDIR=/usr/local/openssl OPENSSLLIBDIR=/usr/local/openssl/lib
> CFLAGS=-DSQLITE_WIN32_IOERR_RETRY=0
>
> Any thoughts on IOERR_RETRY?

I think you can omit the IOERR_RETRY now.  I believe I have fixed that
problem in the Windows VFS of SQLite.  At least, it works for me on my
Win10 laptop when I set the repository file to read-only.  Please try
it and let me know either way.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
On 9/21/2017 3:51 PM, Richard Hipp wrote:
> Your fix to the /doc webpage was also helpful, Andy.  I had seen that
> error before but then it went away mysteriously and I was wondering
> what happened.  Apparently I pulled in your fix while testing my
> changes, without realizing it.  :-)

When testing my previous change addressing this issue
(http://fossil-scm.org/index.html/info/95edba6534dafc1f), I did so on a
scrubbed repository which didn't have a vcache table, so i didn't
realize it could get in trouble if vcache already existed but needed to
be updated with the new vid.

-- 
Andy Goth | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
On 9/21/2017 3:48 PM, Richard Hipp wrote:
> The latest check-in
> (https://www.fossil-scm.org/fossil/info/e97d4443d5628702) loads a new
> version of SQLite which should address the issues of trying to open a
> read-only database file.  Please try it and let me know.

Looks good to me, provided I compile Fossil thus:

make -f win/Makefile.mingw FOSSIL_ENABLE_SSL=1
OPENSSLDIR=/usr/local/openssl OPENSSLLIBDIR=/usr/local/openssl/lib
CFLAGS=-DSQLITE_WIN32_IOERR_RETRY=0

Having previously built OpenSSL as described in my email:

https://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg25885.html

Any thoughts on IOERR_RETRY?  I'm hoping I don't run into problems on my
normal development system since it's infected with Symantec, which in
the recent past has quarantined the programs I wrote right as they are
written by the compiler.  Look buddy I know my code has bugs but at
least give me a chance to run it through gdb!

-- 
Andy Goth | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/21/17, Richard Hipp  wrote:
> On 9/21/17, Andy Goth  wrote:
>>
>>> 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:
>>
>
> The latest check-in
> (https://www.fossil-scm.org/fossil/info/e97d4443d5628702) loads a new
> version of SQLite which should address the issues of trying to open a
> read-only database file.  Please try it and let me know.

Your fix to the /doc webpage was also helpful, Andy.  I had seen that
error before but then it went away mysteriously and I was wondering
what happened.  Apparently I pulled in your fix while testing my
changes, without realizing it.  :-)

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/21/17, Andy Goth  wrote:
>
>> 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:
>

The latest check-in
(https://www.fossil-scm.org/fossil/info/e97d4443d5628702) loads a new
version of SQLite which should address the issues of trying to open a
read-only database file.  Please try it and let me know.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
On 9/21/2017 3:17 PM, Andy Goth wrote:
> The winOpen() function then successfully retries with flags altered to
> contain SQLITE_OPEN_READONLY instead of SQLITE_OPEN_READWRITE, and this
> 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.

I tried the change you just checked into the SQLite repository (thanks
for the same-minute turnaround time on that), and it solves my problem.

Now is there anything to be done about the file locking issue?  I just
recompiled without -DSQLITE_WIN32_IOERR_RETRY=0 in case it was magically
fixed, but of course not.  So more thought is needed.

For now I can just ship with -DSQLITE_WIN32_IOERR_RETRY=0, but I'd like
to be able to use the next Fossil release binary out of the box.

-- 
Andy Goth | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
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 ,
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 ,
zPath=0x16c1ef8 "C:\\Users\\andy\\repos\\fossil.fossil",
pFile=0x16c1e20, flags=262, pFlagsOut=0x28ed8c) at
src/sqlite3.c:20884
#2  0x00529aa2 in sqlite3PagerOpen (pVfs=0x77e360 ,
ppPager=0x16c1cb0, zFilename=0x16c1970
"C:/Users/andy/devel/fossil/../../repos/fossil.fossil",nExtra=84,
flags=0, vfsFlags=262, xReinit=0x5322fe ) at
src/sqlite3.c:52249
#3  0x005324b8 in sqlite3BtreeOpen (pVfs=0x77e360 ,
zFilename=0x16c1970
"C:/Users/andy/devel/fossil/../../repos/fossil.fossil",
db=0x17c1c28, ppBtree=0x16835cc, flags=0, vfsFlags=262) at
src/sqlite3.c:61991
#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
"C:/Users/andy/devel/fossil/../../repos/fossil.fossil",
zLabel=0x7dc395  "repository") at src/db.c:1139
#10 0x00421b8f in db_open_or_attach (zDbName=0x16c19f8
"C:/Users/andy/devel/fossil/../../repos/fossil.fossil",
zLabel=0x7dc395  "repository") at src/db.c:1205
#11 0x0042248a in db_open_repository (zDbName=0x16c1920
"C:/Users/andy/devel/fossil/../../repos/fossil.fossil") at
src/db.c:1518
#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:

SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE

The winOpen() function then successfully retries with flags altered to
contain SQLITE_OPEN_READONLY instead of SQLITE_OPEN_READWRITE, and this
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 | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Warren Young
On Sep 21, 2017, at 11:16 AM, Andy Goth  wrote:
> 
> xyzzy...Nothing happens.

You win 10 geek points today.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/21/17, Andy Goth  wrote:
>
> To reproduce, all that's needed is to set the repository file read-only in
> Windows, then run "fossil ui".
>

So it is.  You can also repro by running a plain old "sqlite3.exe"
command-line shell.  Start the shell with no argument, then type ".log
stdout" to cause logging output to get to the screen rather than being
discarded.  Then do ".open readonly.db".

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.

As an interim fix, can you recompile with -DSQLITE_WIN32_IOERR_RETRY=0
and let me know if that clears the problem for you?
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
Nothing happens.

By which I mean Fossil refuses to start, saying it sees no xyzzy here. So,
twice as much happens.

Therefore it is honoring my VFS change, and picking win32-none is not the
solution to my problem.

To reproduce, all that's needed is to set the repository file read-only in
Windows, then run "fossil ui".

On Sep 21, 2017 9:29 AM, "Richard Hipp"  wrote:

On 9/21/17, Andy Goth  wrote:
> I added "set FOSSIL_VFS=win32-none" to my documentation viewer batch file.
> This had no apparent effect. Is there another value I can give it that
will
> have a more dramatic effect to confirm it's being seen by Fossil?

set FOSSIL_VFS=xyzzy

Then run:  fossil status

You should see: no such VFS: "xyzzy"

--
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/21/17, Andy Goth  wrote:
> I added "set FOSSIL_VFS=win32-none" to my documentation viewer batch file.
> This had no apparent effect. Is there another value I can give it that will
> have a more dramatic effect to confirm it's being seen by Fossil?

set FOSSIL_VFS=xyzzy

Then run:  fossil status

You should see: no such VFS: "xyzzy"

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
I added "set FOSSIL_VFS=win32-none" to my documentation viewer batch file.
This had no apparent effect. Is there another value I can give it that will
have a more dramatic effect to confirm it's being seen by Fossil?

On Sep 21, 2017 8:08 AM, "Richard Hipp"  wrote:

> On 9/20/17, Andy Goth  wrote:
> > I'm fine in Linux working from a loopback-mounted ISO9660 disc image,
> > but in Windows 8.1 doing the same nets me the following:
> >
> > SQLITE_NOTE: delayed 1375ms for lock/sharing conflict at line 43312
> > SQLITE_CANTOPEN: os_win.c:43319:(5) winOpen(E:\repo.fossil) - Access is
> > denied.
> >
>
> Try setting the FOSSIL_VFS environment variable to "win32-none".  That
> will disable all file locking on the repository (on windows), which
> should be harmless in that the filesystem is readonly so that another
> process cannot change the file out from under Fossil.
>
> The equivalent for Unix would be "unix-none", of course.
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Richard Hipp
On 9/20/17, Andy Goth  wrote:
> I'm fine in Linux working from a loopback-mounted ISO9660 disc image,
> but in Windows 8.1 doing the same nets me the following:
>
> SQLITE_NOTE: delayed 1375ms for lock/sharing conflict at line 43312
> SQLITE_CANTOPEN: os_win.c:43319:(5) winOpen(E:\repo.fossil) - Access is
> denied.
>

Try setting the FOSSIL_VFS environment variable to "win32-none".  That
will disable all file locking on the repository (on windows), which
should be harmless in that the filesystem is readonly so that another
process cannot change the file out from under Fossil.

The equivalent for Unix would be "unix-none", of course.
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Andy Goth
Okay cool, I'll tell the Air Force that's what they need to do.

On Thu, Sep 21, 2017 at 7:13 AM, Roy Keene  wrote:

> Quit using Windows ?
>
>
> On Wed, 20 Sep 2017, Andy Goth wrote:
>
> I'm fine in Linux working from a loopback-mounted ISO9660 disc image,
>> but in Windows 8.1 doing the same nets me the following:
>>
>> SQLITE_NOTE: delayed 1375ms for lock/sharing conflict at line 43312
>> SQLITE_CANTOPEN: os_win.c:43319:(5) winOpen(E:\repo.fossil) - Access is
>> denied.
>>
>> Followed by what appears to be normal operation.  I get my web pages,
>> and it seems good, except for three problems.
>>
>> One, page generation is a lot slower since I'm guessing it's having to
>> wait a few seconds each request for some timeout.
>>
>> Two, the errors themselves appear at the top of every page.
>>
>> Three, the errors also appear in HTML format at the start of style.css,
>> corrupting the first definition and messing up the page style.
>>
>> What can be done about this?
>>
>> --
>> Andy Goth | 
>>
>>
>> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>



-- 
Andy Goth | 
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Continued issues with read-only repository

2017-09-21 Thread Roy Keene

Quit using Windows ?

On Wed, 20 Sep 2017, Andy Goth wrote:


I'm fine in Linux working from a loopback-mounted ISO9660 disc image,
but in Windows 8.1 doing the same nets me the following:

SQLITE_NOTE: delayed 1375ms for lock/sharing conflict at line 43312
SQLITE_CANTOPEN: os_win.c:43319:(5) winOpen(E:\repo.fossil) - Access is
denied.

Followed by what appears to be normal operation.  I get my web pages,
and it seems good, except for three problems.

One, page generation is a lot slower since I'm guessing it's having to
wait a few seconds each request for some timeout.

Two, the errors themselves appear at the top of every page.

Three, the errors also appear in HTML format at the start of style.css,
corrupting the first definition and messing up the page style.

What can be done about this?

--
Andy Goth | 



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Continued issues with read-only repository

2017-09-20 Thread Andy Goth
I'm fine in Linux working from a loopback-mounted ISO9660 disc image,
but in Windows 8.1 doing the same nets me the following:

SQLITE_NOTE: delayed 1375ms for lock/sharing conflict at line 43312
SQLITE_CANTOPEN: os_win.c:43319:(5) winOpen(E:\repo.fossil) - Access is
denied.

Followed by what appears to be normal operation.  I get my web pages,
and it seems good, except for three problems.

One, page generation is a lot slower since I'm guessing it's having to
wait a few seconds each request for some timeout.

Two, the errors themselves appear at the top of every page.

Three, the errors also appear in HTML format at the start of style.css,
corrupting the first definition and messing up the page style.

What can be done about this?

-- 
Andy Goth | 



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users