runtime: signal handling panics for signals generated by sigqueue/tgkill #26625
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?go version devel +30d7e6449f Mon Jul 23 15:16:01 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes (Go 1.10). This is reproducible at least to 1.6 and much earlier.
What operating system and processor architecture are you using (
go env
)?linux/amd64
This will apply to all Linux platforms and some BSD platforms (though not Darwin since
kill
is the only way to send a signal on Darwin).What did you do?
What did you expect to see?
Since these aren't "real" SIGSEGV, I expect the runtime to ignore them (or deliver them to a signal channel if one is registered):
What did you see instead?
runtime.sighandler
explicitly checks for sigcodeSI_USER
in several places to distinguish kernel-generated signals from signals send by the user, but sigcode is onlySI_USER
for signals sent specifically bykill
. If the signal was sent bysigqueue
ortkill
/tgkill
(on Linux), sigcode isSI_QUEUE
orSI_TKILL
, respectively./cc @ianlancetaylor @bcmills because I know how much they love signals.
The text was updated successfully, but these errors were encountered: