From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [Patch] CLD: fix hang in ncld_sess_open if session open fails Date: Wed, 14 Apr 2010 00:01:37 -0400 Message-ID: <4BC53E21.2050600@garzik.org> References: <20100413182214.28c6b565@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fUSBS0DzLyB2CPj5JiH5AyhmhiK+TU+7iAa+7lfiJ5s=; b=HyUQbBfovpFtXQuaKWgL8U4l8amkJimWRPga5+WFApJXH/7neC0wFvOhvVTJpXqZSP C3k4G8mAwPEAbHOi/49fp5G/luWed8NHFXFK5hwyn5UTLbIL6fqzPHsbPbsXvtuQp+io zHEwcbqGJwGxz8BksZQXJa9h+wwc5butEOqOQ= In-Reply-To: <20100413182214.28c6b565@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List On 04/13/2010 08:22 PM, Pete Zaitcev wrote: > The problem turned out to be two-fold, with the same symptom. > > Firstly, we use is_open to signal that the caller thread may > proceed, but this is incorrect in case the thread open fails: > we still want the caller thread to proceed and deliver the > error indicator from ncld_sess_open to the application. > So, let's split is_up from the condition variable mechanism. > It continues to mean that the session is open and up, and > open_done is introduced for the waiting mechanism. > > In addition, we forgot to take a mutex around a call into > the cldc layer. It manifested itself in timers not firing, > and so we would hang waiting for an answer from CLD server. > > Signed-off-by: Pete Zaitcev > > --- > include/ncld.h | 1 + > lib/cldc.c | 15 +++++++++++++-- > 2 files changed, 14 insertions(+), 2 deletions(-) > > This, I think, can go either before or after the e2e verbose. > My previous patch added a HAIL_VERBOSE in a strategic location, > but it's not really necessary and I took it out. applied