Re: [fossil-users] Problem accessing shared folder in VirtualBox

2014-06-29 Thread Jan Nijtmans
2014-06-29 2:18 GMT+02:00 Andy Goth andrew.m.g...@gmail.com:
 I did a bisect to pinpoint the fault.  This is Fossil, after all.

 $ f bisect status
 2013-11-19 13:09:40 6791ad1185f374dc BAD CURRENT
 2013-11-15 12:58:56 1928cf526ef478b4 GOOD
 $ f timeline 6791ad1185f374dc
 === 2013-11-19 ===
 13:09:40 [6791ad1185] *CURRENT* Now that checkout_cmd() can handle the
  situation that vid==0 ([b725c1cf26]), no longer assume that the
  initial commit has rid=1: If the initial commit is not empty that
  will not be true any more. (user: jan.nijtmans tags: trunk)
 === 2013-11-15 ===

Reading all this (and triggered by the finding that my commit
might have introduced a bug...);-)

My explanation is that [6791ad1185] really introduced the
bug, but not by really causing it but by unmasking a
bug which was already there. This commit changed
the way a repository is opened for the first time, so
it changes the order of I/O-operations done to the
drive. On most systems this makes no difference,
but apparently on VirtualBox shared drives it does.

Why? My guess is that it's the windows file system
which is at fault here: sometimes another process
can block I/O operations for a short while (e.g. McAfee
for checking whether there is a viris in it). SQLite
has a workaround for this problem (the retry mechanism
in os_win.c), but that's only for win32 not for UNIX.

My guess is that VirtualBox uses the same win32
blocking to do some internal work, but on the host
OS fossil is not prepared to handle that.

If my theory is true, then this problem only happens
when a UNIX version of fossil is running within
VirtualBox. The error occurred when syncing a
directory after a file in it was deleted.I think
this file was blocked by VirtualBox somehow.
Compiling fossil with -DSQLITE_DISABLE_DIRSYNC
might be just a good idea to fix this. Worth a try!

B.T.W.: Cygwin suffers from the same problem
when using the unix vfs, that's how my
theory started.

Regards,
Jan Nijtmans
___
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] Problem accessing shared folder in VirtualBox

2014-06-28 Thread HeadshotX
--- Original Message ---
 On 6/27/2014 5:56 PM, Alexander Strobel wrote:
 Problem: I am getting the following error message when I try to
 open a repo wich lies in a shared folder of Oracles VirtualBox: 
 [somelocaldir]$ fossil open ../geelaunch.fossil SQLITE_IOERR:
 os_unix.c:29821: (22) 
 fsync(/media/sf_Projects/geelaunch_working/../geelaunch.fossil-mjC43B7293F)
 - Invalid argument fossil: disk I/O error: {COMMIT}
 
 Can someone confirm this behavior?
 
 I have similar problems with VirtualBox shared files, and they're not
 just with Fossil.  Don't use it VirtualBox shared files for Fossil.
 Instead use http or ssh to synchronize between a file outside and
 inside the virtual machine using VirtualBox's TCP/IP capabilities.

Thanks for the hint. I tried and got it to work this way.
Is there any chance that it will work like I tried it first? It is
working with http access, but there are so many steps to do before,
while and after and so it feels uncomfortable compared to a pure file
based solution... :)

Anyhow: Great piece of software. Especially the ticketing system and
everything without installation. Perfect! :)

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


[fossil-users] Problem accessing shared folder in VirtualBox

2014-06-28 Thread Andy Goth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/28/2014 1:24 PM, HeadshotX wrote:
 On 6/27/2014 5:56 PM, Alexander Strobel wrote:
 Problem: I am getting the following error message when I try to 
 open a repo wich lies in a shared folder of Oracles VirtualBox: 
 [somelocaldir]$ fossil open ../geelaunch.fossil SQLITE_IOERR: 
 os_unix.c:29821: (22) 
 fsync(/media/sf_Projects/geelaunch_working/../geelaunch.fossil-mjC43B7293F)

 
