Bug #1598
closedundo hangs
0%
Description
I munged up a file, and wasn't able to retrieve the last version using
undo on a Hammer volume:
Do this on leaf:
undo -o local.css.old /usr/pkg/share/ikiwiki/basewiki/local.css
The process does not return:
root 23659 0.0 0.0 1552 628 0 IL+ 7:30PM 0:00.00 undo -o
local.css.old /usr/pkg/share/ikiwiki/basewiki/local.css
Not sure if I just missed something... I was able to retrieve the file
from a snapshot.
Updated by dillon almost 15 years ago
:I munged up a file, and wasn't able to retrieve the last version using
:undo on a Hammer volume:
:
:Do this on leaf:
:
:undo -o local.css.old /usr/pkg/share/ikiwiki/basewiki/local.css
:
:The process does not return:
:
:root 23659 0.0 0.0 1552 628 0 IL+ 7:30PM 0:00.00 undo -o
:local.css.old /usr/pkg/share/ikiwiki/basewiki/local.css
:
:Not sure if I just missed something... I was able to retrieve the file
:from a snapshot.
It's kinda a bug in undo. Basically undo is synthesizing ALL the
transaction ids ever used to update the file. But some of those
transaction ids bisect the directory entry and inode so the
directory entry might exist and the inode might not.
In the case where the inode does not exist HAMMER synthesizes a fake
one and unfortunately I chose the FIFO type (as in 'mkfifo' style) :-).
Bad choice on my fault. So undo winds up trying to open a FIFO and
of course hangs until you hit ^C since there is nobody on the other
side of the FIFO.
If someone would like a little mini project, just add a stat() or fstat()
call in the undo code and don't try to open() files that aren't regular
files. Plus generate a warning to stderr for that transaction id.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by polachok almost 15 years ago
If someone would like a little mini project, just add a stat() or fstat()
call in the undo code and don't try to open() files that aren't regular
files. Plus generate a warning to stderr for that transaction id.
Ran into this bug today myself. Do you mean something like this [1]? I don't like
phrasing though.
[1] fetch http://leaf.dragonflybsd.org/~polachok/undo-patch-1.diff
Updated by dillon almost 15 years ago
:Alexander Polakov <polachok@gmail.com> added the comment:
:
:> If someone would like a little mini project, just add a stat() or fstat()
:> call in the undo code and don't try to open() files that aren't regular
:> files. Plus generate a warning to stderr for that transaction id.
:
:Ran into this bug today myself. Do you mean something like this [1]? I don'=
:t like=20
:phrasing though.
:[1] fetch http://leaf.dragonflybsd.org/~polachok/undo-patch-1.diff
Yup. Fix it up so you like it and commit :-)
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by Anonymous almost 15 years ago
Does this still apply ?
I think Polachok committed a fix. Ok to close it ?