Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1101383

Summary: qemu-kvm core dumped when doing mirror block device
Product: Red Hat Enterprise Linux 6 Reporter: ShupingCui <scui>
Component: qemu-kvmAssignee: Jeff Cody <jcody>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: acathrow, bsarathy, chayang, coli, juzhang, michen, mkenneth, qzhang, shuang, shu, virt-maint, xuhan
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-11 17:52:05 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 ShupingCui 2014-05-27 04:40:49 UTC
Description of problem:
qemu-kvm core dumped when doing mirror block device

Version-Release number of selected component (if applicable):
# uname -r
2.6.32-470.el6.x86_64
# rpm -qa | grep qemu-kvm
qemu-kvm-rhev-0.12.1.2-2.427.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot the guest
/usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1' \
    -M rhel6.5.0  \
    -nodefaults  \
    -vga qxl  \
    -global qxl-vga.vram_size=33554432 \
    -device intel-hda,bus=pci.0,addr=03 \
    -device hda-duplex  \
    -chardev socket,id=qmp_id_qmp1,path=/tmp/monitor-qmp1-20140526-220923-bqIZzt9D,server,nowait \
    -mon chardev=qmp_id_qmp1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140526-220923-bqIZzt9D,server,nowait \
    -device isa-serial,chardev=serial_id_serial0 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=04  \
    -chardev socket,id=devvs,path=/tmp/virtio_port-vs-20140526-220923-bqIZzt9D,server,nowait \
    -device virtserialport,chardev=devvs,name=vs,id=vs,bus=virtio_serial_pci0.0  \
    -chardev socket,id=seabioslog_id_20140526-220923-bqIZzt9D,path=/tmp/seabios-20140526-220923-bqIZzt9D,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20140526-220923-bqIZzt9D,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=05 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.5-64-virtio.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=06 \
    -device virtio-net-pci,mac=9a:f5:f6:f7:f8:f9,id=idzvbF1F,vectors=4,netdev=idFNMVup,bus=pci.0,addr=07  \
    -netdev tap,id=idFNMVup,vhost=on,vhostfd=23,fd=22  \
    -m 4096  \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2  \
    -cpu 'SandyBridge' \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,password=123456,addr=0,tls-port=3200,x509-dir=/tmp/spice_x509d,tls-channel=main,tls-channel=inputs,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off  \
    -no-kvm-pit-reinjection \
    -enable-kvm
2. after guest boot up, start to mirror block device
{'execute': '__com.redhat_drive-mirror', 'arguments': {'device': u'drive_image1', 'format': 'qcow2', 'full': True, 'target': '/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/target1.qcow2', 'mode': 'absolute-paths'}, 'id': 'GfboImVf'}
3.

Actual results:
qemu-kvm core dumped
{"execute": "__com.redhat_drive-mirror", "arguments": {"device": "drive_image1", "format": "qcow2", "full": true, "target": "/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/target1.qcow2", "mode": "absolute-paths"}, "id": "GfboImVf"}
{"return": {}, "id": "GfboImVf"}
{"timestamp": {"seconds": 1401113420, "microseconds": 765007}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive_image1", "len": 21474836480, "offset": 0, "speed": 0, "type": "mirror", "error": "Unknown error 1539571707"}}

Expected results:
mirror block device successfully

Additional info:
(gdb) bt full
#0  block_job_cancel_sync (job=0x58b4818588b4800) at /usr/src/debug/qemu-kvm-0.12.1.2/block.c:4802
        data = {job = 0x7fccddab3010, cb = 0x1, opaque = 0x7fcce2e649d0, cancelled = 47, ret = 32716}
        bs = <error reading variable bs (Cannot access memory at address 0x58b4818588b4808)>
        __PRETTY_FUNCTION__ = "block_job_cancel_sync"
#1  0x00007fccdc6a3520 in bdrv_close (bs=0x7fcc9b944000) at /usr/src/debug/qemu-kvm-0.12.1.2/block.c:1037
No locals.
#2  0x00007fccdc6c94fe in mirror_run (opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/block/mirror.c:241
        s = <value optimized out>
        bs = 0x7fccddab3010
        sector_num = <value optimized out>
        end = <value optimized out>
        sectors_per_chunk = <value optimized out>
        ret = <value optimized out>
        n = 128
        synced = <value optimized out>
        buf = <value optimized out>
        __PRETTY_FUNCTION__ = "mirror_run"
#3  0x00007fccdc6aa62b in coroutine_trampoline (i0=<value optimized out>, i1=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/coroutine-ucontext.c:129
        self = 0x7fccdddfe7f0
        co = 0x7fccdddfe7f0
#4  0x00007fccd911fbf0 in ?? ()
No symbol table info available.
#5  0x00007fff1a718480 in ?? ()
No symbol table info available.
#6  0x0000000000000000 in ?? ()
No symbol table info available.


Host infos:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
microcode	: 41
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 6784.59
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

# free -m
             total       used       free     shared    buffers     cached
Mem:          7750       5301       2448          0         67       4939
-/+ buffers/cache:        294       7455
Swap:        57343          8      57335

Comment 2 ShupingCui 2014-05-27 04:45:45 UTC
not met this issue on qemu-kvm-rhev-0.12.1.2-2.426.el6, so it's a Regression bug.

Comment 5 Shaolong Hu 2014-05-27 09:54:40 UTC
Easy to reproduce:

{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-virtio-disk0", "target": "/root/sn1", "format": "qcow2", "mode": "absolute-paths", "full": true } }
{"timestamp": {"seconds": 1401184060, "microseconds": 523754}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 0, "speed": 0, "type": "mirror", "error": "Unknown error 138870779"}}
{"return": {}}

Comment 6 Jeff Cody 2014-06-11 17:52:05 UTC
This is not a core dump, right? I believe this is actually a dupe of BZ 1101430 (looks to have the same root cause)

*** This bug has been marked as a duplicate of bug 1101430 ***