qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wen Congyang <wency@cn.fujitsu.com>
To: Fabio Fantoni <fabio.fantoni@m2r.biz>,
	xen devel <xen-devel@lists.xen.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: anthony PERARD <anthony.perard@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] qemu crash with virtio on Xen domUs (backtrace included)
Date: Mon, 24 Nov 2014 17:25:20 +0800	[thread overview]
Message-ID: <5472F980.6030208@cn.fujitsu.com> (raw)
In-Reply-To: <5472F1DA.4080508@m2r.biz>

On 11/24/2014 04:52 PM, Fabio Fantoni wrote:
> Il 24/11/2014 02:58, Wen Congyang ha scritto:
>> When I try to use virtio on xen(HVM guest), qemu crashed. Here is the backtrace:
>> (gdb) bt
>> #0  0x00007f49581f0b55 in raise () from /lib64/libc.so.6
>> #1  0x00007f49581f2131 in abort () from /lib64/libc.so.6
>> #2  0x00007f495af2af32 in xen_ram_addr_from_mapcache (ptr=0x7f4951858ac8) at /root/work/xen/tools/qemu-xen-dir/xen-mapcache.c:316
>> #3  0x00007f495ae30fb3 in qemu_ram_addr_from_host (ptr=0x7f4951858ac8, ram_addr=0x7fff564dc9b0) at /root/work/xen/tools/qemu-xen-dir/exec.c:1508
>> #4  0x00007f495ae33424 in address_space_unmap (as=0x7f495b7c3520, buffer=0x7f4951858ac8, len=6, is_write=0, access_len=6) at /root/work/xen/tools/qemu-xen-dir/exec.c:2315
>> #5  0x00007f495ae335b3 in cpu_physical_memory_unmap (buffer=0x7f4951858ac8, len=6, is_write=0, access_len=6) at /root/work/xen/tools/qemu-xen-dir/exec.c:2353
>> #6  0x00007f495ae9058d in virtqueue_fill (vq=0x7f495b931250, elem=0x7fff564dcb00, len=1, idx=0) at /root/work/xen/tools/qemu-xen-dir/hw/virtio/virtio.c:258
>> #7  0x00007f495ae90a0d in virtqueue_push (vq=0x7f495b931250, elem=0x7fff564dcb00, len=1) at /root/work/xen/tools/qemu-xen-dir/hw/virtio/virtio.c:286
>> #8  0x00007f495ae82cf3 in virtio_net_handle_ctrl (vdev=0x7f495b92a5d0, vq=0x7f495b931250) at /root/work/xen/tools/qemu-xen-dir/hw/net/virtio-net.c:806
>> #9  0x00007f495ae925e5 in virtio_queue_notify_vq (vq=0x7f495b931250) at /root/work/xen/tools/qemu-xen-dir/hw/virtio/virtio.c:729
>> #10 0x00007f495ae926c3 in virtio_queue_notify (vdev=0x7f495b92a5d0, n=2) at /root/work/xen/tools/qemu-xen-dir/hw/virtio/virtio.c:735
>> #11 0x00007f495ad743c2 in virtio_ioport_write (opaque=0x7f495b929cd0, addr=16, val=2) at hw/virtio/virtio-pci.c:301
>> #12 0x00007f495ad74923 in virtio_pci_config_write (opaque=0x7f495b929cd0, addr=16, val=2, size=2) at hw/virtio/virtio-pci.c:433
>> #13 0x00007f495ae9f071 in memory_region_write_accessor (mr=0x7f495b92a468, addr=16, value=0x7fff564e8d08, size=2, shift=0, mask=65535) at /root/work/xen/tools/qemu-xen-dir/memory.c:441
>> #14 0x00007f495ae9f1ad in access_with_adjusted_size (addr=16, value=0x7fff564e8d08, size=2, access_size_min=1, access_size_max=4, access=0x7f495ae9efe8 <memory_region_write_accessor>, mr=0x7f495b92a468)
>>      at /root/work/xen/tools/qemu-xen-dir/memory.c:478
>> #15 0x00007f495aea200e in memory_region_dispatch_write (mr=0x7f495b92a468, addr=16, data=2, size=2) at /root/work/xen/tools/qemu-xen-dir/memory.c:985
>> #16 0x00007f495aea5824 in io_mem_write (mr=0x7f495b92a468, addr=16, val=2, size=2) at /root/work/xen/tools/qemu-xen-dir/memory.c:1744
>> #17 0x00007f495ae328d3 in address_space_rw (as=0x7f495b7c3600, addr=49200, buf=0x7fff564e8e60 "\002", len=2, is_write=true) at /root/work/xen/tools/qemu-xen-dir/exec.c:2029
>> #18 0x00007f495ae32c85 in address_space_write (as=0x7f495b7c3600, addr=49200, buf=0x7fff564e8e60 "\002", len=2) at /root/work/xen/tools/qemu-xen-dir/exec.c:2091
>> #19 0x00007f495ae9c130 in cpu_outw (addr=49200, val=2) at /root/work/xen/tools/qemu-xen-dir/ioport.c:77
>> #20 0x00007f495af289d0 in do_outp (addr=49200, size=2, val=2) at /root/work/xen/tools/qemu-xen-dir/xen-hvm.c:668
>> #21 0x00007f495af28b94 in cpu_ioreq_pio (req=0x7f495ab25000) at /root/work/xen/tools/qemu-xen-dir/xen-hvm.c:729
>> #22 0x00007f495af28ee5 in handle_ioreq (req=0x7f495ab25000) at /root/work/xen/tools/qemu-xen-dir/xen-hvm.c:781
>> #23 0x00007f495af29237 in cpu_handle_ioreq (opaque=0x7f495b884ad0) at /root/work/xen/tools/qemu-xen-dir/xen-hvm.c:856
>> #24 0x00007f495ad7d2c2 in qemu_iohandler_poll (pollfds=0x7f495b823820, ret=1) at iohandler.c:143
>> #25 0x00007f495ad7e2fd in main_loop_wait (nonblocking=0) at main-loop.c:485
>> #26 0x00007f495ae1386f in main_loop () at vl.c:2056
>> #27 0x00007f495ae1af17 in main (argc=35, argv=0x7fff564e94c8, envp=0x7fff564e95e8) at vl.c:4535
>> (gdb) q
>>
>>
> Added qemu-devel and qemu maintainer in xen to cc.
> 
> @Wen Congyang: when you report a bug is useful add more details and logs, domU's xl cfg, domU's qemu log, xen and qemu version used ecc...
> .
> 

