GNOME Bugzilla – Bug 167647
Database locked if $HOME/.gnome2/f-spot is on NFS
Last modified: 2005-02-16 23:19:04 UTC
Distribution/Version: Gentoo Mount indicated dir on NFS and run f-spot: Unhandled Exception: System.ApplicationException: Sqlite error database is locked in [0x000d8] (at /var/tmp/portage/mono-1.0.5-r3/work/mcs-1.0.5/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:255) Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (System.Data.CommandBehavior,bool,int&) in [0x00005] (at /var/tmp/portage/mono-1.0.5-r3/work/mcs-1.0.5/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:209) Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (System.Data.CommandBehavior) in [0x00002] (at /var/tmp/portage/mono-1.0.5-r3/work/mcs-1.0.5/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteCommand.cs:203) Mono.Data.SqliteClient.SqliteCommand:ExecuteReader () in [0x0001e] (at /home/loz/cvs/gnome2/f-spot/f-spot-0.0.7/src/TagStore.cs:225) TagStore:LoadAllTags () in [0x00021] (at /home/loz/cvs/gnome2/f-spot/f-spot-0.0.7/src/TagStore.cs:339) TagStore:.ctor (Mono.Data.SqliteClient.SqliteConnection,bool) in [0x00061] (at /home/loz/cvs/gnome2/f-spot/f-spot-0.0.7/src/Db.cs:143) Db:.ctor (string,bool) in [0x0004a] (at /home/loz/cvs/gnome2/f-spot/f-spot-0.0.7/src/main.cs:23) Driver:Main (string[])
I've found some references that say sqlite doesn't work over nfs, but the FAQ says it should be OK for a single process system: http://www.sqlite.org/faq.html#q7 I wonder what it is calling to lock the file.
[pid 20322] open("/home/loz/.gnome2/f-spot/photos.db", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 40 [pid 20322] fstat64(40, {st_mode=S_IFREG|0644, st_size=35840, ...}) = 0 [pid 20322] fcntl64(40, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}, 0xb5c00e9c) = -1 ENOLCK (No locks available) [pid 20322] brk(0x8341000) = 0x8341000 [pid 20322] fcntl64(40, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}, 0xb5c00d10) = -1 ENOLCK (No locks available) [pid 20322] write(2, "\nUnhandled Exception: System.App"..., 1158 U
This is because I don't know how to use NFS with file locking. To get it working you need to run statd and lockd on the client as well as on the server