[PATCH] Revert "ctdb-daemon: Check packet generation against database generation"

Amitay Isaacs amitay at gmail.com
Tue Feb 9 00:23:55 UTC 2016


Hi,

This revert avoids the race condition where dmaster packets are processed
during recovery.  This causes ctdbd to abort due to miscalculation of
lmaster since vnnmap has been updated.

Here are the details from commit message:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11707

The checks against database generation are not required since
the global generation is updated as part of updating vnnmap
before the actual database recovery.  This change was done in
5aab31a39a3589b910a78b96071d6aa5e6547696.

Checking only against the database generation is incomplete.  It can
cause CTDB to abort if the following sequence of events happen.

 - CTDB gets REQ_DMASTER packet (gen1)
   This packet processing gets deferred to get a record lock

 - CTDB goes into recovery, marks RECOVERY_ACTIVE
   CTDB recovery helper updates vnnmap (gen2)

 - CTDB processes REQ_DMASTER packet (gen1)
   The check against database generation (gen1) succeeds.
   The check for lmaster is now invalid because VNNMAP has changed.
   This will cause CTDB to abort due to protocol error.

Reverting the patch stops processing packets of older generation before
they get into call processing.

Amitay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Revert-ctdb-daemon-Check-packet-generation-against-d.patch
Type: application/text
Size: 7188 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160209/0b410cfd/0001-Revert-ctdb-daemon-Check-packet-generation-against-d.bin>


More information about the samba-technical mailing list