Bug 1277781
Summary: | Libvirtd segment fault when create and destroy a fc_host pool with a short pause | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Han Han <hhan> |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dyuan, jferlan, rbalakri, xuzhang, yanyang, yisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.3.1-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:29:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Han Han
2015-11-04 03:59:31 UTC
While you're correct it's not a normal scenario, it does point out a flaw that could happen at other times. As you note if you wait 3 seconds the bug doesn't happen and if you wait 5 seconds there'd be even lesser chance (if at all). Long story short, FC/NPIV/SCSI is dependent upon udev to create the infrastructure necessary. That occurs asynchronously, so rather than "wait" for that to finish we create a thread to handle that which runs once a second over the next 5 seconds until done. See the following: https://bugzilla.redhat.com/show_bug.cgi?id=1152382 and upstream commit message: http://www.redhat.com/archives/libvir-list/2014-November/msg00695.html I do have a couple patches ready to post - I just wanted to test that they worked prior to sending them. I didn't want to interrupt anything you were doing though. Patches posted upstream: http://www.redhat.com/archives/libvir-list/2015-November/msg00139.html Patches pushed. $ git describe d3fa510a759b180a2a87b11d9ed57e437d1914e1 v1.2.21-62-gd3fa510 $ Verified on libvirt-1.3.2-1.el7.x86_64 and PASSED scenario 1, using pool name. # cat pool.xml <pool type="scsi"> <name>p1</name> <source> <adapter type='fc_host' wwnn='2101001b32a9da4e' wwpn='2101001b32a90001' managed='yes'/> </source> <target> <path>/dev/disk/by-path</path> </target> </pool> ============ do not sleep =============== # date +%s 1458101818 # for i in {1..100}; do virsh pool-create pool.xml; virsh pool-list | grep p1; virsh pool-destroy p1; virsh pool-list --all | grep p1; done Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed ... # abrt-cli list --since 1458101818 //nothing output ============= sleep in a short time (0.1 sec) ================= # date +%s 1458101534 # for i in {1..100}; do virsh pool-create pool.xml; virsh pool-list | grep p1; sleep 0.1; virsh pool-destroy p1; virsh pool-list --all | grep p1; done Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed ... # abrt-cli list --since 1458101534 //nothing output =================================== sleep in a longer time (3 sec) # date +%s 1458101908 # for i in {1..100}; do virsh pool-create pool.xml; virsh pool-list | grep p1; sleep 3; virsh pool-destroy p1; virsh pool-list --all | grep p1; done Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed Pool p1 created from pool.xml p1 active no Pool p1 destroyed ... # abrt-cli list --since 1458101908 // nothing output ======================= scenario 2, using pool uuid (just test no-sleep case is enough) # cat pool_uuid.xml <pool type='scsi'> <name>p1</name> <uuid>823de2fd-2e24-4eea-a1ca-888888888888</uuid> <source> <adapter type='fc_host' managed='yes' wwnn='2101001b32a9da4e' wwpn='2101001b32a90001'/> </source> <target> <path>/dev/disk/by-path</path> </target> </pool> # date +%s 1458102689 # for i in {1..100}; do virsh pool-create pool_uuid.xml; virsh pool-list | grep p1; virsh pool-destroy 823de2fd-2e24-4eea-a1ca-888888888888; virsh pool-list --all | grep p1; done Pool p1 created from pool_uuid.xml p1 active no Pool 823de2fd-2e24-4eea-a1ca-888888888888 destroyed Pool p1 created from pool_uuid.xml p1 active no Pool 823de2fd-2e24-4eea-a1ca-888888888888 destroyed Pool p1 created from pool_uuid.xml p1 active no Pool 823de2fd-2e24-4eea-a1ca-888888888888 destroyed Pool p1 created from pool_uuid.xml p1 active no Pool 823de2fd-2e24-4eea-a1ca-888888888888 destroyed # abrt-cli list --since 1458102689 //nothing output 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. https://rhn.redhat.com/errata/RHSA-2016-2577.html |