[Drbd-dev] DRBD8: disconnecting while already disconnecting can hang the receiver

Lars Ellenberg lars.ellenberg at linbit.com
Wed Nov 28 01:26:21 CET 2007


On Tue, Nov 27, 2007 at 04:51:21PM -0500, Montrose, Ernest wrote:
> Phil,
> Your modification to the original patch will break it actually.  The
> reason is that we can get into "disconnecting" anywhere.

and that should not be the case.
unfortunately it is, because it is forced everywhere.

grep -n force_state *[ch] | tr -s '\t ' '  ' | grep ': ' 

drbd_actlog.c:852: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_main.c:1883: drbd_force_state(mdev, NS(conn,BrokenPipe));
drbd_main.c:1885: drbd_force_state(mdev, NS(conn,Timeout));
drbd_nl.c:1025: drbd_force_state(mdev,NS(disk,Diskless));
drbd_receiver.c:589: if(rv != size)
drbd_force_state(mdev,NS(conn,BrokenPipe));
drbd_receiver.c:672: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:1957: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2016: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2023: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2035: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2143: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2225: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2259: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2294: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2447: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:2648: drbd_force_state(mdev,NS(conn,ProtocolError));
drbd_receiver.c:2654: drbd_force_state(mdev,NS(conn,ProtocolError));
drbd_receiver.c:3099: drbd_force_state(mdev,NS(conn,Disconnecting));
drbd_receiver.c:3430: drbd_force_state(mdev,NS(conn,NetworkFailure));
drbd_worker.c:738: drbd_force_state(mdev,NS(conn,NetworkFailure));
drbd_worker.c:1008: drbd_force_state(mdev,NS(conn,NetworkFailure));

I don't think "Disconnecting" should ever be forced.
NetworkFailure and the like are possible "forced" transitions.
"state engine" should then do "the right thing".

most locations above where there is "force -> Disconnecting",
in fact there should be either no "force", or force -> ProtocolError.

-- 
: Lars Ellenberg                            Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH      Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe    http://www.linbit.com :


More information about the drbd-dev mailing list