RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 727071 - libvirtd crashes if client quits unexpectedly
Summary: libvirtd crashes if client quits unexpectedly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 6.2
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-01 09:18 UTC by Wen Congyang
Modified: 2011-12-06 11:18 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.4-0rc1.2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:18:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd.log when the libvirtd crashed (67.65 KB, text/plain)
2011-08-31 10:54 UTC, dyuan
no flags Details
error log in libvirtd.log (7.83 KB, text/x-log)
2011-09-22 03:15 UTC, yanbing du
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Wen Congyang 2011-08-01 09:18:44 UTC
Description of problem:
version: libvirt-0.9.4-0rc2


How reproducible:


Steps to Reproduce:
1. for ((i=0; i < 50; i++)); do virsh managedsave vm1 & done; killall virsh
  
Actual results:
libvirtd crashed


Expected results:
libvirtd is still running

Additional info:
The reason is that we free virNetServerClient when the refs is not 0.

I read the code under the directory src/rpc/, and find we have xxxRef(), but
we do not have xxxUnref(). And sometimes we free the data structure if ref is
not 0. We add an reference of the data structure, but sometimes we forget to
unref it.

Comment 2 Dave Allan 2011-08-01 10:20:07 UTC
Eric, is this being discussed upstream?

Comment 3 Eric Blake 2011-08-01 13:52:10 UTC
Upstream mention: https://www.redhat.com/archives/libvir-list/2011-August/msg00013.html

Comment 4 Wen Congyang 2011-08-01 13:57:49 UTC
The reason is that:
In the function virNetServerClientClose(), we set client->sock to NULL while we
still use it.

Comment 5 Eric Blake 2011-08-01 20:01:02 UTC
Patch proposed:
https://www.redhat.com/archives/libvir-list/2011-August/msg00047.html

Comment 7 dyuan 2011-08-02 07:57:12 UTC
Reproduced this bug with libvirt-0.9.4-0rc2.el6 and verified pass with libvirt-0.9.4-0rc1.2.el6.

Comment 9 dyuan 2011-08-05 10:32:26 UTC
Moved it to VERIFIED according to comment 7.

Comment 10 dyuan 2011-08-31 10:53:02 UTC
Tested with libvirt-0.9.4-7.el6, the libvirtd crash with the step in bug description.
Re-check with libvirt-0.9.4-0rc1.2.el6, the libvirtd still crash.

Please ignore the comment 7 and comment 9, the libvirtd will crash in few seconds but not at once, seems I get the conclusion too hurriedly at that time.

Comment 11 dyuan 2011-08-31 10:54:25 UTC
Created attachment 520791 [details]
libvirtd.log when the libvirtd crashed

Comment 12 Eric Blake 2011-09-20 19:48:55 UTC
Can you retest with libvirt-0.9.4-12.el6?

Comment 13 yanbing du 2011-09-22 03:15:40 UTC
Created attachment 524307 [details]
error log in libvirtd.log

Retest with libvirt-0.9.4-12.el6.x86_64, libvirtd will not crash, but there's some error messages logged in libvirtd.log.

Comment 14 Daniel Veillard 2011-09-30 02:44:04 UTC
That sounds normal. Some of it seems to be because the max number of clients
(20) wasn't raised in libvirtd conf before the test. The cgroup messages
are completely unrelated to this bug.

The behaviour sounds normal, now, the bug is fixed IMHO,

Daniel

Comment 15 Min Zhan 2011-09-30 05:10:00 UTC
Move it to VERIFIED per Comment 13 and Comment 14.

Comment 16 errata-xmlrpc 2011-12-06 11:18:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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