Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
javierhonduco opened this issue May 30, 2023 · 4 comments

Comments

@javierhonduco
Copy link
Contributor

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 javierhonduco changed the title init process: forward signals init process: forward signals might be missing (+ empty output in .vmtest.log) May 30, 2023
@danobi
Copy link
Owner

danobi commented Jun 3, 2023

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).

@javierhonduco
Copy link
Contributor Author

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.

@chantra
Copy link
Collaborator

chantra commented Feb 26, 2024

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

@javierhonduco
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants