summary refs log tree commit diff stats
path: root/results/classifier/deepseek-r1:14b/output/hypervisor/1274
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
commitdee4dcba78baf712cab403d47d9db319ab7f95d6 (patch)
tree418478faf06786701a56268672f73d6b0b4eb239 /results/classifier/deepseek-r1:14b/output/hypervisor/1274
parent4d9e26c0333abd39bdbd039dcdb30ed429c475ba (diff)
downloademulator-bug-study-dee4dcba78baf712cab403d47d9db319ab7f95d6.tar.gz
emulator-bug-study-dee4dcba78baf712cab403d47d9db319ab7f95d6.zip
restructure results
Diffstat (limited to 'results/classifier/deepseek-r1:14b/output/hypervisor/1274')
-rw-r--r--results/classifier/deepseek-r1:14b/output/hypervisor/127433
1 files changed, 33 insertions, 0 deletions
diff --git a/results/classifier/deepseek-r1:14b/output/hypervisor/1274 b/results/classifier/deepseek-r1:14b/output/hypervisor/1274
new file mode 100644
index 00000000..0b7785ca
--- /dev/null
+++ b/results/classifier/deepseek-r1:14b/output/hypervisor/1274
@@ -0,0 +1,33 @@
+
+Cannot debug init using "qemu -s -S" if init is compiled dynamically or if kvm is enabled
+Description of problem:
+I'm trying to connect from host to init process running in guest. I'm using this guide: https://qemu-project.gitlab.io/qemu/system/gdb.html . Everything works well, but there is two problems:
+1. Debugging stops to work if I add "-enable-kvm"
+2. Debugging stops to work if I remove "-static" when compiling init
+Steps to reproduce:
+I have absolutely fresh Debian sid system (as of 2022-10-22). I create the following file on it:
+```c
+#include <stdio.h>
+
+int
+main ()
+{
+  printf ("a\n");
+  printf ("b\n");
+  for (;;);
+}
+```
+
+Then I compile it so: `gcc -static -g a.c`. Result is saved as `/root/a.out`. Then I run `sync; echo 3 > /proc/sys/vm/drop_caches; sync` to make sure this `/root/a.out` actually got to disk.
+
+Then I start the host system inside of qemu using well-known `-snapshot /dev/sda` trick. Exact command is here:
+
+```bash
+qemu-system-x86_64 -daemonize -m 300M -s -S -kernel /vmlinuz -initrd /initrd.img -snapshot -append "root=/dev/sda init=/root/a.out" -drive file=/dev/sda,format=raw
+```
+
+(As you guessed, my disk has no partitions, it directly stores ext4 filesystem.)
+
+Then I type on host `gdb ./a.out`. And then inside of gdb I type `target remote localhost:1234`, then `br 7` (line 7 is `printf ("b\n")`, then `c`. Then guest OS boots and reaches init (i. e. `/root/a.out`). And then gdb actually pauses on line 7. I. e. everything works!
+
+But if I add `-enable-kvm` to qemu command line OR remove `-static` from gcc command line, then breakpoint doesn't work, i. e. gdb doesn't pause on breakpoint, the execution continues and the execution fails to infinite loop.