Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

0.6.6: sqlite fails due to problem with F_SETLK

 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed
View previous topic :: View next topic  
Author Message
Mask of Destiny



Joined: 16 Sep 2007
Posts: 47

PostPosted: Thu May 21, 2009 1:26 pm    Post subject: 0.6.6: sqlite fails due to problem with F_SETLK Reply with quote

Trying to create a new table in sqlite doesn't work, it prints this error: "SQL error: database is locked". I haven't personally tested this on 0.6.6 (this was on a 0.6.5 machine), but from the discussion on AltMe it appears to apply to 0.6.6 as well. Here's the output from strace:

[code:1]
0:sqlite3::sqlite3 : ---->> 0 = ioctl(0, 21509, 0xffffa1c0)
0:sqlite3::sqlite3 : ---->> 0 = access("test2.db", 0)
0:sqlite3::sqlite3 : ---->> 0 = lstat(".", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 0 = lstat("/", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 0 = lstat("..", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> -20 = open("/dev/null", 0x4800, (? 38))
0:sqlite3::sqlite3 : ---->> 3 = open("..", 0x4800, (? 38))
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9e34)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 2, 1)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../mpavone", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 0 = close(3)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../..", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 3 = open("../..", 0x4800, (? 0))
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9e34)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 2, 1)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../home", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 0 = close(3)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../..", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 3 = open("../../..", 0x4800, (? 0))
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9e34)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 2, 1)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../Applications", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../tmp", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../var", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../home", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../etc", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../usr", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../bin", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../system", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../atheos", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 1 = getdents(3, 0xffff9d5c, 268)
0:sqlite3::sqlite3 : ---->> 0 = lstat("../../../boot", 0xffff9f08)
0:sqlite3::sqlite3 : ---->> 0 = close(3)
0:sqlite3::sqlite3 : ---->> 3 = open("/boot/home/mpavone/test2.db", 0x42, (? 420))
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9f30)
0:sqlite3::sqlite3 : ---->> 0 = lseek(3, 0, 0, 0, 0xffffa010, ... )
0:sqlite3::sqlite3 : ---->> 0 = read(3, 0xffffa0f8, 100)
0:sqlite3::sqlite3 : ---->> 4 = open("/etc/nsswitch.conf", 0x0, (? 438))
0:sqlite3::sqlite3 : ---->> 0 = fstat(4, 0xffffa024)
0:sqlite3::sqlite3 : ---->> 614 = read(4, 0x88001ae8, 8192)
0:sqlite3::sqlite3 : ---->> 0 = read(4, 0x88001ae8, 8192)
0:sqlite3::sqlite3 : ---->> 0 = close(4)
0:sqlite3::sqlite3 : ---->> 4 = open("/etc/passwd", 0x0, (? 438))
0:sqlite3::sqlite3 : ---->> 0 = fcntl(4, 1, 0)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(4, 2, 1)
0:sqlite3::sqlite3 : ---->> 0 = fstat(4, 0xffff9f28)
0:sqlite3::sqlite3 : ---->> 0 = lseek(4, 0, 0, 1, 0xffff9f48, ... )
0:sqlite3::sqlite3 : ---->> 391 = read(4, 0x88003e58, 8192)
0:sqlite3::sqlite3 : ---->> 0 = close(4)
0:sqlite3::sqlite3 : ---->> -2 = open("/home/mpavone/.sqliterc", 0x0, (? 438))
0:sqlite3::sqlite3 : ---->> 0 = fstat(1, 0xffff9b3c)
0:sqlite3::sqlite3 : ---->> 0 = ioctl(1, 21509, 0xffff9b08)
0:sqlite3::sqlite3 : ---->> 53 = write(1, 0x88001ae8, 53)
0:sqlite3::sqlite3 : ---->> 4 = open("/etc/passwd", 0x0, (? 438))
0:sqlite3::sqlite3 : ---->> 0 = fcntl(4, 1, 0)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(4, 2, 1)
0:sqlite3::sqlite3 : ---->> 0 = fstat(4, 0xffff9f18)
0:sqlite3::sqlite3 : ---->> 0 = lseek(4, 0, 0, 1, 0xffff9f38, ... )
0:sqlite3::sqlite3 : ---->> 391 = read(4, 0x88003fc0, 8192)
0:sqlite3::sqlite3 : ---->> 0 = close(4)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 0 = fstat(0, 0xffff9fec)
0:sqlite3::sqlite3 : ---->> 0 = ioctl(0, 21509, 0xffff9fb8)
0:sqlite3::sqlite3 : ---->> 131 = read(0, 0x88003e58, 8192)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 2 = read(0, 0x88003e58, 8192)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25740)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25740)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25740)
0:sqlite3::sqlite3 : ---->> -2 = access("/boot/home/mpavone/test2.db-journal", 0)
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9b20)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25564)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25532)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25532)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25532)
0:sqlite3::sqlite3 : ---->> -2 = access("/boot/home/mpavone/test2.db-journal", 0)
0:sqlite3::sqlite3 : ---->> 0 = fstat(3, 0xffff9bf0)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25436)
0:sqlite3::sqlite3 : ---->> 4 = open("/boot/home/mpavone/test2.db-journal", 0x80c2, (? 420))
0:sqlite3::sqlite3 : ---->> 0 = fstat(4, 0xffff9c70)
0:sqlite3::sqlite3 : ---->> 5 = open("/boot/home/mpavone", 0x0, (? 0))
0:sqlite3::sqlite3 : Error: device /boot/system/drivers/dev/acpi_cpu failed to initialize itself
0:sqlite3::sqlite3 : Device /boot/system/drivers/dev/battery on bus acpi is disabled
0:sqlite3::sqlite3 : ---->> -2 = open("/dev/urandom", 0x0, (? 0))
0:sqlite3::sqlite3 : ---->> 0 = lseek(4, 0, 0, 0, 0xffff9c30, ... )
0:sqlite3::sqlite3 : ---->> 24 = write(4, 0xffff9cd4, 24)
0:sqlite3::sqlite3 : ---->> 0 = lseek(4, 511, 0, 0, 0xffff9c30, ... )
0:sqlite3::sqlite3 : ---->> 1 = write(4, 0x80051d3b, 1)
0:sqlite3::sqlite3 : sys_fsync( 4 ) stub called!
0:sqlite3::sqlite3 : ---->> -38 = fsync(4)
0:sqlite3::sqlite3 : Flushing journal:
0:sqlite3::sqlite3 : Merge last transaction
0:sqlite3::sqlite3 : Write last transaction to the journal
0:sqlite3::sqlite3 : Wait for the transactions to finish
0:sqlite3::sqlite3 : All journal entries flushed
0:sqlite3::sqlite3 : ---->> 0 = sync(void)
0:sqlite3::sqlite3 : sys_fsync( 5 ) stub called!
0:sqlite3::sqlite3 : ---->> -38 = fsync(5)
0:sqlite3::sqlite3 : Flushing journal:
0:sqlite3::sqlite3 : Merge last transaction
0:sqlite3::sqlite3 : Write last transaction to the journal
0:sqlite3::sqlite3 : Wait for the transactions to finish
0:sqlite3::sqlite3 : All journal entries flushed
0:sqlite3::sqlite3 : ---->> 0 = sync(void)
0:sqlite3::sqlite3 : ---->> 0 = close(5)
0:sqlite3::sqlite3 : ---->> 0 = lseek(4, 8, 0, 0, 0xffff9b90, ... )
0:sqlite3::sqlite3 : ---->> 4 = write(4, 0xffff9c38, 4)
0:sqlite3::sqlite3 : sys_fsync( 4 ) stub called!
0:sqlite3::sqlite3 : ---->> -38 = fsync(4)
0:sqlite3::sqlite3 : Flushing journal:
0:sqlite3::sqlite3 : Merge last transaction
0:sqlite3::sqlite3 : Write last transaction to the journal
0:sqlite3::sqlite3 : Wait for the transactions to finish
0:sqlite3::sqlite3 : All journal entries flushed
0:sqlite3::sqlite3 : ---->> 0 = sync(void)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -25788)
0:sqlite3::sqlite3 : ---->> -11 = fcntl(3, 6, -25788)
0:sqlite3::sqlite3 : ---->> 0 = close(4)
0:sqlite3::sqlite3 : ---->> 0 = unlink("/boot/home/mpavone/test2.db-journal")
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -57660)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -57660)
0:sqlite3::sqlite3 : ---->> 0 = fcntl(3, 6, -24924)
0:sqlite3::sqlite3 : ---->> 30 = write(1, 0x88001ae8, 30)
0:sqlite3::sqlite3 : ---->> 8 = write(1, 0x88001ae8, 8)
0:sqlite3::sqlite3 : ---->> 6 = read(0, 0x88003e58, 8192)
0:sqlite3::sqlite3 : ---->> 0 = close(3)
[/code:1]
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Thu May 21, 2009 2:33 pm    Post subject: Reply with quote

Fixed in CVS.

lock_inode_record() assumed that if the locks conflicted and it was a non-blocking request (I.e. F_SETLK instead of F_SETLKW) then it must automatically be a blocking OP: this test has been moved to after the test for the same process replacing or growing its own lock, which is a non-blocking OP in all cases.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group