You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+58-7
Original file line number
Diff line number
Diff line change
@@ -7011,19 +7011,70 @@ TODO do even more awesome offline post-mortem analysis things, such as:
7011
7011
7012
7012
==== QEMU record and replay
7013
7013
7014
-
QEMU supports deterministic record and replay by saving external inputs, which would be awesome to understand the kernel, as you would be able to examine a single run as many times as you would like.
7014
+
QEMU runs are not deterministic by default, however it does support a record and replay mechanism that allows you to replay a previous run deterministically:
7015
7015
7016
-
This mechanism first requires a trace to be generated on an initial record run. The trace is then used on the replay runs to make them deterministic.
7016
+
This awesome feature allows you to examine a single run as many times as you would like until you understand everything:
7017
7017
7018
-
Unfortunately it is not working in the current QEMU: https://stackoverflow.com/questions/46970215/how-to-use-qemus-deterministic-record-and-replay-feature-for-a-linux-kernel-boo
7018
+
....
7019
+
# Record a run.
7020
+
./run -F '/rand_check.out;/poweroff.out;' -r
7021
+
# Replay the run.
7022
+
./run -F '/rand_check.out;/poweroff.out;' -R
7023
+
....
7024
+
7025
+
By comparing the terminal output of both runs, we can see that they are the exact same, including things which normally differ across runs:
7026
+
7027
+
* timestamps of dmesg output
7028
+
* <<rand_check-out>> output
7019
7029
7020
-
Patches were merged in post v2.12.0-rc2 but it crashed for me and I opened a minimized bug report: https://bugs.launchpad.net/qemu/+bug/1762179
7030
+
The record and replay feature was revived around QEMU v3.0.0. It existed earlier but it rot completely. As of v3.0.0 it is still flaky: sometimes we get deadlocks, and only a limited number of command line arguments are supported.
7021
7031
7022
-
We don't expose record and replay on our scripts yet since it was was not very stable, but we will do so when it stabilizes.
There is explicit network support on the QEMU patches, but either it is buggy or we are not using the correct magic options.
7060
+
7061
+
TODO `arm` and `aarch64` only seem to work with initrd since I cannot plug a working IDE disk device? See also: https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg05245.html
Alternatively, https://github.com/mozilla/rr[`mozilla/rr`] claims it is able to run QEMU: but using it would require you to step through QEMU code itself. Likely doable, but do you really want to?
7077
+
I had the same error previously on x86-64, but it was fixed: https://bugs.launchpad.net/qemu/+bug/1762179 so maybe the forgot to fix it for `aarch64`?
0 commit comments