init: exit clock_worker child process on failure#581
init: exit clock_worker child process on failure#581jakecorrenti merged 1 commit intocontainers:mainfrom
Conversation
If clock_worker() returns due to an error (socket creation, bind, or recv failure), the child process falls through into the rest of main(), forking again and duplicating the workload execution. Add _exit(1) after clock_worker() to prevent the child from continuing. Fixes: containers#580 Signed-off-by: Jakub Hrozek <jakub@stacklok.com>
a2b8952 to
f58dbc6
Compare
|
I've noticed this one myself when I enabled TIMESYNC in the homebrew builds and forgot to fix it 😅 Thanks for fixing it here. |
thanks for libkrun :-) since you mentioned yourself hitting the issue, do you know what could be the root cause behind not being able to bind? Not asking you to do more work of course, just wondering if there's something I'm missing. |
You probably have configured a network interface, which automatically disables the implicit vsock device. You just need to add a vsock device explicitly: |
If clock_worker() returns due to an error (socket creation, bind, or recv failure), the child process falls through into the rest of main(), forking again and duplicating the workload execution.
Add _exit(1) after clock_worker() to prevent the child from continuing.
Fixes: #580