[Drbd-dev] DRBD8: Panic in drbd_uuid_compare due to mdev->bc being null

Montrose, Ernest Ernest.Montrose at stratus.com
Mon Jun 11 22:17:25 CEST 2007


Hi all,

We are seeing a panic that occurs while syncing.  Essentially if you are
primary and you are syncing and get an io error then on the next attach
you can panic.  Especially if that attach happens quickly after the
detach.

I think what's happening is this:
* The local disk dies and we transiton to "Diskless"
* After_state_ch() suppose to call drbd_free_bc() to free mdev->bc.
* But before we can free mdev->bc, mdev->local_cnt would have to be 0,
in this case it was not.  Not too sure why. So we wait for
mdev->local_cnt to become 0.
* While waiting an "Attach" request comes in. We ASSERT that mdev->bc is
not NULL but we brush it off, set a new bc and leak the old.
* The wait in after_state_ch is now over. we free the new mdev->bc that
the "attach" had set.
* we call drbd_sync_handshake(), access a NULL mdev->bc and we die.

A quick thing to do is to just fail the attach request if mdev->bc is
not null. Patch included

EM--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd_nl.patch
Type: application/octet-stream
Size: 1107 bytes
Desc: drbd_nl.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20070611/f44a9b85/drbd_nl.obj


More information about the drbd-dev mailing list