[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] hotplug/Linux: close lockfd after lock attempt

  • To: xen-devel@xxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Sun, 14 Oct 2012 00:35:58 +0200
  • Delivery-date: Sat, 13 Oct 2012 22:36:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.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

claim_lock $l
sleep 1
release_lock $l

 # bash test.sh & bash test.sh & bash test.sh & bash test.sh &


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.