Skip to content

runtime: A QEMU signaling fix causes Go binaries to fail on startup. #33746

Closed
@joshkunz

Description

@joshkunz

tl;dr: In anticipation of a future QEMU work-around, Go should hide runtime rt_sigaction failures for SIGRTMAX - 1, like it already does for SIGRTMAX.

QEMU user mode emulation has a bug where it will not correctly deliver the SIGRTMIN + 1 signal. This is because SIGRTMIN + 1 is a glibc reserved signal, and it is caught in the emulator's glibc. To get around this issue there is a patch to map SIGRTMIN + 1 to SIGRTMAX - 1, a signal that is typically unused. QEMU already has a similar work-around, mapping SIGRTMIN to SIGRTMAX which is also a signal reserved by glibc.

On startup, the Go attempts to register signal handlers for all signals, but it silently hides failures for SIGRTMIN, SIGRTMIN + 1 (the glibc reserved signals), and SIGRTMAX (the QEMU mapped signal for SIGRTMIN). If the QEMU patch is submitted, go programs running under QEMU will fail to run, due to panics when trying to register a handler for SIGRTMAX - 1.

If Go decides to preemptively fix this issue, the patch is simple: just ignore failures for signal 63 in addition to 64. I will follow up this issue with a patch shortly.

Metadata

Metadata

Labels

FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions