public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Getting Synchronous Exception while run avocado-vt tests
@ 2019-08-22  7:40 Zhanghailiang
  2019-08-22  9:24 ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Zhanghailiang @ 2019-08-22  7:40 UTC (permalink / raw)
  To: edk2-devel@lists.01.org, devel@edk2.groups.io
  Cc: Guoheyi, ard.biesheuvel@linaro.org

[-- Attachment #1: Type: text/plain, Size: 11391 bytes --]

Hi All,

We caught an 'Synchronous Exception' error while booting VM with uefi firmware in the avocado-vt tests.
The Edk2 version we used is edk2-stable201905. The qemu version is qemu-4.0.0 and kernel version is 4.19.0.
Parts of the log we got from serial is bellow, you can get the full log from attachment.
We can easily reproduce this issue with running avocado-vt tests. Actually, we tried the new edk2 from upstream,
It is still can be reproduced.

Reproduce command:
# avocado run type_specific.io-github-autotest-qemu.qmp_event_notification --vt-type qemu --vt-guest-os Guest.Linux.Fedora.29

Qemu command is :
/usr/libexec/qemu-kvm -name avocado-vt-vm1 -chardev file,path=/root/vm1_edk2.log,id=charseria_edk -serial chardev:charseria_edk -drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/avocado/data/avocado-vt/images/f28-aarch64_AAVMF_VARS.fd,if=pflash,format=raw,unit=1 -machine virt-4.0,gic-version=3 -nodefaults -device virtio-gpu-pci,bus=pcie.0,addr=0x1 -chardev socket,id=hmp_id_hmp1,path=/var/tmp/avocado_pwoki1gy/monitor-hmp1-20190822-144456-BNpsdyCz,server,nowait -mon chardev=hmp_id_hmp1,mode=readline -chardev socket,id=qmp_id_qmp1,path=/var/tmp/avocado_pwoki1gy/monitor-qmp1-20190822-144456-BNpsdyCz,server,nowait -mon chardev=qmp_id_qmp1,mode=control -chardev socket,id=qmp_id_qmp2,path=/var/tmp/avocado_pwoki1gy/monitor-qmp2-20190822-144456-BNpsdyCz,server,nowait -mon chardev=qmp_id_qmp2,mode=control -chardev socket,id=hmp_id_catch_monitor,path=/var/tmp/avocado_pwoki1gy/monitor-catch_monitor-20190822-144456-BNpsdyCz,server,nowait -mon chardev=hmp_id_catch_monitor,mode=readline -serial unix:/var/tmp/avocado_pwoki1gy/serial-serial0-20190822-144456-BNpsdyCz,server,nowait -device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 -device virtio-serial-pci,id=virtio_serial_pci0,bus=pcie.0-root-port-2,addr=0x0 -chardev socket,path=/var/tmp/avocado_pwoki1gy/virtio_port-vc1-20190822-144456-BNpsdyCz,id=id8egefs,server,nowait -device virtserialport,id=idmRzd3r,name=org.qemu.guest_agent.0,bus=virtio_serial_pci0.0,chardev=id8egefs -device pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 -device qemu-xhci,id=usb1,bus=pcie.0-root-port-3,addr=0x0 -device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie.0-root-port-4,addr=0x0 -drive id=drive_image1,if=none,format=qcow2,file=/var/lib/avocado/data/avocado-vt/images/f28-aarch64.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -device pcie-root-port,id=pcie.0-root-port-5,slot=5,chassis=5,addr=0x5,bus=pcie.0 -device virtio-net-pci,mac=9a:44:45:46:47:48,rombar=0,id=idqgzz84,vectors=4,netdev=id7rFJf9,bus=pcie.0-root-port-5,addr=0x0 -netdev tap,id=id7rFJf9,fd=22 -m 1024 -smp 2,maxcpus=2,cores=1,threads=1,sockets=2 -cpu host -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -device usb-kbd,id=usb-kbd1,bus=usb1.0,port=2 -vnc :0 -rtc base=utc,clock=host -enable-kvm -device pcie-root-port,id=pcie_extra_root_port_0,slot=6,chassis=6,addr=0x6,bus=pcie.0 -device pcie-root-port,id=pcie_extra_root_port_1,slot=7,chassis=7,addr=0x7,bus=pcie.0

It reports that this is a alignment fault from log, We analyzed the callstack from log:
VirtioScsiPassThru-> VirtioFlush->virtio10SetQueueNotify->Virtio10Transfer->PciIoMemWrite-> CpuMemoryServiceWrite-> MmioWrite32 <- here, the address is not align.
I tried to catch this case with the follow patch, but we never got the debug info while it happens, this is quite confused. :(

     } else if (OperationWidth == EfiCpuIoWidthUint16) {
+      if ((Address & 1) != 0) {^M
+            DEBUG((DEBUG_INFO, "%a: MmioWrite16 address 0x%lx Width %d!!!! not aligh \n", __FUNCTION__, Address, Width));^M
+      }^M
       MmioWrite16 ((UINTN)Address, *((UINT16 *)Uint8Buffer));
     } else if (OperationWidth == EfiCpuIoWidthUint32) {
+      if ((Address & 3) != 0) {^M
+          DEBUG((DEBUG_INFO, "%a: MmioWrite32 address 0x%lx Width %d!!!! not aligh\n", __FUNCTION__, Address, Width));^M
+      }^M
       MmioWrite32 ((UINTN)Address, *((UINT32 *)Uint8Buffer));
     } else if (OperationWidth == EfiCpuIoWidthUint64) {
+       if ((Address & 7) != 0) {^M
+               DEBUG((DEBUG_INFO, "%a: MmioWrite64 address 0x%lx Width %d!!!! not aligh\n", __FUNCTION__, Address, Width));^M
+       }^M
       Mmi
Any idea ?

Synchronous Exception at 0x000000007BD1D318^M
^[[0m^[[37m^[[40m^M
^M
Synchronous Exception at 0x000000007BD1D318^M
PC 0x00007BD1D318 (0x00007BD1B000+0x00002318) [ 0] ArmPciCpuIo2Dxe.dll^M
PC 0x00007BD1D164 (0x00007BD1B000+0x00002164) [ 0] ArmPciCpuIo2Dxe.dll^M
PC 0x00007BD1C868 (0x00007BD1B000+0x00001868) [ 0] ArmPciCpuIo2Dxe.dll^M
PC 0x00007BC7AECC (0x00007BC74000+0x00006ECC) [ 1] PciHostBridgeDxe.dll^M
PC 0x0000785C301C (0x0000785B4000+0x0000F01C) [ 2] PciBusDxe.dll^M
PC 0x00007859B6FC (0x00007859A000+0x000016FC) [ 3] Virtio10.dll^M
PC 0x00007859C0FC (0x00007859A000+0x000020FC) [ 3] Virtio10.dll^M
PC 0x00007BB76F34 (0x00007BB72000+0x00004F34) [ 4] VirtioScsiDxe.dll^M
PC 0x00007BB73F1C (0x00007BB72000+0x00001F1C) [ 4] VirtioScsiDxe.dll^M
PC 0x00007862DA38 (0x00007862B000+0x00002A38) [ 5] ScsiBus.dll^M
PC 0x000078620BB4 (0x000078614000+0x0000CBB4) [ 6] ScsiDisk.dll^M
PC 0x00007861AAC0 (0x000078614000+0x00006AC0) [ 6] ScsiDisk.dll^M
PC 0x000078619E34 (0x000078614000+0x00005E34) [ 6] ScsiDisk.dll^M
PC 0x0000786164D8 (0x000078614000+0x000024D8) [ 6] ScsiDisk.dll^M
PC 0x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 7] DiskIoDxe.dll^M
PC 0x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 7] DiskIoDxe.dll^M
PC 0x00007BBCD3DC (0x00007BBCB000+0x000023DC) [ 8] PartitionDxe.dll^M
PC 0x00007BBDF34C (0x00007BBDC000+0x0000334C) [ 9] DiskIoDxe.dll^M
PC 0x00007BBDFA74 (0x00007BBDC000+0x00003A74) [ 9] DiskIoDxe.dll^M
PC 0x00007BBB7878 (0x00007BBB4000+0x00003878) [ 10] Fat.dll^M
PC 0x00007BBB7628 (0x00007BBB4000+0x00003628) [ 10] Fat.dll^M
PC 0x00007BBB5BC0 (0x00007BBB4000+0x00001BC0) [ 10] Fat.dll^M
PC 0x00007F4C8F9C (0x00007F4BA000+0x0000EF9C) [ 11] DxeCore.dll^M
PC 0x00007F4C8368 (0x00007F4BA000+0x0000E368) [ 11] DxeCore.dll^M
PC 0x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M
PC 0x00007F4C86B8 (0x00007F4BA000+0x0000E6B8) [ 11] DxeCore.dll^M
PC 0x00007BC508BC (0x00007BC44000+0x0000C8BC) [ 12] BdsDxe.dll^M
PC 0x00007BC5092C (0x00007BC44000+0x0000C92C) [ 12] BdsDxe.dll^M
PC 0x00007BC5F3E8 (0x00007BC44000+0x0001B3E8) [ 12] BdsDxe.dll^M
PC 0x00007BC46EBC (0x00007BC44000+0x00002EBC) [ 12] BdsDxe.dll^M
PC 0x00007F4BC88C (0x00007F4BA000+0x0000288C) [ 13] DxeCore.dll^M
PC 0x00007F4BB8C0 (0x00007F4BA000+0x000018C0) [ 13] DxeCore.dll^M
PC 0x00007F4BB024 (0x00007F4BA000+0x00001024) [ 13] DxeCore.dll^M
^M
[ 0] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe/DEBUG/ArmPciCpuIo2Dxe.dll^M
[ 1] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe/DEBUG/PciHostBridgeDxe.dll^M
[ 2] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe/DEBUG/PciBusDxe.dll^M
[ 3] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/OvmfPkg/Virtio10Dxe/Virtio10/DEBUG/Virtio10.dll^M
[ 4] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/OvmfPkg/VirtioScsiDxe/VirtioScsi/DEBUG/VirtioScsiDxe.dll^M
[ 5] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe/DEBUG/ScsiBus.dll^M
[ 6] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe/DEBUG/ScsiDisk.dll^M
[ 7] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/DiskIoDxe.dll^M
[ 8] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe/DEBUG/PartitionDxe.dll^M
[ 9] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/DiskIoDxe.dll^M
[ 10] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/FatPkg/EnhancedFatDxe/Fat/DEBUG/Fat.dll^M
[ 11] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M
[ 12] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll^M
[ 13] /root/rpmbuild/BUILD/edk2-edk2-stable201905/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll^M
^M
  X0 0x0000008000100016   X1 0x0000000000000002   X2 0x0000008000100016   X3 0x0000000000000001^M
  X4 0x000000007F4B96E6   X5 0x000000007BD1C798   X6 0x000000007BD23008   X7 0x0000000000000000^M
  X8 0x000000007C01F508   X9 0x0000000400000000  X10 0x00000000792DF000  X11 0x000000007BA57FFF^M
X12 0x0000000000000000  X13 0x0000000000000008  X14 0x0000000000000000  X15 0x0000000000000000^M
X16 0x000000007F4B9E00  X17 0x0000000000000000  X18 0x0000000000000000  X19 0x00000000792F3C28^M
X20 0x0000000000000000  X21 0x0000000000000000  X22 0x0000000000000000  X23 0x0000000000000000^M
X24 0x0000000000000000  X25 0x0000000000000000  X26 0x0000000000000000  X27 0x0000000000000000^M
X28 0x0000000000000000   FP 0x000000007F4B9540   LR 0x000000007BD1D164  ^M
^M
  V0 0x0000000000000000 0000000000000000   V1 0x0000000000000000 0000000000000000^M
  V2 0x0000000000000000 0000000000000000   V3 0x0000000000000000 0000000000000000^M
  V4 0x0000000000000000 0000000000000000   V5 0x0000000000000000 0000000000000000^M
  V6 0x0000000000000000 0000000000000000   V7 0x0000000000000000 0000000000000000^M
  V8 0x0000000000000000 0000000000000000   V9 0x0000000000000000 0000000000000000^M
V10 0x0000000000000000 0000000000000000  V11 0x0000000000000000 0000000000000000^M
V12 0x0000000000000000 0000000000000000  V13 0x0000000000000000 0000000000000000^M
V14 0x0000000000000000 0000000000000000  V15 0x0000000000000000 0000000000000000^M
V16 0x0000000000000000 0000000000000000  V17 0x0000000000000000 0000000000000000^M
V18 0x0000000000000000 0000000000000000  V19 0x0000000000000000 0000000000000000^M
V20 0x0000000000000000 0000000000000000  V21 0x0000000000000000 0000000000000000^M
V22 0x0000000000000000 0000000000000000  V23 0x0000000000000000 0000000000000000^M
V24 0x0000000000000000 0000000000000000  V25 0x0000000000000000 0000000000000000^M
V26 0x0000000000000000 0000000000000000  V27 0x0000000000000000 0000000000000000^M
V28 0x0000000000000000 0000000000000000  V29 0x0000000000000000 0000000000000000^M
V30 0x0000000000000000 0000000000000000  V31 0x0000000000000000 0000000000000000^M
^M
  SP 0x000000007F4B9540  ELR 0x000000007BD1D318  SPSR 0x60000205  FPSR 0x00000000^M
ESR 0x96000021          FAR 0x0000008000100016^M
^M
ESR : EC 0x25  IL 0x1  ISS 0x00000021^M
^M
Data abort: Alignment fault^M

Thanks.

[-- Attachment #2: Type: text/html, Size: 25421 bytes --]

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

end of thread, other threads:[~2019-08-29 12:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22  7:40 Getting Synchronous Exception while run avocado-vt tests Zhanghailiang
2019-08-22  9:24 ` Ard Biesheuvel
2019-08-22 18:56   ` [edk2-devel] " Laszlo Ersek
2019-08-28  6:12     ` guoheyi
2019-08-29 12:11       ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox