This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

thread/exit problems with glibc 2.2.5



Hi,

I have appended a short test program, which fails with glibc 2.2.5,
but works fine with all prior versions.

The program defines one thread as signal handler. With glibc 2.2.4
and prior, I could send this thread a TERM signal and the whole
process exits:

Hilbert:/suse/kukuk # ./thread_test 
Pid of sig_handler=2625
Signal (15) for quitting program arrived.

But with glibc 2.2.5, the signal handler thread exits without
printing the message. Another thread is in zombie state and the
main thread still continues to run:

kukuk@allen:~> ./thread_test 
Pid of sig_handler=4769

kukuk@allen:~> ps ax|grep thread_test
 4766 pts/1    S      0:00 ./thread_test
 4768 pts/1    S      0:00 ./thread_test
 4769 pts/1    S      0:00 ./thread_test
kukuk@allen:~> kill -TERM 4769
kukuk@allen:~> ps ax|grep thread_test
 4766 pts/1    S      0:00 ./thread_test
 4768 pts/1    Z      0:00 [thread_test <defunct>]
 6125 pts/2    S      0:00 grep thread_test

Any ideas what goes wrong now? Why does I not get the printf, and
why does the exit(0) does not exit the program?

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrenstr. 15-19       D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Attachment: thread_test.c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]