Discussion:
[9fans] sealed arena modified by venti??
(too old to reply)
s***@icebubble.org
2012-02-28 18:13:31 UTC
Permalink
Venti! ARRRRRRRRRRRRGH! OK. Deep breath... whoooooow...

I recently observed some Venti behavior which has absolutely perplexed
me. I'm at my wit's end, trying to figure out what's going on, here. I
have an arena file containing a number of arenas. Whenever an arena
becomes full and /index reports it as "disk=sealed", I back it up to
another drive.

Recently, I compared the live and backup copies of the sealed arenas.
To my surprise, one of the arenas differed from its backup copy. The
two arenas are identical for about the first 75% of their contents.
Then, they begin to differ. But, near 99.2% of the way through the
arena, their contents begin to match again, and are thenceforth
identical through the end of the arena.

My first thought was that I must have inadvertently copied an arena
before it was sealed. (That would be an easy way to explain all the
above observations.) HOWEVER: Both versions of the arena have the score
written into their last block, and the score in BOTH copies is the SAME!
Just to be sure, I double- and triple-checked this, with the distinct
feeling that the Earth was slipping away beneath my feet... how could
this be??

Is there some way to "compare" two arenas, and see how they differ?
Could there be a way to list the contents of an arena, to see what's
inside it? I tried running checkarenas on the live copy, but it only
prints /index stats and four undocumented columns of monotonically
increasing integers. It doesn't provide any (at least overt) hint that
anything in the arena is out of the ordinary. checkarenas refuses to
run on the backup copy, complaining that it's missing a magic number.
Presumably, checkarenas wants a complete arena file, not a disembodied
arena like I gave it.

If it's any clue, the arena was the second-to-last active arena at the
time it was first copied; it was sealed on-disk, and the arena
immediately following it was open and holding data.

Any help would be 2^1024 appreciated!
--
+---------------------------------------------------------------+
|Smiley <***@icebubble.org> PGP key ID: BC549F8B |
|Fingerprint: 9329 DB4A 30F5 6EDA D2BA 3489 DAB7 555A BC54 9F8B|
+---------------------------------------------------------------+
Russ Cox
2012-02-28 18:20:25 UTC
Permalink
Try running verifyarena on both.
s***@icebubble.org
2012-03-22 15:34:47 UTC
Permalink
Post by Russ Cox
Try running verifyarena on both.
LOL. There's a "verifyarena" command? Silly me, I just had to
s/checkarenas/verifyarena/!

How do you guys know all these obscure command names (let alone what
they do)? Let me guess... you wrote them? Plan 9 is really looking
like a hacker's OS... for hackers, by hackers (of hacks??).

(fast forward)

Using some device mapper "magic", I was able to make the backed-up arena
appear at the correct location in the arena file. The backed-up copy of
the arena verifies OK. The live copy of the arena is reported to have
an incorrect sum... but that's all it says.

Is there a way to look into an arena a little deeper, to find the
offending data? I'd like to debug this, and try to find the cause of
this corruption, in order to avoid it in the future.
--
+---------------------------------------------------------------+
|Smiley <***@icebubble.org> PGP key ID: BC549F8B |
|Fingerprint: 9329 DB4A 30F5 6EDA D2BA 3489 DAB7 555A BC54 9F8B|
+---------------------------------------------------------------+
Loading...