- - Invalid argument fossil: disk I/O error: {COMMIT}
 
 Is there any chance that it will work like I tried it first?

SQLite is quite strict with the filesystem, and it needs it to work as
advertised, for example with syncing and file locking.  VirtualBox is
just not there yet.  Go bug them.  Give them a tiny test case, a
sequence of commands to create a repository and try to open it.

Actually, I just reproduced it here using Oracle VirtualBox 4.3.12
r93733 running on 64-bit Windows 7 (Pro, as if that matters).  Just
include this email in your report.  Here's the sequence:

1. Download Fossil version 1.29 to the host desktop.
2. Unpack the archive to get fossil.exe.
3. Start cmd.exe, cd to desktop, and run fossil new crash.fossil.
4. Start a guest OS (using Slackware64 14.1) in VirtualBox.
5. Install Fossil in the guest OS using any method.
6. Mount the desktop via a VirtualBox share, e.g. to /mnt.
7. Run fossil open /mnt/crash.fossil.

Error message is:

SQLITE_IOERR: os_unix.c:29821: (22)
fsync(/mnt/crash.fossil-mj698EA9932) - Invalid argument
fossil: disk I/O error: {COMMIT}

(line number may vary since I'm using Fossil 2e51be8ec2 in the guest)

Here's the failing function.  The error is printed on line 29821, which
says unixLogError(SQLITE_IOERR_DELETE, fsync, zPath).  Perhaps you
could try recompiling Fossil with SQLITE_DISABLE_DIRSYNC, though I'm
sure you will have other problems, e.g. database corruption.

/*
** Delete the file at zPath. If the dirSync argument is true, fsync()
** the directory after deleting the file.
*/
static int unixDelete(
  sqlite3_vfs *NotUsed, /* VFS containing this as the xDelete
method */
  const char *zPath,/* Name of file to be deleted */
  int dirSync   /* If true, fsync() directory after
deleting file */
){
  int rc = SQLITE_OK;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError(return SQLITE_IOERR_DELETE);
  if( osUnlink(zPath)==(-1) ){
if( errno==ENOENT ){
  rc = SQLITE_IOERR_DELETE_NOENT;
}else{
  rc = unixLogError(SQLITE_IOERR_DELETE, unlink, zPath);
}
return rc;
  }
#ifndef SQLITE_DISABLE_DIRSYNC
  if( (dirSync  1)!=0 ){
int fd;
rc = osOpenDirectory(zPath, fd);
if( rc==SQLITE_OK ){
#if OS_VXWORKS
  if( fsync(fd)==-1 )
#else
  if( fsync(fd) )
#endif
  {
rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, fsync, zPath);
  }
  robust_close(0, fd, __LINE__);
}else if( rc==SQLITE_CANTOPEN ){
  rc = SQLITE_OK;
}
  }
#endif
  return rc;
}

- -- 
Andy Goth | andrew.m.goth/at/gmail/dot/com
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTrw9vAAoJELtYwrrr47Y4zBYH/33YGML0DtTSaVnNsaatW3el
zjnFj8CwjYmsxlV9mrmbbw0gS/se0eHr/aMPF1XygS6oCZWEDwBsHaplvLldbkJB
XTJHbAbFUNizD4xaM3sKb28nexNjLQ4fp/Ks0dn9IdHU7u5N3ObWTucz0QFBeoEA
FLDz4hGnhZFD4BBstlllOYXzttL/MbnNH/6qDzGarOK+WzlVJoTjNmkOBRJCWMs7
17NH0W4YOcG2j2KM2U8QSDo1QkX3wO+UDiB9crNQRzc1HU+D9puNrbUPYqt/fMws
zwOwOSlMlVoxCQikqYaH1Qs6CgEOI+ftQ1FJD4/c7cgiI2PB7GYAQ+quryYj8jk=
=lfYj
-END PGP 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] Problem accessing shared folder in VirtualBox

