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

Go runtime Signal 23 (SIGURG) before child process is running causes preflight to silently exit #16

Open
dnwe opened this issue Jun 19, 2023 · 0 comments

Comments

@dnwe
Copy link

dnwe commented Jun 19, 2023

The Go runtime scheduling uses signal 23 (SIGURG) since Go 1.14 (see 24543-non-cooperative-preemption.md). Because the Go runtime does not know if the process expects external SIGURG signals, the signal is not filtered out from signal.Notify, but always reported to the process (see golang/go#37942 for discussion). Preflight should filter this signal out itself before forwarding and when the child process isn't up yet it should also not exit when it is received.

envoy-preflight/main.go

Lines 46 to 53 in eb1500e

signal.Notify(stop)
for sig := range stop {
if proc != nil {
proc.Signal(sig)
} else {
// Signal received before the process even started. Let's just exit.
os.Exit(1)
}

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

1 participant