[Drbd-dev] DRBD8: Panic in drbd_uuid_compare due to mdev->bc
being null
Philipp Reisner
philipp.reisner at linbit.com
Tue Jun 12 16:39:54 CEST 2007
On Monday 11 June 2007 22:17:25 Montrose, Ernest wrote:
> 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--
Hi Ernest,
Thanks! I just changed it to Linux coding style, and shortened it a
bit. It is commited.
-phil
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :
More information about the drbd-dev
mailing list