summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/user-level-ppc/834
blob: 6db8fdd2d3fb1d4c9c425a1682ab6c5bcee69652 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
user-level: 0.931
graphic: 0.900
performance: 0.870
ppc: 0.824
kernel: 0.813
mistranslation: 0.726
device: 0.724
semantic: 0.717
x86: 0.692
architecture: 0.669
risc-v: 0.657
vnc: 0.642
peripherals: 0.623
network: 0.621
assembly: 0.619
socket: 0.613
hypervisor: 0.608
arm: 0.605
PID: 0.566
debug: 0.556
files: 0.540
permissions: 0.538
KVM: 0.525
i386: 0.465
boot: 0.459
VMM: 0.448
register: 0.432
TCG: 0.430
virtual: 0.280
--------------------
user-level: 0.868
kernel: 0.655
x86: 0.152
hypervisor: 0.142
debug: 0.073
virtual: 0.058
PID: 0.024
files: 0.019
TCG: 0.015
semantic: 0.010
register: 0.007
architecture: 0.004
performance: 0.003
device: 0.003
ppc: 0.002
i386: 0.002
network: 0.002
KVM: 0.002
peripherals: 0.002
socket: 0.001
boot: 0.001
VMM: 0.001
permissions: 0.001
graphic: 0.001
mistranslation: 0.000
assembly: 0.000
vnc: 0.000
risc-v: 0.000
arm: 0.000

linux-user: fails to deliver signals raised during pselect
Description of problem:
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/)
Steps to 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)
{
	puts("SIGNAL");
}

int main(int argc, char *argv[])
{
	struct sigaction sa;

	fd_set rfds;
	sigset_t emptyset, blockset;

	sigemptyset (&blockset);
	sigemptyset (&emptyset);
	sigaddset (&blockset, SIGUSR1);

	sa.sa_handler = handler;
	sigemptyset(&sa.sa_mask);
	sa.sa_flags = 0;
	sigaction(SIGUSR1, &sa, NULL);

	sigprocmask (SIG_BLOCK, &blockset, NULL);

	FD_ZERO(&rfds);

	while(1) {
		pselect(0, &rfds, NULL, NULL, NULL, &emptyset);
	}

	return 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.