vmtest icon indicating copy to clipboard operation
vmtest copied to clipboard

init process: forward signals might be missing (+ empty output in `.vmtest.log`)

Open javierhonduco opened this issue 2 years ago • 4 comments

Hi hi!

I was giving vmtest a try for a kernel bug I am trying to reproduce. The specifics aren't important but the approach I am trying to follow is to run some small bash script as well as the program that runs some BPF code that together trigger this kernel bug.

[javierhonduco@fedora ~]$ cat /home/javierhonduco/kernel_bug_repro.sh
echo "Running problematic exec in the background"
sh -c 'while true; do ls -al > /dev/null; done' & jobs
# ./code_that_triggers_the_bug
[javierhonduco@fedora ~]$ vmtest -k ./bzImage-v6.1-fedora38 "/home/javierhonduco/kernel_bug_repro.sh"
=> bzImage-v6.1-fedora38
===> Booting
===> Setting up VM
===> Running command
^C
[javierhonduco@fedora ~]$ cat .vmtest.log
[javierhonduco@fedora ~]$

Running this results in no output, and the second command (commented above) won't execute. I am not totally sure of what's going on, but perhaps it's due to signals not being forwarded to the right processes (SIGCHILD perhaps in this case?)

In the meantime I will spawn the reproducer directly in a thread in the process that loads the BPF code, but having this addressed in vmtest would be ideal if you think this would make sense.

Let me know what you think!

javierhonduco avatar May 30 '23 15:05 javierhonduco

Hi @javierhonduco ! Thanks for giving vmtest a try.

I'm not immediately sure what the issue is from the description, but will take a look as soon as I can (feeling a bit sick and also traveling).

danobi avatar Jun 03 '23 03:06 danobi

Oh, no! Hope you feel better soon!

Sorry if I wasn't very clear above. I was expecting kernel_bug_repro.sh to print "Running problematic exec in the background" both to stdout or stderr and to .vmtest.log and to eventually exit, but neither thing is happening.

javierhonduco avatar Jun 03 '23 11:06 javierhonduco

@javierhonduco would dropping in an interactive shell with #66 applied solve this issue?

chantra avatar Feb 26 '24 18:02 chantra

Ohh, let me try it in some days and tell you. Thanks for the ping!

javierhonduco avatar Feb 27 '24 12:02 javierhonduco