blob: 86e3231a84d306657c0ce5bbb1b8b8a44ed7ddf0 [file] [log] [blame]
jsgf855d93d2003-10-13 22:26:55 +00001- works on stock 2.4 kernels, but the scheduler loop must poll
2- works on RH9 2.4.20-18.9 kernel, but doesn't seem quite as stable
3 as 2.5/2.6
4 for pending signals rather than relying on the kernel delivering them
5 to the right place.
6- most tested on 2.6.0-test1 and up
7
8- running job-control programs (ie, bash) under Valgrind won't work
9 properly without a kernel patch (as of 2.6.0-test2-mm2). This is because
10 threads in a thread group don't follow the thread group leader's changes
11 in process group ID, and they can't change it for themselves.
12
13- SA_NOCLDWAIT doesn't work properly if the program is actually blocked
14 in wait4() when SIGCHLD arrives; the wait4() will return details for
15 the exiting child. In other circumstances children should be quietly reaped.
16 [ This may be fixable when running under RH2.4 and 2.6, since we can
17 set NOCLDWAIT in the kernel's state without risk of losing our child
18 threads. ]
19
20- 2.4 has somewhat disfunctional thread/signal interactions, so many test
21 do not work as well under 2.4. In general, it should be no worse than
22 the old signal code. I don't intend spending a lot of time fixing this
23 because 2.6 is nearly ready for widespread use.
24
25TODO:
26
27- support application use of clone(). Interesting question is which
28 options do we support? Do we need to implement futex as well, or can
29 we just use the kernel's implementation?
30
31========================================
32Testing
33
34I've been testing with the Posix test suite:
35http://sourceforge.net/projects/posixtest/, version 1.2.0.
36
37----------------------------------------
38Expected failures:
39
40conformance/interfaces/sigwaitinfo/6-1.test
41 pthread_kill() calls the tkill syscall, which causes a code of
42 SI_TKILL rather than the SI_USER which this test expects.
43
44conformance/interfaces/sigrelse/3-*.test
45 glibc bug in sigrelse(), which fails without Valgrind too.
46
47conformance/interfaces/pthread_barrier_*/*
48 Valgrind's libpthreads doesn't implement pthread_barrier_*.
49 (There are some passes, but I don't know why.)
50
51conformance/interfaces/pthread_cond_timedwait/2-3
52 This test is just completely broken. It does expose a problem
53 in Valgrind's mutex implementation - it is too dependent on
54 the client code not doing stupid stuff. This test makes
55 Valgrind have an assertion failure.
56
57conformance/interfaces/pthread_condattr_getpshared/*
58 pthread_condattr_getpshared not implemented
59
60conformance/interfaces/pthread_condattr_setpshared/*
61 pthread_condattr_setpshared not implemented
62
63conformance/interfaces/pthread_key_create/speculative/5-1
64 Valgrind should cope with key overload
65
66conformance/interfaces/pthread_mutex_timedlock/*
67 not implemented
68
69conformance/interfaces/pthread_rwlock_rdlock/2-1:
70 relies on pthread_setschedparam
71
72conformance/interfaces/pthread_rwlock_timedrdlock/*
73 valgrind's libpthread.so: UNIMPLEMENTED FUNCTION: pthread_rwlock_timedrdlock
74
75conformance/interfaces/pthread_rwlockattr_getpshared/*
76 pthread_rwlockattr_getpshared not implemented
77
78conformance/interfaces/pthread_rwlockattr_setpshared/*
79 pthread_rwlockattr_setpshared not implemented
80
81conformance/interfaces/sched_rr_get_interval/*
82 syscall 161 (sched_rr_get_interval) not implemented
83
84conformance/interfaces/sigaction/21-1
85 Subtle problem: if app specifies SA_NOCLDWAIT on their SIGCHLD
86 signal handler, Valgrind will attempt to catch the SIGCHLD and
87 wait4() on all the children before returning to the app.
88 However, if the app was running a wait4() at the time the
89 SIGCHLD arrives, it will get the child's status. Quite what
90 the app is doing running wait4() when it explicitly asked for
91 it to be useless, I'm not sure...
92
93conformance/interfaces/sigaction/17-{3,6,8,12}
94 (2.4) These fail under 2.4 because they deal with SIGSEGV, SIGBUS
95 and SIGILL. These signals can only be delivered if there's a
96 thread immediately ready to handle them, but cannot be left
97 pending indefinitely. These tests hang forever because the
98 signal is discarded rather than delivered.
99
100conformance/interfaces/sigqueue/{1,4,8}-1
101 (2.4) Signals that we route manually do not have queued data
102 associated with them - they are routed with tkill. Also
103 pending signals are only kept in a mask, not in a queue, so
104 there can only be one at a time.
105
106----------------------------------------
107
108Still to investigate:
109
110conformance/interfaces/pthread_detach/4-1
111
112+conformance/interfaces/pthread_rwlock_rdlock/4-1: execution: FAILED: Output:
113+main: attempt write lock
114+main: acquired write lock
115+sig_thread: attemp read lock
116+main: fire SIGUSR1 to sig_thread
117+SIGUSR1 was not caught by sig_thread
118
119
120+conformance/interfaces/pthread_rwlock_unlock/4-1: execution: FAILED: Output:
121+Test FAILED: Incorrect error code, expected 0 or EINVAL, got 1
122
123+conformance/interfaces/pthread_rwlock_wrlock/2-1: execution: FAILED: Output:
124+main: attempt write lock
125+sig_thread: attempt write lock
126+main: fire SIGUSR1 to sig_thread
127+The signal handler did not get called.
128
129+conformance/interfaces/pthread_rwlock_wrlock/3-1: execution: FAILED: Output:
130+
131+sched status:
132+
133+Thread 1: status = WaitCV, associated_mx = 0x40115910, associated_cv = 0x401158E0
134+==11243== at 0x40102962: pthread_cond_wait (vg_libpthread.c:1093)
135+==11243== by 0x40104976: __pthread_rwlock_wrlock (vg_libpthread.c:2619)
136+==11243== by 0x8048588: main (3-1.c:53)
137+==11243== by 0x4013DA46: __libc_start_main (in /lib/libc-2.3.2.so)
138+
139+==11243== Warning: pthread scheduler exited due to deadlock
140+
141+valgrind: vg_main.c:1619 (vgPlain_main): Assertion `vgPlain_threads[vgPlain_last_run_tid].status == VgTs_Runnable' failed.
142+
143+sched status:
144+
145+Thread 1: status = WaitCV, associated_mx = 0x40115910, associated_cv = 0x401158E0
146+==11243== at 0x40102962: pthread_cond_wait (vg_libpthread.c:1093)
147+==11243== by 0x40104976: __pthread_rwlock_wrlock (vg_libpthread.c:2619)
148+==11243== by 0x8048588: main (3-1.c:53)
149+==11243== by 0x4013DA46: __libc_start_main (in /lib/libc-2.3.2.so)
150
151
152+conformance/interfaces/sem_close/1-1.test:
153/home/jeremy/bk/valgrind/syscalls/coregrind/.in_place/libpthread.so.0:
154version `GLIBC_2.1.1' not found (required by
155conformance/interfaces/sem_close/1-1.test)
156
157+conformance/interfaces/sem_timedwait/6-1: execution: FAILED: Output:
158+TEST FAILED
159+conformance/interfaces/sem_timedwait/6-2: execution: FAILED: Output:
160+TEST FAILED
161
162+conformance/interfaces/sem_timedwait/9-1: execution: FAILED: Output:
163+In handler
164+TEST FAILED: errno != EINTR
165
166
167conformance/interfaces/sigaction/10-1:
168 Used to work. Mysterious. Works everywhere except in the test harness...
169
170
171+conformance/interfaces/sigpause/1-2: execution: FAILED: Output:
172+
173+valgrind: vg_mylibc.c:1324 (vgPlain_read_millisecond_timer): Assertion `rdtsc_now > rdtsc_cal_end_raw' failed.
174+
175+sched status:
176+
177+Thread 1: status = Sleeping, associated_mx = 0x0, associated_cv = 0x0
178+==19929== at 0x401D6765: __GI___libc_nanosleep (in /lib/libc-2.3.2.so)
179+==19929== by 0x80485C1: main (1-2.c:65)
180+==19929== by 0x4013DA46: __libc_start_main (in /lib/libc-2.3.2.so)
181+==19929== by 0x8048494: ??? (start.S:81)
182+
183+Thread 2: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0
184+==19929== at 0x40150796: __libc_sigsuspend (in /lib/libc-2.3.2.so)
185+==19929== by 0x401509B3: __GI___sigpause (in /lib/libc-2.3.2.so)
186+==19929== by 0x804857C: a_thread_func (1-2.c:48)
187+==19929== by 0x40102099: thread_wrapper (vg_libpthread.c:667)
188
189
190
191----------------------------------------
192
193Fixes:
194conformance/interfaces/pthread_detach/4-2
195 This fails under NPTL, but passes under Valgrind