QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
@ 2015-09-14  8:01 Gonglei (Arei)
  2015-09-14  9:28 ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Gonglei (Arei) @ 2015-09-14  8:01 UTC (permalink / raw
  To: qemu-devel@nongnu.org; +Cc: Paolo Bonzini, Huangpeng (Peter)

Hi,

Recently, our test team found several Qemu crash problems with the next assertion messages:

[2015-09-11 13:42:44] domain is rebooting 
qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
[2015-09-11 13:42:58]: shutting down

Or
qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.

Environments:
1. Host OS: RedHat -7.1
2. Guest OS: Suse11-sp3
3. Qem: Qemu-2.3.0 release
4. Qemu commad line (which start from Libvirt 1.2.17 version) :
/usr/bin/qemu-kvm -name vm6 -S -machine pc-i440fx-2.3,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=1073741824 -numa node,nodeid=0,cpus=0-3,memdev=ram-node0 -uuid 5566d996-fad5-4b4b-89d2-249e3de1e006 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm6.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,clock=vm,driftfix=slew -no-hpet -global kvm-pit.lost_tick_policy=discard -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/data/zj/stbtest/image/suse11_sp3_64_6.img,if=none,id=drive-scsi0-0-0-0,format=raw,cache=none,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -drive if=none,id=drive-ide0-0-1,readonly=on,format=raw,cache=none,aio=native -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fds=40:41:42:43,id=hostnet0,vhost=on,vhostfds=44:45:46:47 -device virtio-net-pci,mq=on,vectors=10,netdev=hostnet0,id=net0,mac=52:58:00:00:01:06,bus=pci.0,addr=0x3 -chardev socket,id=charnet1,path=/var/run/vhost-user/port61 -netdev type=vhost-user,id=hostnet1,chardev=charnet1 -device virtio-net-pci,vringbuf=2048,netdev=hostnet1,id=net1,mac=52:58:00:00:00:61,bus=pci.0,addr=0x4 -chardev socket,id=charnet2,path=/var/run/vhost-user/port62 -netdev type=vhost-user,id=hostnet2,chardev=charnet2 -device virtio-net-pci,vringbuf=2048,netdev=hostnet2,id=net2,mac=52:58:00:00:00:62,bus=pci.0,addr=0x5 -chardev socket,id=charchannel0,path=/var/run/libvirt/qemu/vm6.extend,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1 -chardev socket,id=charchannel1,path=/var/run/libvirt/qemu/vm6.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -chardev socket,id=charchannel2,path=/var/run/libvirt/qemu/vm6.hostd,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel2,id=channel2,name=org.qemu.guest_agent.2 -chardev socket,id=charchannel3,path=/var/run/libvirt/qemu/vm6.upgraded,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=4,chardev=charchannel3,id=channel3,name=org.qemu.guest_agent.3 -device usb-tablet,id=input0 -vnc 0.0.0.0:6 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -msg timestamp=on

Testing case Steps (very simply):
*) Reboot Virtual Machine repeatedly inside VM, suddenly Qemu process crashed.

