Commit 030d256
committed
Fix race condition with daemonized jailer in startVMM
When using jailer with Daemonize: true, the jailer parent process exits
immediately after forking the child firecracker process. This caused a
race condition where the SDK's process monitoring goroutine would detect
the parent exit and send to errCh before waitForSocket() could establish
the socket connection, causing startVMM to fail prematurely.
This change modifies the process monitoring logic to treat a clean exit
(status=0) of a daemonized jailer parent as expected behavior rather than
an error condition. The goroutine now returns early in this case, allowing
waitForSocket() and other initialization logic to complete normally.
The actual firecracker child process continues running in daemon mode and
creates the API socket as expected.
Signed-off-by: Adam Thomason <[email protected]>1 parent 77c9459 commit 030d256
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
591 | 601 | | |
592 | 602 | | |
593 | 603 | | |
| |||
606 | 616 | | |
607 | 617 | | |
608 | 618 | | |
609 | | - | |
610 | 619 | | |
611 | 620 | | |
612 | 621 | | |
| |||
0 commit comments