summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/834.toml
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
commit4b927bc37359dec23f67d3427fc982945f24f404 (patch)
tree245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_missing/host_missing/accel_missing/834.toml
parentaa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff)
downloademulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz
emulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.zip
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_missing/host_missing/accel_missing/834.toml')
-rw-r--r--gitlab/issues/target_missing/host_missing/accel_missing/834.toml69
1 files changed, 69 insertions, 0 deletions
diff --git a/gitlab/issues/target_missing/host_missing/accel_missing/834.toml b/gitlab/issues/target_missing/host_missing/accel_missing/834.toml
new file mode 100644
index 00000000..0a0b0b35
--- /dev/null
+++ b/gitlab/issues/target_missing/host_missing/accel_missing/834.toml
@@ -0,0 +1,69 @@
+id = 834
+title = "linux-user: fails to deliver signals raised during pselect"
+state = "closed"
+created_at = "2022-01-23T01:02:55.512Z"
+closed_at = "2022-03-24T20:08:18.931Z"
+labels = ["Closed::Fixed", "kind::Bug", "linux-user"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/834"
+host-os = "NixOS"
+host-arch = "x86_64"
+qemu-version = "qemu-x86_64 version 6.2.50 (v6.2.0-1117-gaeb0ae95b7)"
+guest-os = "n/a"
+guest-arch = "n/a"
+description = """When run via qemu a program which blocks signals but unmasks them during `pselect` does not catch these signals when returning from `pselect`.
+
+Used as reference on expected behavior: [The new pselect() system call](https://lwn.net/Articles/176911/)"""
+reproduce = """A minimal test case below mimics behavior as encountered in the test suite of `p11-kit` ([link](https://github.com/p11-glue/p11-kit)) (which attempts to catch `SIGTERM` in a similar way and results in lingering processes after running the test suite).
+
+```C
+#include <stdio.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/select.h>
+
+static void handler(int sig)
+{
+\tputs("SIGNAL");
+}
+
+int main(int argc, char *argv[])
+{
+\tstruct sigaction sa;
+
+\tfd_set rfds;
+\tsigset_t emptyset, blockset;
+
+\tsigemptyset (&blockset);
+\tsigemptyset (&emptyset);
+\tsigaddset (&blockset, SIGUSR1);
+
+\tsa.sa_handler = handler;
+\tsigemptyset(&sa.sa_mask);
+\tsa.sa_flags = 0;
+\tsigaction(SIGUSR1, &sa, NULL);
+
+\tsigprocmask (SIG_BLOCK, &blockset, NULL);
+
+\tFD_ZERO(&rfds);
+
+\twhile(1) {
+\t\tpselect(0, &rfds, NULL, NULL, NULL, &emptyset);
+\t}
+
+\treturn 0;
+}
+```
+
+Running this without qemu should print _SIGNAL_ when sent `SIGUSR1`:
+
+```
+$ ./a.out &
+[1] 1683587
+$ kill -USR1 %1
+$ SIGNAL
+```
+
+When run with `qemu-x86_64` however, it does not (also qemu's `-strace` confirms the signal isn't received whereas a strace of qemu shows it's in fact delivered).
+
+The pselect call itself _is_ interrupted, but the signal goes missing."""
+additional = "n/a"