[Drbd-dev] [CASE-38] self uuid may be crashed beacuse of garbage bitmap_index value.
Jaeheon Kim
jhkim at mantech.co.kr
Thu Mar 31 04:13:09 CEST 2016
Dear Roland,
Let me send test-steps for reproduce of SyncSource/SyncSource.
1. make resync situation with primary/inconsistent - secondary/uptodate.
2. copy big file during resyncing.
3. stop the secondary node network by disabling secondary node's VMware
network icon during copying.
4. wait until copy finished
5. reconnect network by enabling secondary.
6. connect by --discard-my-data connect on the secondary node.
7. at this time, the each node status is SyncSource/SyncSource
Thanks.
2016-03-30 21:15 GMT+09:00 Roland Kammerer <roland.kammerer at linbit.com>:
> On Wed, Mar 30, 2016 at 06:18:50PM +0900, Jaeheon Kim wrote:
> > Hi,
> >
> > There is some suspicious code.
> > Please check following code in drbd_uuid_compare.
> >
> > --- code snip start ---
> > *rule_nr = 70;
> > self = drbd_bitmap_uuid(peer_device) & ~UUID_PRIMARY;
> > peer = peer_device->current_uuid & ~UUID_PRIMARY;
> > if (self == peer)
> > return 2;
> >
> > *rule_nr = 72;
> > for (i = 0; i < DRBD_NODE_ID_MAX; i++) {
> > if (i == peer_device->node_id)
> > continue;
> > if (i == device->ldev->md.node_id)
> > continue;
> >
> > #ifdef
> >
> _WIN32_V9_INSERT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> > /* Skip bitmap indexes which are not assigned to a peer. */
> > if (device->ldev->md.peers[i].bitmap_index == -1)
> > continue;
> > #endif //
> >
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> >
> > self = device->ldev->md.peers[i].bitmap_uuid & ~UUID_PRIMARY;
> > if (self == peer) {
> > *peer_node_id = i;
> > return 4;
> > }
> > }
> > ------ code done --------
> >
> > If you don't skip undefnded bitmap_index, self uuid will get crashed
> data.
> > So, we insert this skip logic.
> > What do you think about it?
>
> on a first look this seems reasonable, but I have to further think about
> it and discuss it with my colleagues.
>
> Would be great if you could provide the steps how to trigger that
> specific scenario.
>
> Regards, rck
> _______________________________________________
> drbd-dev mailing list
> drbd-dev at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-dev/attachments/20160331/400b0e76/attachment.htm>
More information about the drbd-dev
mailing list