The config file is not backuped before changing. I remember I only change vcpus and nic model.
Here is the config file:
===================================================
builder='hvm'

memory = 2048
vcpus=2
cpus="3"

name = "hvm_nopv"

disk = [ 'format=raw,devtype=disk,access=w,vdev=hda,target=/data/images/xen/hvm_nopv/suse/hvm.img'
#      , 'format=raw,devtype=disk,access=w,vdev=hdb,target=/data/images/xen/hvm_nopv/suse/hvm_data.img'
       ]

vif = [ 'mac=00:16:4f:00:00:11, bridge=br0, model=virtio-net' ]

#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="c"

sdl=0

vnc=1

vnclisten='0.0.0.0'

vncunused = 1

stdvga = 0

serial='pty'

apic=1
apci=1
pae=1

extid=0
keymap="en-us"
localtime=1
hpet=1

usbdevice='tablet'

xen_platform_pci=0
===================================================

qemu log(/var/log/xen/qemu-xxx):
char device redirected to /dev/pts/2 (label serial0)
xen_ram_addr_from_mapcache, could not find 0x7f267bd828e8

qemu version:
qemu-upstream-unstable:
http://xenbits.xen.org/gitweb/?p=qemu-upstream-unstable.git;a=summary
commit: ca78cc83650b535d7e24baeaea32947be0141534

xl: not the newest, commit c90a755f261b8ccb3dac7e1f695122cac95c6053. I change
some codes(remus related/suspend/resume...)

  reply	other threads:[~2014-11-24  9:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <547290D7.2020506@cn.fujitsu.com>
2014-11-24  8:52 ` [Qemu-devel] qemu crash with virtio on Xen domUs (backtrace included) Fabio Fantoni
2014-11-24  9:25   ` Wen Congyang [this message]
2014-11-24 15:23     ` Stefano Stabellini
2014-11-24 17:32       ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2014-11-24 18:44         ` [Qemu-devel] virtio leaks cpu mappings, was: " Stefano Stabellini
2014-11-24 18:52           ` [Qemu-devel] [Xen-devel] " Konrad Rzeszutek Wilk
2014-11-24 19:01             ` Stefano Stabellini
2014-11-25  1:32           ` [Qemu-devel] " Wen Congyang
2014-11-25  6:16           ` [Qemu-devel] [Xen-devel] " Jason Wang
2014-11-25 13:53             ` Stefano Stabellini
2014-11-26  5:23               ` Jason Wang
2014-11-26 10:53                 ` Stefano Stabellini
2014-11-27  5:01                   ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5472F980.6030208@cn.fujitsu.com \
    --to=wency@cn.fujitsu.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=fabio.fantoni@m2r.biz \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).