Re: LPT versus nptl
Daniel Jacobowitz <[email protected]>
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Apr 07, 2003 at 01:52:06PM -0500, Steven Munroe wrote: > More problems with running LTP against nptl (PCC64). When we try to run > LPT most kernel tests fail with the message: > > WARN : signal() failed for signal 32. error: 22 Invalid argument. ~> WARN : signal() failed for signal 33. error: 22 Invalid argument. > > The root cause is that ltp/lib/tst_sig.c(tst_sig) sets up a signal > handler for each signal, except for specific signals where that is not > allowed. The problem is that which signals are "reserved" and how this > is enforced at runtime differs for linuxthreads and nptl. > > For linuxthreads LTP tries to use the following: > > /* > * pthread-private signals SIGPTINTR and SIGPTRESCHED. > * Setting a handler for these signals is disallowed when > * the binary is linked against libpthread. > */ > #ifdef SIGPTINTR > case SIGPTINTR: > #endif /* SIGPTINTR */ > #ifdef SIGPTRESCHED > case SIGPTRESCHED: > #endif /* SIGPTRESCHED */ > > break; > > The first problem being that niether SIGPTINTR or SIGPTRESCHED is > defined, anywhere. However LPT does not fail for linuxthreads since it > does not enforce any restriction on int __pthread_sig_restart, > __pthread_sig_cancel, and __pthread_sig_debug unless the application is > actually threaded? (pthread__sigaction is envoked dynamically via > libc_maybe_call2, I think?) I generally dodge this problem by skipping __SIGRTMIN <= sig < SIGRTMIN. Currently NPTL will use signals at the bottom of the range. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer