[Sheepdog] [PATCH 2/2] make vdi setattr atomic
Chris Webb
chris at arachsys.com
Fri Oct 14 12:39:47 CEST 2011
MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes:
> Before pulling vdiattr branch, didn't this bug happen?
I think we never got far enough in the process to try the write because the
setattr -x/getattr stuff failed beforehand, so I can't be sure it hasn't
happened all along.
> If possible, can you check what is written in sheep.log when this problem
> happens?
I've put the three log files up at
http://cdw.me.uk/tmp/sheep-00.log
http://cdw.me.uk/tmp/sheep-01.log
http://cdw.me.uk/tmp/sheep-02.log
They're very short as I created the cluster afresh and immediately ran the
commands that triggered the problem.
> > 0026# collie vdi list
> > name id size used shared creation time vdi id
> > ------------------------------------------------------------------
> > Floating point exception (core dumped)
>
> Can you get a stack trace from the core?
This is a small collie interface bug I've seen before and meant to fix
myself but hadn't got around to: it's a division by zero in hval_to_sheep()
(line 205 of include/sheep.h). You do
ret = get_nth_node(entries, nr_entries, (i + 1) % nr_entries, idx);
which is a division-by-zero if nr_entries = 0, i.e. where all the nodes have
gone away as in this case. (There aren't any nodes to pick from in that
case, so this should fail but not dump core!)
Cheers,
Chris.
More information about the sheepdog
mailing list