From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Philipp Reisner To: drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] DRBD8: disconnecting while already disconnecting can hang the receiver Date: Tue, 27 Nov 2007 15:52:33 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711271552.33461.philipp.reisner@linbit.com> Cc: "Montrose, Ernest" List-Id: Coordination of development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tuesday 27 November 2007 14:06:46 Montrose, Ernest wrote: > Phil, > I looked at my notes...To reproduce this you can fake the condition this > way: > * Issue a disconnect on node0 for r5. > * Locally on node1 we will get into drbd_receiver.c:drbd_disconnect() > and while there in drbd_disconnect() (Put a small delay there or > something); issue a "drbdsetup /dev/drbd5 disconnect". > > This last drbdsetup will time out with " No response from the DRBD > driver! Is the module loaded?" > But the driver will be waiting forever in > drbd_nl.c:drbd_nl_disconnect(). > Yes. This is what I tested. I had a delay in drbd_disconenct(). I did not managed to get it into troubles. BTW, while looking at the patch, I would have done it like this: @@ -589,7 +589,8 @@ STATIC int is_valid_state_transition(drbd_dev* mdev,drbd_state_t ns,drbd_state_t if( (ns.conn == StartingSyncT || ns.conn == StartingSyncS ) && os.conn > Connected) rv=SS_ResyncRunning; - if( ns.conn == Disconnecting && os.conn == StandAlone) + if ( ns.conn == Disconnecting && + ( os.conn == StandAlone || os.conn == TearDown ) ) rv=SS_AlreadyStandAlone; if( ns.disk > Attaching && os.disk == Diskless) -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 :