zombie thread

Hi,

I've a client server system.

My client sends a message to server & starts a timer.

If the server does not respond with in the limit set by timer, timer goes off and the client shall throw an exception.

The problem is client seem to wirte the message to server socket, but it is not receiving response. Worst even, timer did n't go off. Client is indefinitely waiting.

When debugging with dbx, found that timer did go off but immediately timer thread became zombie.

Can any one tell me when can these become zombies?

One scenario is: when there is no recipient for the result from a non-detached thread. But my timer is awaited by main thread.

Especially, it operated normally for more than 24 hours..

My Client is developed in C++ & uses pthreads on Solaris.

Thanks for ur time.

[866 byte] By [cppquerya] at [2007-11-27 0:55:41]
# 1

> Timer did n't go off.

> Can any one tell me when can these become zombies?

> One scenario is: when there is no recipient for the

> result from a non-detached thread. But my timer is

> awaited by main thread.

Hello.

When the thread is a zombie the timer is off. "Zombie" means: The thread has terminated (i.e. timer has expired) but no other thread has checked the status of the timer thread, yet.

The actual question for me is:

What exactly should the timer thread do when the time is off?

What does the main thread do in the moment the timer expires?

Martin

Martin_Rosenaua at 2007-7-11 23:28:34 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2

Hi,

What exactly should the timer thread do when the time is off?When the timer goes off, does the following

timer thread locks xy_sema

sets few flags

sema_post on main_sema, to allow main thread to proceed.

returns

What does the main thread do in the moment the timer expires?triggers for timer thread cancellation

pthread_join on timer thread

unlock xy_sema (locked in timer, prior to updating flags)

checks the flags set by timer

throws exception.

Please let me know if you suspect some thing.

Thanks.

cppquerya at 2007-7-11 23:28:34 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...