Suspected problem in pthread_join()

Joel Sherrill joel.sherrill at
Fri Aug 10 14:30:49 UTC 2001

Cleaning up my mailbox .. I saw this and no reply.
Was this ever resolved/confirmed?

Tom Armistead wrote:
> Hi,
>     I've been running the (ss20010424) RTEMS tests on a MCPN750
> (PowerPC) and have found what may be bad behaviour of pthread_join()
> when running psx08.exe.   The output from this test follows.  The
> failure was that a pthread_join() to Task1 was expected to succeed but
> instead failed with error ESRCH.
>     Some experimenting showed that Task1 had had run and exited by the
> time the pthread_join() was invoked.  In this case pthread_join()
> failed.  If I add additional computations to Task1 so that it is still
> running when pthread_join() is invoked, the test succeeds.  So, it looks
> like pthread_join() does not work if the thread of interest has already
> exited.
>      Can anyone confirm this?
> Thanks
> Tom Armistead
> Motorola Computer Group
> *** POSIX TEST 8 ***
> Init's ID is 0x0c010001
> Init: pthread_detach - ESRCH (invalid id)
> Init: pthread_detach self
> Task_1: exitting
> Init: pthread_join - ESRCH (invalid id)
> Init: pthread_join - SUCCESSFUL
> Init: returned from pthread_join through return
> status = 3
> assert failed:
> ../../../../../../../rtems-ss-20010424/c/src/tests/psxtests/psx08/init.c:
> 59:!status
> EXECUTIVE SHUTDOWN! Any key to reboot...

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list