2014-06-28 Thread HeadshotX
--- Original Message ---
 Is there any chance that it will work like I tried it first?
 
 SQLite is quite strict with the filesystem, and it needs it to work as
 advertised, for example with syncing and file locking.  VirtualBox is
 just not there yet.  Go bug them.  Give them a tiny test case, a
 sequence of commands to create a repository and try to open it.

Thank you for the detailed steps, I will write them to the VirtualBox team.

Just one last uncomfortable(?) question: Why does everything work as
expected in version 1.21 of fossil? (As long as I use fossil v1.21 it
works, but as i use v1.27 or higher it gives me the initial mentioned
error.)
Or more specifically: What changed in the sqlite3.c file that causes
this error?
I think this is a question that a competent supporter from the
VirtualBox team would ask me and I would like to have a good answer for
this case.
(Regrettably I am not able to compile the fossil code by myself. *c/c++
noob*)

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


[fossil-users] Problem accessing shared folder in VirtualBox

2014-06-28 Thread Andy Goth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/28/2014 5:16 PM, HeadshotX wrote:
 --- Original Message ---
 Is there any chance that it will work like I tried it first?
 
 SQLite is quite strict with the filesystem, and it needs it to
 work as advertised, for example with syncing and file locking.
 VirtualBox is just not there yet.  Go bug them.  Give them a tiny
 test case, a sequence of commands to create a repository and try
 to open it.
 
 Thank you for the detailed steps, I will write them to the
 VirtualBox team.
 
 Just one last uncomfortable(?) question: Why does everything work
 as expected in version 1.21 of fossil? (As long as I use fossil
 v1.21 it works, but as i use v1.27 or higher it gives me the
 initial mentioned error.) Or more specifically: What changed in the
 sqlite3.c file that causes this error?

I did a bisect to pinpoint the fault.  This is Fossil, after all.

$ f bisect status
2013-11-19 13:09:40 6791ad1185f374dc BAD CURRENT
2013-11-15 12:58:56 1928cf526ef478b4 GOOD
$ f timeline 6791ad1185f374dc
=== 2013-11-19 ===
13:09:40 [6791ad1185] *CURRENT* Now that checkout_cmd() can handle the
 situation that vid==0 ([b725c1cf26]), no longer assume that the
 initial commit has rid=1: If the initial commit is not empty that
 will not be true any more. (user: jan.nijtmans tags: trunk)
=== 2013-11-15 ===
12:58:56 [1928cf526e] Update custom makefile as well. If fossil is linked
 with external SQLite library, make sure it is used
single-threaded.
 (user: jan.nijtmans tags: trunk)
=== 2013-11-14 ===
19:36:30 [28c508679e] Update the built-in SQLite to the latest from
upstream
 that includes the skip-scan optimization and the improved EXPLAIN
 display in the shell. (user: drh tags: trunk)
04:34:46 [87d5fef9ce] Set the error message to indicate the HTTP
status code
 returned on CONNECT to avoid segfault. (user: andybradford
tags: jan-
 httpsproxytunnel)
=== 2013-11-13 ===
15:18:08 [40a2557f00] Minor correction to text in setup_timeline for
 description of setting. (user: andybradford tags: hide-diff-on-
 vdiff_page)

How very curious!  Version 1928cf works, but 6791ad fails.  Yet it's
1928cf's *predecessor* that changed sqlite3.c!  I can't explain this.

