When I reverted back to glibc-2.3.3-54 (common, header, devel) the
> problem went away.
The most important change between -54 and -55 was the set
{res,re,e}[ug]id
fix.
These functions must affect the whole process, while previously they
impacted on the current thread only.
Can you see if your app is 1) threaded 2) calls one of these
functions?
(you can see it e.g. in LD_DEBUG=all dump).
Another change (related) was that in NPTL SIGRTMIN increased, so if
the application hardcodes signal 33 for something instead of using
SIGRTMIN,
the problem might be there.
The developer has code to work around broken threads in glibc and asked
me to compile with a commandline that treats bypasses the workaround.
This fails with:
!seteuid FAILED
Operation not permitted
Would that mean that threads are still broken or is it the code that is
not handling the threads properly? (Would you require a code snippet
for this as well?)
And I still get:
Got signal (24964608)
Signal has no handler (unexpected)
The number within the brackets changes upon each run, but is constant
during each run.
He asked my to post this code snippet that is the signal handling thread
to see if you could catch why unexpected signals are happening:
(Please excuse any poor formatting due to cut and paste operations. <g>)
As always, the code is available at
cvs.synchro.net
static void handle_sigs(void) {
int sig;
sigset_t sigs;
char str[1024];
thread_up(NULL,TRUE,TRUE);
if (is_daemon) {
/* Write the standard .pid file if running as a daemon
*/
/* Must be here so signals are sent to the correct
thread
*/
if(pidf!=NULL) {
fprintf(pidf,"%d",getpid());
fclose(pidf);
}
}
/* Set up blocked signals */
sigemptyset(&sigs);
sigaddset(&sigs,SIGINT);
sigaddset(&sigs,SIGQUIT);
sigaddset(&sigs,SIGABRT);
sigaddset(&sigs,SIGTERM);
sigaddset(&sigs,SIGHUP);
sigaddset(&sigs,SIGALRM);
/* sigaddset(&sigs,SIGPIPE); */
pthread_sigmask(SIG_BLOCK,&sigs,NULL);
while(1) {
sigwait(&sigs,&sig); /* wait here until signaled */
sprintf(str," Got signal (%d)",sig);
log_puts(LOG_NOTICE,str);
switch(sig) {
/* QUIT-type signals */
case SIGINT:
case SIGQUIT:
case SIGABRT:
case SIGTERM:
_sighandler_quit(sig);
break;
case SIGHUP: /* rerun */
_sighandler_rerun(sig);
default:
sprintf(str," Signal has no handler
(unexpected)"); log_puts
(LOG_NOTICE,str);
} }
}
This is the signal handling thread... it's the bit that's tossing of the
errors you're getting (post those too).
Thanks for your time Jakub, I imagine that you are busy :)
Rob.