Record/replay (icount rr) causes emulation hang or exit with error about missing events in log

Bug #1795369 reported by Artem Pisarenko
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

Test case description:

Guest image is Linux, which just powers off after kernel boots (instead of proceeding to user-space /init or /sbin/init).
Base cmdline:
  qemu-system-x86_64 \
    -nodefaults -nographic -machine pc,accel=tcg -m 2048 -cpu qemu64 \
    -kernel bzImage -initrd rootfs -append 'nokaslr console=ttyS0 rdinit=/init_poweroff' \
    -serial SERIAL_VALUE \
    -rtc clock=vm,base=2000-01-01T00:00:00 \
    -icount 1,sleep=off,rr=RR_VALUE,rrfile=icount_rr_capture.bin

Test 1.
When SERIAL_VALUE=none
Running with RR_VALUE=record completes successfully.
Running with RR_VALUE=replay doesn't completes. qemu process just eating ~100% cpu and memory usage doesn't grow after some moment. I don't see what happens because of problem no.2 (see below).

Test 2.
When SERIAL_VALUE=stdio
Running with RR_VALUE=record completes successfully.
Running with RR_VALUE=replay causes exit with error:
"qemu-system-x86_64: Missing character write event in the replay log"

Tests 3,4,5...
SERIAL_VALUE=stdio. Playing with "-rtc" clock and base suboptions, "-icount" sleep suboptions produces non-repeatable results.
In most cases running with RR_VALUE=record completes successfully (but may hang at very begining).
Running with RR_VALUE=replay with combinations of removing "-rtc base=..." and "-icount sleep=..." goes better, but at different places of boot process it may either hang (as in test 1) or exit with error (as in test 2).
When qemu "hangs", it may also happen differently: either it can be stopped by Ctrl-C, or have to be killed.

Guest image uploaded here: https://drive.google.com/open?id=1SHG4HyBdcPutc5Au4pyhN8z9w52et51A

QEMU built from master (commit 042938f46e1c477419d1931381fdadffaa49d45e) with:
<SRC_ROOT>/configure --prefix=<INSTALL_ROOT> --target-list=x86_64-softmmu --enable-debug --disable-pie --enable-tcg --disable-tcg-interpreter --enable-virtfs --disable-docs --disable-guest-agent --disable-modules --disable-gnutls --disable-nettle --disable-gcrypt --disable-sdl --disable-curses --disable-vnc --disable-vnc-sasl --disable-vnc-jpeg --disable-vnc-png --disable-cocoa --disable-xen --disable-xen-pci-passthrough --disable-brlapi --disable-curl --disable-fdt --disable-bluez --disable-kvm --disable-hax --disable-hvf --disable-whpx --disable-rdma --disable-vde --disable-netmap --disable-cap-ng --disable-spice --disable-rbd --disable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --disable-live-block-migration --disable-usb-redir --disable-glusterfs --disable-tpm --disable-libssh2 --disable-numa --disable-libxml2 --disable-opengl --disable-virglrenderer --disable-qom-cast-debug --disable-tools --disable-vxhs --disable-crypto-afalg --disable-capstone --disable-replication --disable-xfsctl --disable-seccomp --disable-pvrdma --disable-libpmem

Revision history for this message
Artem Pisarenko (artem.pisarenko) wrote :

Applying recent patches from http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg04038.html doesn't fix any of issues.

Revision history for this message
Thomas Huth (th-huth) wrote :

The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now.
If you still think this bug report here is valid, then please switch the state back to "New" within the next 60 days, otherwise this report will be marked as "Expired". Or mark it as "Fix Released" if the problem has been solved with a newer version of QEMU already. Thank you and sorry for the inconvenience.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.