46d Subj : Re: Application hangs in pthread_join To : comp.programming.threads From : Jeff Date : Fri Mar 18 2005 11:32 am David Schwartz wrote: > "Jeff" wrote in message > news:1111161182.257518.98480@o13g2000cwo.googlegroups.com... > > >I have a multi-threaded application that occasionally hangs as it waits > > in pthread_join. This is a HTTP load tester (siege) and it tends to > > happen on GNU/Linux when the thread count exceeds 500. I suspect a > > thread gets hosed in a socket read and the main thread can't join it. > > The question is, what is the thread it's waiting for doing? And why do > you need so many threads? It's an http regression tester. In this case, it's simulating 500 web browsers. I'm having trouble debugging the waiting threads. It's either waiting for the webserver or I didn't properly handle an error. > > x = our.total_clients; > > while(x){ > > pthread_join(peer[x--], &statusp); <= hangs here! > > } > > The question is, what is the other thread doing? You mean the main thread? It's waiting for pthread_join. Jeff . 0