[libvirt] [PATCH] Fix 'virsh pool-list' locking issue

Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue. Thanks, Cole

On Tue, Dec 09, 2008 at 01:50:37PM -0500, Cole Robinson wrote:
Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue.
Argh, +1 I wonder why the CIL static analysis didn't point this out... this doesn't look really different from other lockings. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Wed, Dec 10, 2008 at 08:38:15AM +0100, Daniel Veillard wrote:
On Tue, Dec 09, 2008 at 01:50:37PM -0500, Cole Robinson wrote:
Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue.
Argh, +1 I wonder why the CIL static analysis didn't point this out... this doesn't look really different from other lockings.
It did catch it. Unfortunately when I finally applied the patchs there was a merge conflict and i missed out this chunk, and then didn't run the CIL analysis again :-( Its on my todo list to get it integrated into 'make check'.... Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, Dec 10, 2008 at 11:23:35AM +0000, Daniel P. Berrange wrote:
On Wed, Dec 10, 2008 at 08:38:15AM +0100, Daniel Veillard wrote:
On Tue, Dec 09, 2008 at 01:50:37PM -0500, Cole Robinson wrote:
Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue.
Argh, +1 I wonder why the CIL static analysis didn't point this out... this doesn't look really different from other lockings.
It did catch it. Unfortunately when I finally applied the patchs there was a merge conflict and i missed out this chunk, and then didn't run the CIL analysis again :-(
Its on my todo list to get it integrated into 'make check'....
Ouch, that's a bunch of dependancies ! And maybe I should make some progresses in that Ocaml tutorial I have open for 10 days now ... Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Wed, Dec 10, 2008 at 01:07:47PM +0100, Daniel Veillard wrote:
On Wed, Dec 10, 2008 at 11:23:35AM +0000, Daniel P. Berrange wrote:
On Wed, Dec 10, 2008 at 08:38:15AM +0100, Daniel Veillard wrote:
On Tue, Dec 09, 2008 at 01:50:37PM -0500, Cole Robinson wrote:
Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue.
Argh, +1 I wonder why the CIL static analysis didn't point this out... this doesn't look really different from other lockings.
It did catch it. Unfortunately when I finally applied the patchs there was a merge conflict and i missed out this chunk, and then didn't run the CIL analysis again :-(
Its on my todo list to get it integrated into 'make check'....
Ouch, that's a bunch of dependancies ! And maybe I should make some progresses in that Ocaml tutorial I have open for 10 days now ...
I'd certainly make it optional - just have it skip the analysis if it found that OCaml was not installed. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel Veillard wrote:
On Tue, Dec 09, 2008 at 01:50:37PM -0500, Cole Robinson wrote:
Running 'virsh pool-list' seems to deadlock libvirtd. Dan gave me some debugging tips, and I managed to track it down to the poolGetAutostart function. The attached patch fixes the issue.
Argh, +1 I wonder why the CIL static analysis didn't point this out... this doesn't look really different from other lockings.
Daniel
Thanks, applied now. - Cole
participants (3)
-
Cole Robinson
-
Daniel P. Berrange
-
Daniel Veillard