Suspected problem in pthread_join()

Tom Armistead tarmiste at phx.mcd.mot.com
Fri May 11 20:43:24 UTC 2001


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...



More information about the users mailing list