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

[qemu/vm-node] QEMU does not terminate when parent vm-node terminates #9

Open
moralismercatus opened this issue Dec 1, 2016 · 0 comments

Comments

@moralismercatus
Copy link
Collaborator

moralismercatus commented Dec 1, 2016

Note: distributed mode specific.

When vm-node terminates for whatever reason (testing is done, ctrl+c, crash) its QEMU children go on living as daemons. In general, this behavior is undesirable, as future tests on the images corresponding to these daemons can cause image corruption.

For development purposes, such behavior may be desirable e.g., to observe output from crete-run; however, development mode should be of use in that case.

I don't believe an adequate solution is to rely on vm-node to kill its QEMU children. Only when vm-node exits gracefully do the proper destructors get called which can do the infanticide.

Potential solution:

A Linux specific solution is to call prctl(PR_SET_PDEATHSIG, SIGHUP); from within QEMU. The kernel will then notify QEMU when its parent has died.

@likebreath likebreath changed the title QEMU does not terminate when parent vm-node terminates [qemu/vm-node] QEMU does not terminate when parent vm-node terminates Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants