From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] hotplug/Linux: close lockfd after lock attempt Date: Sun, 14 Oct 2012 00:35:58 +0200 Message-ID: <20121013223558.GA19665@aepfle.de> References: <5aa14d5afe6b1f35b230.1350143968@probook.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5aa14d5afe6b1f35b230.1350143968@probook.site> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sat, Oct 13, Olaf Hering wrote: > hotplug/Linux: close lockfd after lock attempt > > When a HVM guest is shutdown some of the 'remove' events can not claim > the lock for some reason. Instead they try to grab the lock in a busy > loop, until udev reaps the xen-hotplug-cleanup helper. > After analyzing the resulting logfile its not obvious what the cause is. > The only explanation is that bash (?) gets confused if the same lockfd > is opened again and again. Closing it in each iteration seem to fix the > issue. Can be reproduced with this testcase on sles11sp2, not on openSuSE 11.4: # cat test.sh set -x source locking.sh l=lock claim_lock $l sleep 1 release_lock $l # bash test.sh & bash test.sh & bash test.sh & bash test.sh & Olaf