Server Multi-Thread in C++ (Problem)

Server Multi-Thread in C++ (Problem)

Post by Vincenzo D'Amor » Fri, 16 Jul 1999 04:00:00



Hello All,

I have a real problem with a server multi-thread that I wrote and that
under particular condition (big stress) crash. It is the first time in
linux multi-threading programming and I am using LinuxThread. I feel
that LinuxThread Library do not work under stress. When my server
arrives at a max thread number it crash. I tryed to debug with xxgdb but
I am not sure how thread crash my server and BTW all the threads are
always in system calls when it crash.

If somebody can help me, I will be always ...
Thanks in advance and I apologize for my english.

Ciao Vincenzo

 
 
 

Server Multi-Thread in C++ (Problem)

Post by Holy Co » Fri, 16 Jul 1999 04:00:00



> Hello All,

> I have a real problem with a server multi-thread that I wrote and that
> under particular condition (big stress) crash. It is the first time in
> linux multi-threading programming and I am using LinuxThread. I feel
> that LinuxThread Library do not work under stress. When my server
> arrives at a max thread number it crash. I tryed to debug with xxgdb but
> I am not sure how thread crash my server and BTW all the threads are
> always in system calls when it crash.

> If somebody can help me, I will be always ...
> Thanks in advance and I apologize for my english.

> Ciao Vincenzo

Try to limit the number of threads, then see what happens.
--
len
if you must email, reply to:


 
 
 

Server Multi-Thread in C++ (Problem)

Post by Kaz Kylhe » Sat, 17 Jul 1999 04:00:00




Quote:>Hello All,

>I have a real problem with a server multi-thread that I wrote and that
>under particular condition (big stress) crash. It is the first time in
>linux multi-threading programming and I am using LinuxThread. I feel
>that LinuxThread Library do not work under stress. When my server
>arrives at a max thread number it crash. I tryed to debug with xxgdb but
>I am not sure how thread crash my server and BTW all the threads are
>always in system calls when it crash.

If you create the maximum number of threads and then try to create
more, you trigger a bug in the pthreads library. I recently submitted
a patch for this (against glibc 2.1.1).  There is a mistake in the
code that handles a failed clone() system call.

The symptom of the bug is that the threads hang in calls to the
threads library because the thread manager has died.

You could be running against this bug. Then again, who knows?
Without seeing the source code of your server, one can only guess.