This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1478636 - Deadlock in define/undefine nwfilter
Deadlock in define/undefine nwfilter
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Pavel Hrdina
:
: 1441687 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-05 07:25 EDT by Sergey
Modified: 2017-09-14 02:39 EDT (History)
3 users (show)

See Also:
Fixed In Version: libvirt-3.7.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-14 02:39:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log file nwfilter-define (1.53 MB, application/x-gzip)
2017-08-05 07:27 EDT, Sergey
no flags Details
Core-dump nwfilter-define (4.48 MB, application/x-gzip)
2017-08-05 07:29 EDT, Sergey
no flags Details
thread apply all bt (24.75 KB, text/plain)
2017-08-05 07:31 EDT, Sergey
no flags Details
Log file nwfilter-undefine (2.82 MB, application/x-gzip)
2017-08-05 07:35 EDT, Sergey
no flags Details
Core-dump nwfilter-undefine (5.52 MB, application/x-gzip)
2017-08-05 07:37 EDT, Sergey
no flags Details
nwfilter-undefine: thread apply all bt (37.50 KB, text/plain)
2017-08-05 07:39 EDT, Sergey
no flags Details

  None (edit)
Description Sergey 2017-08-05 07:25:53 EDT
Run the command "virsh nwfilter-define filter.xml" and the nwfilter module hangs. Successfully completes the command "virsh list", but when executing "virsh nwfilter-list" no any response and the operation hangs. After restarting libvirtd run the command "virsh nwfilter-undefine filter.xml" again, no any response, the command is not completed.

In attachment there are files with the log files containing actions start libvirtd and execute nwfilter-define and nwfilter-undefine. In the log file "nwfilter-define" action begins on the line "2017-08-05 09:48:58.023+0000". For a quick search of actions to a log file "nwfilter-undefine" you can use the word "vm191586". There are also core-dump files for the commands nwfilter-define and nwfilter-undefine and files with the results of the command "thread apply all bt".


Compiled against library: libvirt 2.0.0
Using library: libvirt 2.0.0
Using API: QEMU 2.0.0
Running hypervisor: QEMU 1.5.3

CentOS Linux release 7.3.1611 (Core)
Comment 1 Sergey 2017-08-05 07:27 EDT
Created attachment 1309363 [details]
Log file nwfilter-define
Comment 2 Sergey 2017-08-05 07:29 EDT
Created attachment 1309364 [details]
Core-dump nwfilter-define
Comment 3 Sergey 2017-08-05 07:31 EDT
Created attachment 1309367 [details]
thread apply all bt
Comment 4 Sergey 2017-08-05 07:35 EDT
Created attachment 1309378 [details]
Log file nwfilter-undefine
Comment 5 Sergey 2017-08-05 07:37 EDT
Created attachment 1309379 [details]
Core-dump nwfilter-undefine
Comment 6 Sergey 2017-08-05 07:39 EDT
Created attachment 1309380 [details]
nwfilter-undefine: thread apply all bt
Comment 7 Sergey 2017-08-05 07:47:50 EDT
*** Bug 1441687 has been marked as a duplicate of this bug. ***
Comment 8 Pavel Hrdina 2017-08-14 12:25:38 EDT
Hi, thanks for the report.  I've reviewed upstream code and posted a patches to upstream list [1] and they are already pushed into the upstream repository.  I'm not sure whether it actually fixes this issue, because I was not able to reproduce it.

Can you please provide exact steps how to reproduce this bug, possible for a clean install of the whole system?

If you are not able to provide simple steps to reproduce the issue, you can get a copy of upstream libvirt:

  "git clone git://libvirt.org/libvirt.git"

enter the libvirt directory and follow theste steps to create RPMs:

1. run autogen to generate required files:

  "./autogen.sh"

2. install all build dependencies for libvirt (you need to install yum-utils):

  "yum-builddeb ./libvirt.spec

3. make RPMs (you need to install rpm-build):

  "make rpm"

The RPM files will be located at "~/rpmbuild/RPMS/x86_64/" directory.

Pavel

[1] <https://www.redhat.com/archives/libvir-list/2017-August/msg00228.html>
Comment 9 Sergey 2017-09-14 00:16:13 EDT
Thanks! It works.
Comment 10 Pavel Hrdina 2017-09-14 02:39:18 EDT
Upstream commits:

commit 231c7104601e48cb37d4ec2f6ca6c9cc8ddd6503
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Mon Aug 7 14:41:43 2017 +0200

    qemu: fix nwfilter deadlock while reverting to snapshot

commit 40cc355c9223e17b54b66fdaedd93e9f6c669704
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Mon Aug 7 14:42:58 2017 +0200

    qemu: fix nwfilter deadlock in qemuProcessReconnect

Note You need to log in before you can comment on or make changes to this bug.