Cyrus 2.3.12 RC1
Bron Gondwana
brong at fastmail.fm
Wed Apr 9 09:02:11 EDT 2008
On Wed, 09 Apr 2008 07:51:50 -0400, "Ken Murchison" <murch at andrew.cmu.edu> said:
> Is there a bug somewhere in the rest of the code that causes this
> problem?
Yeah, folderlimit - another of my patches, but the interface is pretty dangerous.
I haven't found any other paths yet, but a bug elsewhere could cause skiplist
corruption if it did a read while there was a transaction open - risky and bogus
interface.
The specific pattern is:
1) a transaction is started in WRITE mode (file locked EXCLUSIVE)
2) a read is done without a transaction being passed
2a) file gets re-locked in SHARED mode
2b) file gets unlocked
3) a different process writes to the end of the file
4) the first process believes it still has a lock, and seeks to the end of its
transaction offset and writes.
You get a file that might look something like this
|
v
ADD ADD
COMMIT COMMIT
<- ADD
DELETE COMMIT
ADD ->
COMMIT COMMIT
|
v
So there's junk between the commits that was part of the ADD from the transaction
in item (3) above.
Bron.
--
Bron Gondwana
brong at fastmail.fm
More information about the Cyrus-devel
mailing list