- -- 
Andy Goth | andrew.m.goth/at/gmail/dot/com
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTr1tyAAoJELtYwrrr47Y4DKMIANsMnB8s8IG4XGvNT2m4Vy+1
dryc2S9bzcZqZkxEDlqREAO2KZTG2E2kjIa3GwKt9QBoGLzLsnbDRlzrG+K+Byha
SUMRUffluCXjFyRVyeWUyI1a2LTBQYWjv6TGBZnN+j9ax04rWCjE82riSwwBKJTT
OKb1Junlw9IXPvAN8aYBgzPk+FY4PE/fZUu/rVGYJIGEjacgiw0YH1Kyj0aK/Z7g
740dsYVDNsBpEsKwavrK9sHK7Fu0LYEXhPo8fwTyC/tLZ1LKqvnid8rIHJIVmkmg
qkTk4mFiWc6WruyM5qxcfsEaDELWEzn0WWG1iUbrRD6tYdfigclp5uRCuU0KEhg=
=wXO5
-END PGP SIGNATURE-
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Problem accessing shared folder in VirtualBox

2014-06-27 Thread Alexander Strobel
Problem:
I am getting the following error message when I try to open a repo wich lies in a shared folder of Oracles VirtualBox:

[somelocaldir] fossil open ../geelaunch.fossil
SQLITE_IOERR: os_unix.c:29821: (22) fsync(/media/sf_Projects/geelaunch_working/../geelaunch.fossil-mjC43B7293F) - Invalid argument
fossil: disk I/O error: {COMMIT}

If you have recently updated your fossil executable, you might
need to run fossil all rebuild to bring the repository
schemas up to date.

It doesnt matter if I try to create a working dir in a local dir (~/geelaunch_working/) or inside the shared folder (/media/sf_Projects/geelaunch_working/)

Creation of the repo was possible without problems. (cded into /media/... dir and did a fossil init geelaunch.fossil)

Workaround:
Using fossil v 1.21 ([b75aa31840] 2011-12-14 17:42:27 UTC) instead of fossil 1.29 ([3e5ebe2b90] 2014-06-12 17:25:56 UTC)

Config/System:
Windows 7 x64 Host wich is running Oracle VirtualBox v4.3.12 .
Inside this I have running a LXLE x86 Linux (Ubuntu) with r/w access to a shared folder from my Win 7 host. (ie: /media/sf_Projects)


Can someone confirm this behavior?

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


[fossil-users] Problem accessing shared folder in VirtualBox

2014-06-27 Thread Andy Goth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/27/2014 5:56 PM, Alexander Strobel wrote:
 Problem: I am getting the following error message when I try to
 open a repo wich lies in a shared folder of Oracles VirtualBox: 
 [somelocaldir]$ fossil open ../geelaunch.fossil SQLITE_IOERR:
 os_unix.c:29821: (22) 
 fsync(/media/sf_Projects/geelaunch_working/../geelaunch.fossil-mjC43B7293F)
 - Invalid argument fossil: disk I/O error: {COMMIT}
 
 Can someone confirm this behavior?

I have similar problems with VirtualBox shared files, and they're not
just with Fossil.  Don't use it VirtualBox shared files for Fossil.
Instead use http or ssh to synchronize between a file outside and
inside the virtual machine using VirtualBox's TCP/IP capabilities.

- -- 
Andy Goth | andrew.m.goth/at/gmail/dot/com
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTrf1WAAoJELtYwrrr47Y400cIAJjQa1EBkCVfAlzzfkTW4Aal
BL8P4sl9C7hplls/O+r3bjoa+6u/jkajX64nIYgpNBUvyxPawhH6OfRCxX+5Aazc
42lBQoCIffk0dRRQROYk9YhhZh5x1wJ9ws8fYVb8a+AvFBVJs8QD5JIn3VeSC4AM
YcqH866WLsL7gir7QEYBiWb0jknHDpzufuq4nWTqROdqGxfQb8abLVOPrR/Po4wk
wxoljBs/DhCOq9lKCqTVX8jqPEIiB6RlIzojkkJ4Gl9M88W82eFb2Fd1/S+djHCz
+WIhm2Uhyhy2vov+sIPIOmzd2K9M3itl8MerlI+qujZi9dwojUoTtm+mxr3F7iI=
=yH3a
-END PGP SIGNATURE-
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users