[uClibc] Pthreads remain zombie

"Dörr, Dirk" Dirk.Doerr at 3SOFT.de
Mon Oct 13 08:38:31 UTC 2003


Hi!

I am currently working on an application that uses uclibc on a ucLinux 2.4 for a Coldfire µC.

In my application I want to dynamically create and destroy threads.

Creation works fine but a pthread_cancel shows no reaction. Then I tried to destroy the threads by themself using pthread_exit. Now the threads stop working but I can still see them in the process list as zombies. 

So before I call Pthread_create I see on instance of my applicaton. After pthread_create there are 3: My application, the thread_manager (result of a clone() call in pthread.c)  and my thread. All of them have the state R or S. After calling pthread_exit there are still 3 instances but one with the state Z. After a while I will have an "army of undeads" but no exorcist ;-) So I will run out of memory very soon.

Does anyone have an idee how I can release the resources still claimed by the zombies?


Host-PC: SuSE 8.2
Target-Board: Motorola MCF5272C3 Coldfire Eval-Board
Target-OS: ucLinux Kernel 2.4 Distribution: uClinux-dist-20030522.tar.gz from uclinux.org
Tool-Suite: m68k-elf-tools-20030314.sh

Thanks 

-- 

Dipl.-Inf. (FH) Dirk Dörr, Medizintechnik 
3SOFT GmbH, Frauenweiherstr. 14, D-91058 Erlangen, Germany 
Standort: Hindenburgstraße 27 - 29, D-71106 Magstadt, Germany
Tel. +49-7159-4041-0 mailto:Dirk.Doerr at 3SOFT.de 
Fax +49-9131-7701-334 http://www.3SOFT.de 




More information about the uClibc mailing list