From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c636cda4fa79bbaf X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-10-09 06:58:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: pthread_kill problem????? References: Organization: DEC ... um ... Digital Equipment ... um ... Compaq ... um ... HP? From: duane@alpha.zk3.dec.com (Andrew Duane USG) Message-ID: Date: Thu, 09 Oct 2003 13:58:57 GMT NNTP-Posting-Host: 16.140.128.4 X-Complaints-To: abuse@HP.com X-Trace: news.cpqcorp.net 1065707937 16.140.128.4 (Thu, 09 Oct 2003 06:58:57 PDT) NNTP-Posting-Date: Thu, 09 Oct 2003 06:58:57 PDT Xref: archiver1.google.com comp.unix.tru64:23 In article "Ron Harter" writes: >We are using pthread_kill(threadId, 0) to determine if a particular thread >id is valid. We are running into a situation where the thread id (thread >has been terminated and joined) >is 0 and the program is getting an abort and core dumping. > >According to the documentation we should get back an ESRCH error, the program >should not core dump. > >Has anyone else experinced problems in this area? WE are running Tru64 5.1b >The task in question has approximatly 2000 threads >and the kernal parameters are set to allow a max of 4096 threads. > >We have written a test driver that creates a dozen or so threads and checks >them using pthread_kill(threadId, 0) with no problem, even after the thread >exits and is joined so the threadId is 0. In this case a ESRCH is returned. I do not understand what is happening. Your application gets a core dump when threadId is 0, but a test harness doesn't? Is there something else in your application that would dump when given an errno of ESRCH? I have checked that pthread_kill does in fact return ESRCH when threadId is 0, so I do not think that is the problem. Where does a debugger say your application dumped? -- Andrew L. Duane (JOT-7) duane@zk3.dec.com HP/Compaq Corporation Andrew.Duane@compaq.com 110 Spit Brook Road Andrew.Duane@hp.com M/S ZKO3-3/U14 Nashua, NH 03062-2698 (603)-884-1294