Does anyone know this problem? Thanks!
If you need some other information, please let me know. 

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-14  8:01 [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed Gonglei (Arei)
@ 2015-09-14  9:28 ` Paolo Bonzini
  2015-09-15  1:16   ` Gonglei
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2015-09-14  9:28 UTC (permalink / raw
  To: Gonglei (Arei), qemu-devel@nongnu.org; +Cc: Huangpeng (Peter)



On 14/09/2015 10:01, Gonglei (Arei) wrote:
> [2015-09-11 13:42:44] domain is rebooting 
> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
> [2015-09-11 13:42:58]: shutting down
> 
> Or
> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.

You need to provide a backtrace.

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-14  9:28 ` Paolo Bonzini
@ 2015-09-15  1:16   ` Gonglei
  2015-09-15  6:33     ` Gonglei
  0 siblings, 1 reply; 7+ messages in thread
From: Gonglei @ 2015-09-15  1:16 UTC (permalink / raw
  To: Paolo Bonzini, qemu-devel@nongnu.org; +Cc: Huangpeng (Peter), kraxel@redhat.com

On 2015/9/14 17:28, Paolo Bonzini wrote:
> 
> 
> On 14/09/2015 10:01, Gonglei (Arei) wrote:
>> [2015-09-11 13:42:44] domain is rebooting 
>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
>> [2015-09-11 13:42:58]: shutting down
>>
>> Or
>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
> 
> You need to provide a backtrace.
> 
> Paolo
> 
Yup, I noticed that, but when I sent this email yesterday, I didn't get a backtrace :(
Fortunately,   I get a backtrace now:

#0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
#1 0x00007f17ad7a7f1a in register_multipage (d=0x7f179c4f8480, section=0x7f17a323c3f0) at /home/qemu/exec.c:1215
#2 0x00007f17ad7a8266 in mem_add (listener=0x7f17ae043968 <address_space_io+72>, section=0x7f17a323c730) at /home/qemu/exec.c:1250
#3 0x00007f17ad7f843a in address_space_update_topology_pass (as=0x7f17ae043920 <address_space_io>, old_view=0x7f179c1f8b50, new_view=0x7f179c523620, adding=true)
at /home/qemu/memory.c:739
#4 0x00007f17ad7f8520 in address_space_update_topology (as=0x7f17ae043920 <address_space_io>) at /home/qemu/memory.c:754
#5 0x00007f17ad7f8660 in memory_region_transaction_commit () at /home/qemu/memory.c:794
#6 0x00007f17ad9a690c in cirrus_update_memory_access (s=0x7f17b12873c0) at hw/display/cirrus_vga.c:2485
#7 0x00007f17ad9a4dac in cirrus_vga_write_gr (s=0x7f17b12873c0, reg_index=9, reg_value=163) at hw/display/cirrus_vga.c:1524
#8 0x00007f17ad9a6e47 in cirrus_vga_ioport_write (opaque=0x7f17b12873c0, addr=975, val=163, size=1) at hw/display/cirrus_vga.c:2672
#9 0x00007f17ad7f6882 in memory_region_write_accessor (mr=0x7f17b1297d88, addr=31, value=0x7f17a323c968, size=1, shift=8, mask=255) at /home/qemu/memory.c:430
#10 0x00007f17ad7f698b in access_with_adjusted_size (addr=30, value=0x7f17a323c968, size=2, access_size_min=1, access_size_max=1, access=0x7f17ad7f67fd <memory_region_write_accessor>, mr=0x7f17b1297d88)
at /home/qemu/memory.c:467
#11 0x00007f17ad7f9311 in memory_region_dispatch_write (mr=0x7f17b1297d88, addr=30, data=41737, size=2) at /home/qemu/memory.c:1103
#12 0x00007f17ad7fc22e in io_mem_write (mr=0x7f17b1297d88, addr=30, val=41737, size=2) at /home/qemu/memory.c:2003
#13 0x00007f17ad7aafe4 in address_space_rw (as=0x7f17ae043920 <address_space_io>, addr=974, buf=0x7f17ad6f6000 "\t\243\320", len=2, is_write=true) at /home/qemu/exec.c:2533
#14 0x00007f17ad7f3acf in kvm_handle_io (port=974, data=0x7f17ad6f6000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
#15 0x00007f17ad7f3fb5 in kvm_cpu_exec (cpu=0x7f17b05b7a20) at /home/qemu/kvm-all.c:1864
#16 0x00007f17ad7db416 in qemu_kvm_cpu_thread_fn (arg=0x7f17b05b7a20) at /home/qemu/cpus.c:972
#17 0x00007f17ac2cbdf5 in start_thread () from /lib64/libpthread.so.0
#18 0x00007f17a73e31ad in clone () from /lib64/libc.so.6

It seems that something wrong happened in vga memory updating.

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-15  1:16   ` Gonglei
@ 2015-09-15  6:33     ` Gonglei
  2015-09-15  9:20       ` Gonglei
  0 siblings, 1 reply; 7+ messages in thread
From: Gonglei @ 2015-09-15  6:33 UTC (permalink / raw
  To: Paolo Bonzini, qemu-devel@nongnu.org; +Cc: Huangpeng (Peter), kraxel@redhat.com

On 2015/9/15 9:16, Gonglei wrote:
> On 2015/9/14 17:28, Paolo Bonzini wrote:
>>
>>
>> On 14/09/2015 10:01, Gonglei (Arei) wrote:
>>> [2015-09-11 13:42:44] domain is rebooting 
>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
>>> [2015-09-11 13:42:58]: shutting down
>>>
>>> Or
>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
>>
>> You need to provide a backtrace.
>>
>> Paolo
>>
> Yup, I noticed that, but when I sent this email yesterday, I didn't get a backtrace :(
> Fortunately,   I get a backtrace now:
> 
> #0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
> #1 0x00007f17ad7a7f1a in register_multipage (d=0x7f179c4f8480, section=0x7f17a323c3f0) at /home/qemu/exec.c:1215
> #2 0x00007f17ad7a8266 in mem_add (listener=0x7f17ae043968 <address_space_io+72>, section=0x7f17a323c730) at /home/qemu/exec.c:1250
> #3 0x00007f17ad7f843a in address_space_update_topology_pass (as=0x7f17ae043920 <address_space_io>, old_view=0x7f179c1f8b50, new_view=0x7f179c523620, adding=true)
> at /home/qemu/memory.c:739
> #4 0x00007f17ad7f8520 in address_space_update_topology (as=0x7f17ae043920 <address_space_io>) at /home/qemu/memory.c:754
> #5 0x00007f17ad7f8660 in memory_region_transaction_commit () at /home/qemu/memory.c:794
> #6 0x00007f17ad9a690c in cirrus_update_memory_access (s=0x7f17b12873c0) at hw/display/cirrus_vga.c:2485
> #7 0x00007f17ad9a4dac in cirrus_vga_write_gr (s=0x7f17b12873c0, reg_index=9, reg_value=163) at hw/display/cirrus_vga.c:1524
> #8 0x00007f17ad9a6e47 in cirrus_vga_ioport_write (opaque=0x7f17b12873c0, addr=975, val=163, size=1) at hw/display/cirrus_vga.c:2672
> #9 0x00007f17ad7f6882 in memory_region_write_accessor (mr=0x7f17b1297d88, addr=31, value=0x7f17a323c968, size=1, shift=8, mask=255) at /home/qemu/memory.c:430
> #10 0x00007f17ad7f698b in access_with_adjusted_size (addr=30, value=0x7f17a323c968, size=2, access_size_min=1, access_size_max=1, access=0x7f17ad7f67fd <memory_region_write_accessor>, mr=0x7f17b1297d88)
> at /home/qemu/memory.c:467
> #11 0x00007f17ad7f9311 in memory_region_dispatch_write (mr=0x7f17b1297d88, addr=30, data=41737, size=2) at /home/qemu/memory.c:1103
> #12 0x00007f17ad7fc22e in io_mem_write (mr=0x7f17b1297d88, addr=30, val=41737, size=2) at /home/qemu/memory.c:2003
> #13 0x00007f17ad7aafe4 in address_space_rw (as=0x7f17ae043920 <address_space_io>, addr=974, buf=0x7f17ad6f6000 "\t\243\320", len=2, is_write=true) at /home/qemu/exec.c:2533
> #14 0x00007f17ad7f3acf in kvm_handle_io (port=974, data=0x7f17ad6f6000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
> #15 0x00007f17ad7f3fb5 in kvm_cpu_exec (cpu=0x7f17b05b7a20) at /home/qemu/kvm-all.c:1864
> #16 0x00007f17ad7db416 in qemu_kvm_cpu_thread_fn (arg=0x7f17b05b7a20) at /home/qemu/cpus.c:972
> #17 0x00007f17ac2cbdf5 in start_thread () from /lib64/libpthread.so.0
> #18 0x00007f17a73e31ad in clone () from /lib64/libc.so.6
> 
> It seems that something wrong happened in vga memory updating.
> 

Another backtrace:

(gdb) bt
#0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
#1 0x00007f4cdefc1f6a in register_multipage (d=0x7f4cd012f1c0, section=0x7f4cd4a562c0) at /home/qemu/exec.c:1215
#2 0x00007f4cdefc22b6 in mem_add (listener=0x7f4cdf85d968 <address_space_io+72>, section=0x7f4cd4a56600) at /home/qemu/exec.c:1250
#3 0x00007f4cdf01248a in address_space_update_topology_pass (as=0x7f4cdf85d920 <address_space_io>, old_view=0x7f4cd0028d40, new_view=0x7f4cd015f5f0, adding=true)
at /home/qemu/memory.c:739
#4 0x00007f4cdf012570 in address_space_update_topology (as=0x7f4cdf85d920 <address_space_io>) at /home/qemu/memory.c:754
#5 0x00007f4cdf0126b0 in memory_region_transaction_commit () at /home/qemu/memory.c:794
#6 0x00007f4cdf0151f0 in memory_region_del_subregion (mr=0x7f4ce01034e0, subregion=0x7f4ce13873a0) at /home/qemu/memory.c:1698
#7 0x00007f4cdf21761d in pci_update_mappings (d=0x7f4ce1386f70) at hw/pci/pci.c:1120
#8 0x00007f4cdf2179b0 in pci_default_write_config (d=0x7f4ce1386f70, addr=4, val_in=256, l=2) at hw/pci/pci.c:1180
#9 0x00007f4cdf28d2d6 in virtio_write_config (pci_dev=0x7f4ce1386f70, address=4, val=256, len=2) at hw/virtio/virtio-pci.c:430
#10 0x00007f4cdf220746 in pci_host_config_write_common (pci_dev=0x7f4ce1386f70, addr=4, limit=256, val=256, len=2) at hw/pci/pci_host.c:57
#11 0x00007f4cdf22084a in pci_data_write (s=0x7f4ce008afc0, addr=2147489796, val=256, len=2) at hw/pci/pci_host.c:84
#12 0x00007f4cdf22096c in pci_host_data_write (opaque=0x7f4ce00896b0, addr=0, val=256, len=2) at hw/pci/pci_host.c:137
#13 0x00007f4cdf0108d2 in memory_region_write_accessor (mr=0x7f4ce0089ab0, addr=0, value=0x7f4cd4a56968, size=2, shift=0, mask=65535) at /home/qemu/memory.c:430
#14 0x00007f4cdf0109db in access_with_adjusted_size (addr=0, value=0x7f4cd4a56968, size=2, access_size_min=1, access_size_max=4, access=0x7f4cdf01084d <memory_region_write_accessor>, mr=0x7f4ce0089ab0)
at /home/qemu/memory.c:467
#15 0x00007f4cdf013361 in memory_region_dispatch_write (mr=0x7f4ce0089ab0, addr=0, data=256, size=2) at /home/qemu/memory.c:1103
#16 0x00007f4cdf01627e in io_mem_write (mr=0x7f4ce0089ab0, addr=0, val=256, size=2) at /home/qemu/memory.c:2003
#17 0x00007f4cdefc5034 in address_space_rw (as=0x7f4cdf85d920 <address_space_io>, addr=3324, buf=0x7f4cdef10000 "", len=2, is_write=true) at /home/qemu/exec.c:2533
#18 0x00007f4cdf00db1f in kvm_handle_io (port=3324, data=0x7f4cdef10000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
#19 0x00007f4cdf00e005 in kvm_cpu_exec (cpu=0x7f4ce00eca20) at /home/qemu/kvm-all.c:1864
#20 0x00007f4cdeff5466 in qemu_kvm_cpu_thread_fn (arg=0x7f4ce00eca20) at /home/qemu/cpus.c:972
#21 0x00007f4cddae5df5 in start_thread () from /lib64/libpthread.so.0
#22 0x00007f4cd8bfd1ad in clone () from /lib64/libc.so.6

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-15  6:33     ` Gonglei
@ 2015-09-15  9:20       ` Gonglei
  2015-09-15 16:49         ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Gonglei @ 2015-09-15  9:20 UTC (permalink / raw
  To: Paolo Bonzini, qemu-devel@nongnu.org; +Cc: Huangpeng (Peter), kraxel@redhat.com

On 2015/9/15 14:33, Gonglei wrote:
> On 2015/9/15 9:16, Gonglei wrote:
>> On 2015/9/14 17:28, Paolo Bonzini wrote:
>>>
>>>
>>> On 14/09/2015 10:01, Gonglei (Arei) wrote:
>>>> [2015-09-11 13:42:44] domain is rebooting 
>>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
>>>> [2015-09-11 13:42:58]: shutting down
>>>>
>>>> Or
>>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
>>>
>>> You need to provide a backtrace.
>>>
>>> Paolo
>>>
>> Yup, I noticed that, but when I sent this email yesterday, I didn't get a backtrace :(
>> Fortunately,   I get a backtrace now:
>>
>> #0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
>> #1 0x00007f17ad7a7f1a in register_multipage (d=0x7f179c4f8480, section=0x7f17a323c3f0) at /home/qemu/exec.c:1215
>> #2 0x00007f17ad7a8266 in mem_add (listener=0x7f17ae043968 <address_space_io+72>, section=0x7f17a323c730) at /home/qemu/exec.c:1250
>> #3 0x00007f17ad7f843a in address_space_update_topology_pass (as=0x7f17ae043920 <address_space_io>, old_view=0x7f179c1f8b50, new_view=0x7f179c523620, adding=true)
>> at /home/qemu/memory.c:739
>> #4 0x00007f17ad7f8520 in address_space_update_topology (as=0x7f17ae043920 <address_space_io>) at /home/qemu/memory.c:754
>> #5 0x00007f17ad7f8660 in memory_region_transaction_commit () at /home/qemu/memory.c:794
>> #6 0x00007f17ad9a690c in cirrus_update_memory_access (s=0x7f17b12873c0) at hw/display/cirrus_vga.c:2485
>> #7 0x00007f17ad9a4dac in cirrus_vga_write_gr (s=0x7f17b12873c0, reg_index=9, reg_value=163) at hw/display/cirrus_vga.c:1524
>> #8 0x00007f17ad9a6e47 in cirrus_vga_ioport_write (opaque=0x7f17b12873c0, addr=975, val=163, size=1) at hw/display/cirrus_vga.c:2672
>> #9 0x00007f17ad7f6882 in memory_region_write_accessor (mr=0x7f17b1297d88, addr=31, value=0x7f17a323c968, size=1, shift=8, mask=255) at /home/qemu/memory.c:430
>> #10 0x00007f17ad7f698b in access_with_adjusted_size (addr=30, value=0x7f17a323c968, size=2, access_size_min=1, access_size_max=1, access=0x7f17ad7f67fd <memory_region_write_accessor>, mr=0x7f17b1297d88)
>> at /home/qemu/memory.c:467
>> #11 0x00007f17ad7f9311 in memory_region_dispatch_write (mr=0x7f17b1297d88, addr=30, data=41737, size=2) at /home/qemu/memory.c:1103
>> #12 0x00007f17ad7fc22e in io_mem_write (mr=0x7f17b1297d88, addr=30, val=41737, size=2) at /home/qemu/memory.c:2003
>> #13 0x00007f17ad7aafe4 in address_space_rw (as=0x7f17ae043920 <address_space_io>, addr=974, buf=0x7f17ad6f6000 "\t\243\320", len=2, is_write=true) at /home/qemu/exec.c:2533
>> #14 0x00007f17ad7f3acf in kvm_handle_io (port=974, data=0x7f17ad6f6000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
>> #15 0x00007f17ad7f3fb5 in kvm_cpu_exec (cpu=0x7f17b05b7a20) at /home/qemu/kvm-all.c:1864
>> #16 0x00007f17ad7db416 in qemu_kvm_cpu_thread_fn (arg=0x7f17b05b7a20) at /home/qemu/cpus.c:972
>> #17 0x00007f17ac2cbdf5 in start_thread () from /lib64/libpthread.so.0
>> #18 0x00007f17a73e31ad in clone () from /lib64/libc.so.6
>>
>> It seems that something wrong happened in vga memory updating.
>>
> 
> Another backtrace:
> 
> (gdb) bt
> #0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
> #1 0x00007f4cdefc1f6a in register_multipage (d=0x7f4cd012f1c0, section=0x7f4cd4a562c0) at /home/qemu/exec.c:1215
> #2 0x00007f4cdefc22b6 in mem_add (listener=0x7f4cdf85d968 <address_space_io+72>, section=0x7f4cd4a56600) at /home/qemu/exec.c:1250
> #3 0x00007f4cdf01248a in address_space_update_topology_pass (as=0x7f4cdf85d920 <address_space_io>, old_view=0x7f4cd0028d40, new_view=0x7f4cd015f5f0, adding=true)
> at /home/qemu/memory.c:739
> #4 0x00007f4cdf012570 in address_space_update_topology (as=0x7f4cdf85d920 <address_space_io>) at /home/qemu/memory.c:754
> #5 0x00007f4cdf0126b0 in memory_region_transaction_commit () at /home/qemu/memory.c:794
> #6 0x00007f4cdf0151f0 in memory_region_del_subregion (mr=0x7f4ce01034e0, subregion=0x7f4ce13873a0) at /home/qemu/memory.c:1698
> #7 0x00007f4cdf21761d in pci_update_mappings (d=0x7f4ce1386f70) at hw/pci/pci.c:1120
> #8 0x00007f4cdf2179b0 in pci_default_write_config (d=0x7f4ce1386f70, addr=4, val_in=256, l=2) at hw/pci/pci.c:1180
> #9 0x00007f4cdf28d2d6 in virtio_write_config (pci_dev=0x7f4ce1386f70, address=4, val=256, len=2) at hw/virtio/virtio-pci.c:430
> #10 0x00007f4cdf220746 in pci_host_config_write_common (pci_dev=0x7f4ce1386f70, addr=4, limit=256, val=256, len=2) at hw/pci/pci_host.c:57
> #11 0x00007f4cdf22084a in pci_data_write (s=0x7f4ce008afc0, addr=2147489796, val=256, len=2) at hw/pci/pci_host.c:84
> #12 0x00007f4cdf22096c in pci_host_data_write (opaque=0x7f4ce00896b0, addr=0, val=256, len=2) at hw/pci/pci_host.c:137
> #13 0x00007f4cdf0108d2 in memory_region_write_accessor (mr=0x7f4ce0089ab0, addr=0, value=0x7f4cd4a56968, size=2, shift=0, mask=65535) at /home/qemu/memory.c:430
> #14 0x00007f4cdf0109db in access_with_adjusted_size (addr=0, value=0x7f4cd4a56968, size=2, access_size_min=1, access_size_max=4, access=0x7f4cdf01084d <memory_region_write_accessor>, mr=0x7f4ce0089ab0)
> at /home/qemu/memory.c:467
> #15 0x00007f4cdf013361 in memory_region_dispatch_write (mr=0x7f4ce0089ab0, addr=0, data=256, size=2) at /home/qemu/memory.c:1103
> #16 0x00007f4cdf01627e in io_mem_write (mr=0x7f4ce0089ab0, addr=0, val=256, size=2) at /home/qemu/memory.c:2003
> #17 0x00007f4cdefc5034 in address_space_rw (as=0x7f4cdf85d920 <address_space_io>, addr=3324, buf=0x7f4cdef10000 "", len=2, is_write=true) at /home/qemu/exec.c:2533
> #18 0x00007f4cdf00db1f in kvm_handle_io (port=3324, data=0x7f4cdef10000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
> #19 0x00007f4cdf00e005 in kvm_cpu_exec (cpu=0x7f4ce00eca20) at /home/qemu/kvm-all.c:1864
> #20 0x00007f4cdeff5466 in qemu_kvm_cpu_thread_fn (arg=0x7f4ce00eca20) at /home/qemu/cpus.c:972
> #21 0x00007f4cddae5df5 in start_thread () from /lib64/libpthread.so.0
> #22 0x00007f4cd8bfd1ad in clone () from /lib64/libc.so.6
> 

Paolo, do you have any cues? Thanks!

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-15  9:20       ` Gonglei
@ 2015-09-15 16:49         ` Paolo Bonzini
  2015-09-18  7:34           ` Gonglei
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2015-09-15 16:49 UTC (permalink / raw
  To: Gonglei, qemu-devel@nongnu.org; +Cc: Huangpeng (Peter), kraxel@redhat.com



On 15/09/2015 11:20, Gonglei wrote:
> On 2015/9/15 14:33, Gonglei wrote:
>> On 2015/9/15 9:16, Gonglei wrote:
>>> On 2015/9/14 17:28, Paolo Bonzini wrote:
>>>>
>>>>
>>>> On 14/09/2015 10:01, Gonglei (Arei) wrote:
>>>>> [2015-09-11 13:42:44] domain is rebooting 
>>>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/exec.c:1188: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. 
>>>>> [2015-09-11 13:42:58]: shutting down
>>>>>
>>>>> Or
>>>>> qemu-kvm: /home/abuild/rpmbuild/BUILD/qemu-kvm-2.3.0/include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed.
>>>>
>>>> You need to provide a backtrace.
>>>>
>>>> Paolo
>>>>
>>> Yup, I noticed that, but when I sent this email yesterday, I didn't get a backtrace :(
>>> Fortunately,   I get a backtrace now:
>>>
>>> #0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
>>> #1 0x00007f17ad7a7f1a in register_multipage (d=0x7f179c4f8480, section=0x7f17a323c3f0) at /home/qemu/exec.c:1215
>>> #2 0x00007f17ad7a8266 in mem_add (listener=0x7f17ae043968 <address_space_io+72>, section=0x7f17a323c730) at /home/qemu/exec.c:1250
>>> #3 0x00007f17ad7f843a in address_space_update_topology_pass (as=0x7f17ae043920 <address_space_io>, old_view=0x7f179c1f8b50, new_view=0x7f179c523620, adding=true)
>>> at /home/qemu/memory.c:739
>>> #4 0x00007f17ad7f8520 in address_space_update_topology (as=0x7f17ae043920 <address_space_io>) at /home/qemu/memory.c:754
>>> #5 0x00007f17ad7f8660 in memory_region_transaction_commit () at /home/qemu/memory.c:794
>>> #6 0x00007f17ad9a690c in cirrus_update_memory_access (s=0x7f17b12873c0) at hw/display/cirrus_vga.c:2485
>>> #7 0x00007f17ad9a4dac in cirrus_vga_write_gr (s=0x7f17b12873c0, reg_index=9, reg_value=163) at hw/display/cirrus_vga.c:1524
>>> #8 0x00007f17ad9a6e47 in cirrus_vga_ioport_write (opaque=0x7f17b12873c0, addr=975, val=163, size=1) at hw/display/cirrus_vga.c:2672
>>> #9 0x00007f17ad7f6882 in memory_region_write_accessor (mr=0x7f17b1297d88, addr=31, value=0x7f17a323c968, size=1, shift=8, mask=255) at /home/qemu/memory.c:430
>>> #10 0x00007f17ad7f698b in access_with_adjusted_size (addr=30, value=0x7f17a323c968, size=2, access_size_min=1, access_size_max=1, access=0x7f17ad7f67fd <memory_region_write_accessor>, mr=0x7f17b1297d88)
>>> at /home/qemu/memory.c:467
>>> #11 0x00007f17ad7f9311 in memory_region_dispatch_write (mr=0x7f17b1297d88, addr=30, data=41737, size=2) at /home/qemu/memory.c:1103
>>> #12 0x00007f17ad7fc22e in io_mem_write (mr=0x7f17b1297d88, addr=30, val=41737, size=2) at /home/qemu/memory.c:2003
>>> #13 0x00007f17ad7aafe4 in address_space_rw (as=0x7f17ae043920 <address_space_io>, addr=974, buf=0x7f17ad6f6000 "\t\243\320", len=2, is_write=true) at /home/qemu/exec.c:2533
>>> #14 0x00007f17ad7f3acf in kvm_handle_io (port=974, data=0x7f17ad6f6000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
>>> #15 0x00007f17ad7f3fb5 in kvm_cpu_exec (cpu=0x7f17b05b7a20) at /home/qemu/kvm-all.c:1864
>>> #16 0x00007f17ad7db416 in qemu_kvm_cpu_thread_fn (arg=0x7f17b05b7a20) at /home/qemu/cpus.c:972
>>> #17 0x00007f17ac2cbdf5 in start_thread () from /lib64/libpthread.so.0
>>> #18 0x00007f17a73e31ad in clone () from /lib64/libc.so.6
>>>
>>> It seems that something wrong happened in vga memory updating.
>>>
>>
>> Another backtrace:
>>
>> (gdb) bt
>> #0 int128_get64 (a=...) at /home/qemu/include/qemu/int128.h:27
>> #1 0x00007f4cdefc1f6a in register_multipage (d=0x7f4cd012f1c0, section=0x7f4cd4a562c0) at /home/qemu/exec.c:1215
>> #2 0x00007f4cdefc22b6 in mem_add (listener=0x7f4cdf85d968 <address_space_io+72>, section=0x7f4cd4a56600) at /home/qemu/exec.c:1250
>> #3 0x00007f4cdf01248a in address_space_update_topology_pass (as=0x7f4cdf85d920 <address_space_io>, old_view=0x7f4cd0028d40, new_view=0x7f4cd015f5f0, adding=true)
>> at /home/qemu/memory.c:739
>> #4 0x00007f4cdf012570 in address_space_update_topology (as=0x7f4cdf85d920 <address_space_io>) at /home/qemu/memory.c:754
>> #5 0x00007f4cdf0126b0 in memory_region_transaction_commit () at /home/qemu/memory.c:794
>> #6 0x00007f4cdf0151f0 in memory_region_del_subregion (mr=0x7f4ce01034e0, subregion=0x7f4ce13873a0) at /home/qemu/memory.c:1698
>> #7 0x00007f4cdf21761d in pci_update_mappings (d=0x7f4ce1386f70) at hw/pci/pci.c:1120
>> #8 0x00007f4cdf2179b0 in pci_default_write_config (d=0x7f4ce1386f70, addr=4, val_in=256, l=2) at hw/pci/pci.c:1180
>> #9 0x00007f4cdf28d2d6 in virtio_write_config (pci_dev=0x7f4ce1386f70, address=4, val=256, len=2) at hw/virtio/virtio-pci.c:430
>> #10 0x00007f4cdf220746 in pci_host_config_write_common (pci_dev=0x7f4ce1386f70, addr=4, limit=256, val=256, len=2) at hw/pci/pci_host.c:57
>> #11 0x00007f4cdf22084a in pci_data_write (s=0x7f4ce008afc0, addr=2147489796, val=256, len=2) at hw/pci/pci_host.c:84
>> #12 0x00007f4cdf22096c in pci_host_data_write (opaque=0x7f4ce00896b0, addr=0, val=256, len=2) at hw/pci/pci_host.c:137
>> #13 0x00007f4cdf0108d2 in memory_region_write_accessor (mr=0x7f4ce0089ab0, addr=0, value=0x7f4cd4a56968, size=2, shift=0, mask=65535) at /home/qemu/memory.c:430
>> #14 0x00007f4cdf0109db in access_with_adjusted_size (addr=0, value=0x7f4cd4a56968, size=2, access_size_min=1, access_size_max=4, access=0x7f4cdf01084d <memory_region_write_accessor>, mr=0x7f4ce0089ab0)
>> at /home/qemu/memory.c:467
>> #15 0x00007f4cdf013361 in memory_region_dispatch_write (mr=0x7f4ce0089ab0, addr=0, data=256, size=2) at /home/qemu/memory.c:1103
>> #16 0x00007f4cdf01627e in io_mem_write (mr=0x7f4ce0089ab0, addr=0, val=256, size=2) at /home/qemu/memory.c:2003
>> #17 0x00007f4cdefc5034 in address_space_rw (as=0x7f4cdf85d920 <address_space_io>, addr=3324, buf=0x7f4cdef10000 "", len=2, is_write=true) at /home/qemu/exec.c:2533
>> #18 0x00007f4cdf00db1f in kvm_handle_io (port=3324, data=0x7f4cdef10000, direction=1, size=2, count=1) at /home/qemu/kvm-all.c:1707
>> #19 0x00007f4cdf00e005 in kvm_cpu_exec (cpu=0x7f4ce00eca20) at /home/qemu/kvm-all.c:1864
>> #20 0x00007f4cdeff5466 in qemu_kvm_cpu_thread_fn (arg=0x7f4ce00eca20) at /home/qemu/cpus.c:972
>> #21 0x00007f4cddae5df5 in start_thread () from /lib64/libpthread.so.0
>> #22 0x00007f4cd8bfd1ad in clone () from /lib64/libc.so.6
>>
> 
> Paolo, do you have any cues? Thanks!

Sorry, I haven't looked at it yet.  I'll have to study the code.  In the
meanwhile, perhaps you can print "section" and "existing" please from gdb?

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
  2015-09-15 16:49         ` Paolo Bonzini
@ 2015-09-18  7:34           ` Gonglei
  0 siblings, 0 replies; 7+ messages in thread
From: Gonglei @ 2015-09-18  7:34 UTC (permalink / raw
  To: Paolo Bonzini, qemu-devel@nongnu.org; +Cc: Huangpeng (Peter), kraxel@redhat.com

On 2015/9/16 0:49, Paolo Bonzini wrote:
> 
> 
> Sorry, I haven't looked at it yet.  I'll have to study the code.  In the
> meanwhile, perhaps you can print "section" and "existing" please from gdb?
> 
> Paolo
> 

Hi, Paolo

 We reproduced the issue today, and get below information by gdb (we hardcode a dead loop):

[Switching to thread 7 (Thread 0x7f085a260700 (LWP 13677))]
#0 register_subpage (d=0x7f085432af50, section=0x7f085a25f220) at /home/uvp_v2r2_opensrc_qemu/exec.c:1191
1191 while(1);
(gdb) bt
#0 register_subpage (d=0x7f085432af50, section=0x7f085a25f220) at /home/uvp_v2r2_opensrc_qemu/exec.c:1191
#1 0x00007f08647cb133 in mem_add (listener=0x7f0865066968 <address_space_io+72>, section=0x7f085a25f3e0) at /home/uvp_v2r2_opensrc_qemu/exec.c:1234
#2 0x00007f086481af8b in address_space_update_topology_pass (as=0x7f0865066920 <address_space_io>, old_view=0x7f0854122430, new_view=0x7f085432cff0, adding=true)
at /home/uvp_v2r2_opensrc_qemu/memory.c:725
#3 0x00007f086481b570 in address_space_update_topology (as=0x7f0865066920 <address_space_io>) at /home/uvp_v2r2_opensrc_qemu/memory.c:754
#4 0x00007f086481b6b0 in memory_region_transaction_commit () at /home/uvp_v2r2_opensrc_qemu/memory.c:794
#5 0x00007f086481dff3 in memory_region_update_container_subregions (subregion=0x7f08676171b0) at /home/uvp_v2r2_opensrc_qemu/memory.c:1657
#6 0x00007f086481e062 in memory_region_add_subregion_common (mr=0x7f0866485720, offset=49216, subregion=0x7f08676171b0) at /home/uvp_v2r2_opensrc_qemu/memory.c:1667
#7 0x00007f086481e0f0 in memory_region_add_subregion_overlap (mr=0x7f0866485720, offset=49216, subregion=0x7f08676171b0, priority=1) at /home/uvp_v2r2_opensrc_qemu/memory.c:1686
#8 0x00007f0864a206c3 in pci_update_mappings (d=0x7f0867616930) at hw/pci/pci.c:1128
#9 0x00007f0864a209b0 in pci_default_write_config (d=0x7f0867616930, addr=4, val_in=259, l=2) at hw/pci/pci.c:1180
#10 0x00007f0864a962d6 in virtio_write_config (pci_dev=0x7f0867616930, address=4, val=259, len=2) at hw/virtio/virtio-pci.c:430
#11 0x00007f0864a29746 in pci_host_config_write_common (pci_dev=0x7f0867616930, addr=4, limit=256, val=259, len=2) at hw/pci/pci_host.c:57
#12 0x00007f0864a2984a in pci_data_write (s=0x7f08664a6ff0, addr=2147491844, val=259, len=2) at hw/pci/pci_host.c:84
#13 0x00007f0864a2996c in pci_host_data_write (opaque=0x7f08664a56e0, addr=0, val=259, len=2) at hw/pci/pci_host.c:137
#14 0x00007f08648198d2 in memory_region_write_accessor (mr=0x7f08664a5ae0, addr=0, value=0x7f085a25f968, size=2, shift=0, mask=65535) at /home/uvp_v2r2_opensrc_qemu/memory.c:430
#15 0x00007f08648199db in access_with_adjusted_size (addr=0, value=0x7f085a25f968, size=2, access_size_min=1, access_size_max=4, access=0x7f086481984d <memory_region_write_accessor>,
mr=0x7f08664a5ae0) at /home/uvp_v2r2_opensrc_qemu/memory.c:467
#16 0x00007f086481c361 in memory_region_dispatch_write (mr=0x7f08664a5ae0, addr=0, data=259, size=2) at /home/uvp_v2r2_opensrc_qemu/memory.c:1103
#17 0x00007f086481f27e in io_mem_write (mr=0x7f08664a5ae0, addr=0, val=259, size=2) at /home/uvp_v2r2_opensrc_qemu/memory.c:2003
#18 0x00007f08647ce034 in address_space_rw (as=0x7f0865066920 <address_space_io>, addr=3324, buf=0x7f0864719000 "\003\001", len=2, is_write=true) at /home/uvp_v2r2_opensrc_qemu/exec.c:2533
#19 0x00007f0864816b1f in kvm_handle_io (port=3324, data=0x7f0864719000, direction=1, size=2, count=1) at /home/uvp_v2r2_opensrc_qemu/kvm-all.c:1707
#20 0x00007f0864817005 in kvm_cpu_exec (cpu=0x7f0866508a50) at /home/uvp_v2r2_opensrc_qemu/kvm-all.c:1864
#21 0x00007f08647fe466 in qemu_kvm_cpu_thread_fn (arg=0x7f0866508a50) at /home/uvp_v2r2_opensrc_qemu/cpus.c:972
#22 0x00007f08632eedf5 in start_thread () from /lib64/libpthread.so.0
#23 0x00007f085e4061ad in clone () from /lib64/libc.so.6
(gdb) p/x *d
$1 = {rcu = {next = 0x0, func = 0x0}, phys_map = {skip = 0x1, ptr = 0x0}, map = {rcu = {next = 0x0, func = 0x0}, sections_nb = 0x48, sections_nb_alloc = 0x80, nodes_nb = 0x6,
nodes_nb_alloc = 0x24, nodes = 0x7f0854480550, sections = 0x7f08542e6a50}, as = 0x7f0865066920}
(gdb) p/x *section
$2 = {mr = 0x7f08676562c8, address_space = 0x7f0865066920, offset_within_region = 0x0, size = {lo = 0x14, hi = 0x0}, offset_within_address_space = 0xae00, readonly = 0x0}
(gdb) p/x *existing
$3 = {mr = 0x7f086740b4b8, address_space = 0x7f0865066920, offset_within_region = 0xf00, size = {lo = 0xb000, hi = 0x0}, offset_within_address_space = 0x1000, readonly = 0x0}
(gdb) p/x *existing->mr
$4 = {parent_obj = {class = 0x7f086646fbb0, free = 0x0, properties = {tqh_first = 0x7f086740be80, tqh_last = 0x7f086740c1f0}, ref = 0x1, parent = 0x7f086740b430}, ops = 0x7f0864f1bca0,
iommu_ops = 0x0, opaque = 0x7f086740b430, container = 0x7f0866485720, size = {lo = 0x1, hi = 0x0}, addr = 0x5658, destructor = 0x7f086481b74b, ram_addr = 0xffffffffffffffff, align = 0x0,
subpage = 0x0, terminates = 0x1, romd_mode = 0x1, ram = 0x0, skip_dump = 0x0, readonly = 0x0, enabled = 0x1, rom_device = 0x0, warning_printed = 0x0, flush_coalesced_mmio = 0x0, alias = 0x0,
alias_offset = 0x0, priority = 0x0, may_overlap = 0x0, subregions = {tqh_first = 0x0, tqh_last = 0x7f086740b560}, subregions_link = {tqe_next = 0x7f08673bb708, tqe_prev = 0x7f08673b4490},
coalesced = {tqh_first = 0x0, tqh_last = 0x7f086740b580}, name = 0x7f086740c250, dirty_log_mask = 0x0, ioeventfd_nb = 0x0, ioeventfds = 0x0, iommu_notify = {notifiers = {lh_first = 0x0}}}
(gdb) p *existing->mr
$5 = {parent_obj = {class = 0x7f086646fbb0, free = 0x0, properties = {tqh_first = 0x7f086740be80, tqh_last = 0x7f086740c1f0}, ref = 1, parent = 0x7f086740b430}, ops = 0x7f0864f1bca0 <vmport_ops>,
iommu_ops = 0x0, opaque = 0x7f086740b430, container = 0x7f0866485720, size = {lo = 1, hi = 0}, addr = 22104, destructor = 0x7f086481b74b <memory_region_destructor_none>,
ram_addr = 18446744073709551615, align = 0, subpage = false, terminates = true, romd_mode = true, ram = false, skip_dump = false, readonly = false, enabled = true, rom_device = false,
warning_printed = false, flush_coalesced_mmio = false, alias = 0x0, alias_offset = 0, priority = 0, may_overlap = false, subregions = {tqh_first = 0x0, tqh_last = 0x7f086740b560},
subregions_link = {tqe_next = 0x7f08673bb708, tqe_prev = 0x7f08673b4490}, coalesced = {tqh_first = 0x0, tqh_last = 0x7f086740b580}, name = 0x7f086740c250 "vmport", dirty_log_mask = 0 '\000',
ioeventfd_nb = 0, ioeventfds = 0x0, iommu_notify = {notifiers = {lh_first = 0x0}}}

If you need any other information, pls let me know, I'm reserving the issued VM. Thanks.

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-18  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14  8:01 [Qemu-devel] [Question] QEMU 2.3 Assertion with `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed Gonglei (Arei)
2015-09-14  9:28 ` Paolo Bonzini
2015-09-15  1:16   ` Gonglei
2015-09-15  6:33     ` Gonglei
2015-09-15  9:20       ` Gonglei
2015-09-15 16:49         ` Paolo Bonzini
2015-09-18  7:34           ` Gonglei

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 read-only IMAP folder(s) and NNTP newsgroup(s).