Fossil Forum

I got a sync problem - how can I proceed
Login

I got a sync problem - how can I proceed

I got a sync problem - how can I proceed

(1) By Norbert (NorbertK) on 2023-01-23 18:45:02 [link] [source]

Hello all

I got the following output from a sync:

norbert@PELIKAN:/mnt/i/ansible/hetzner$ fossil sync
Sync with https://transfer@fossil.klamann-service.de/code/ansible
Round-trips: 1   Artifacts sent: 1  received: 0
SQLITE_IOERR(2570): os_unix.c:43030: (13) unlink(/mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal) - Permission denied
SQL: COMMIT
Database error: disk I/O error: {COMMIT}
SQLITE_IOERR(2570): os_unix.c:43030: (13) unlink(/mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal) - Permission denied
SQLITE_NOTICE(539): recovered 24 pages from /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal
SQLITE_IOERR(2570): disk I/O error in "PRAGMA localdb.page_count"
SQLITE_IOERR(2570): os_unix.c:43030: (13) unlink(/mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal) - Permission denied
SQLITE_NOTICE(539): recovered 24 pages from /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal
SQLITE_IOERR(2570): disk I/O error in "PRAGMA localdb.page_count"

The reason is presumable an error of mine. I tried to create a new wiki page in this repository and got a 'HHTP Error 400' (or similar, don't remember exactly) message when I tried to save the page.

Becaus I was in ahurry, I created the page in the remote reposiory (under the sam name) and got the error shown above.

Just out of curiosity i tried the sync again and got this which looks bad.

norbert@PELIKAN:/mnt/i/ansible/hetzner$ fossil sync
SQLITE_IOERR(2570): os_unix.c:43030: (13) unlink(/mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal) - Permission denied
SQLITE_NOTICE(539): recovered 24 pages from /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil-journal
SQLITE_IOERR(2570): disk I/O error in "SELECT count(*) FROM sqlite_schema WHERE name COLLATE nocase IN('blob','delta','rcvfrom','user','config','mlink','plink');"
not a valid repository: /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/ansible.fossil

How can I proceed ? The difference between both repositories is not great, it is only this wiki page. So I could live with some data loss here, but of course the repository should be usable.

Thanks a lot

Norbert

(2) By Stephan Beal (stephan) on 2023-01-23 22:18:16 in reply to 1 [link] [source]

Just out of curiosity i tried the sync again and got this which looks bad.

The error you're getting is an OS-level file permission one, not a fossil user permission problem.

Can you show us the output of:

touch /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/foo

rm /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/foo

mount | grep mnt/c/Users

(3.2) By Norbert (NorbertK) on 2023-01-24 10:06:52 edited from 3.1 in reply to 2 [link] [source]

Thanks a lot, that's a factor I forgot totally. The path of the local repository is in a windows directory which is synchronized with nextcloud. Since yesterday (when I edited a wiki page in the remote repository) i get this problem.

I work in a WSL2 instance under Windows 10, the repo istelf is on windows. The ouput of the commands you suggested is:

norbert@PELIKAN:/mnt/i/ansible/neuaufbau$ touch /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/foo
norbert@PELIKAN:/mnt/i/ansible/neuaufbau$ rm  /mnt/c/Users/Norbert/nc_betrieb/fossil-repos/repositories/foo
norbert@PELIKAN:/mnt/i/ansible/neuaufbau$ mount | grep mnt/c/Users
norbert@PELIKAN:/mnt/i/ansible/neuaufbau$ mount | grep mnt/c
C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)

UPDATE: I think the problem is that the nextcloud service locks the repository file. I will move the repository to a place where it is not snchronized via the file system. This was a stop-gap measure before i introduced the fossil-syncronisation.

(4) By Stephan Beal (stephan) on 2023-01-24 16:34:17 in reply to 3.2 [source]

UPDATE: I think the problem is that the nextcloud service locks the repository file.

The output from touch/rm/mount all look good, but any use on a networked filesystem is generally ill-advised. It will "usually" work, in particular if the repo is only used from one client, but file locking (required by sqlite) over networked filesystems has a long history of being unreliable and that can lead to corruption.