Closed Bug 226763 Opened 22 years ago Closed 22 years ago

nameshm1 test hangs

Categories

(NSPR :: NSPR, defect)

4.4.1
HP
HP-UX
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 200162

People

(Reporter: wtc, Assigned: wtc)

Details

This is NSPR 4.4.1, 32-bit HP-UX 11.00 debug build. The nameshm1 test hangs. The thread stacks are: (gdb) info threads * 2 system thread 14356 0xc01f4708 in __ksleep () from /usr/lib/libc.2 1 system thread 5368 warning: reading register r3: No data 0xc00f2628 in __ksem_wait () from /usr/lib/librt.2 warning: reading register r3: No data (gdb) thread 1 warning: reading register r3: No data [Switching to thread 1 (system thread 5368)] #0 0xc00f2628 in __ksem_wait () from /usr/lib/librt.2 (gdb) where #0 0xc00f2628 in __ksem_wait () from /usr/lib/librt.2 #1 0xc00f18bc in sem_wait () from /usr/lib/librt.2 #2 0xc0f56888 in PR_WaitSemaphore (sem=0x400071b8) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730 #3 0x4a88 in ClientServerTest () at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:462 #4 0x562c in main (argc=1, argv=0x7f7f02b4) at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:589 (gdb) thread 2 warning: reading register r3: No data [Switching to thread 2 (system thread 14356)] #0 0xc01f4708 in __ksleep () from /usr/lib/libc.2 (gdb) where #0 0xc01f4708 in __ksleep () from /usr/lib/libc.2 #1 0xc0318448 in _lwp_cond_timedwait () from /usr/lib/libpthread.1 #2 0xc0318184 in pthread_cond_wait () from /usr/lib/libpthread.1 #3 0xc0f54dc4 in PR_WaitCondVar (cvar=0x40007300, timeout=4294967295) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:389 #4 0xc0f6d048 in WaitPidDaemonThread (unused=0x0) at ../../../../../mozilla/nsprpub/pr/src/md/unix/uxproces.c:678 #5 0xc0f63ecc in _pt_root (arg=0x400073b0 "") at ../../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:214 #6 0xc0319f60 in __pthread_create_system () from /usr/lib/libpthread.1 (gdb)
More debug info: (gdb) thread 1 warning: reading register r3: No data [Switching to thread 1 (system thread 5368)] #0 0xc00f2628 in __ksem_wait () from /usr/lib/librt.2 (gdb) up #1 0xc00f18bc in sem_wait () from /usr/lib/librt.2 (gdb) up #2 0xc0f56888 in PR_WaitSemaphore (sem=0x400071b8) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730 ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730: No such file or direc tory. (gdb) up #3 0x4a88 in ClientServerTest () at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:462 462 rc = PR_WaitSemaphore( sem1 ); (gdb) print i $1 = 0 (gdb) print optPing $2 = 1000 (gdb) print addr $3 = (unsigned int *) 0xc00fb000 (gdb) print *addr $4 = 1 (gdb) print sem1 $5 = (struct PRSem *) 0x400071b8 (gdb) print *sem1 $6 = {sem = 0x400071d0} (gdb) down #2 0xc0f56888 in PR_WaitSemaphore (sem=0x400071b8) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730 ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730: No such file or direc tory. (gdb) print sem $7 = (struct PRSem *) 0x400071b8 (gdb) print *sem $8 = {sem = 0x400071d0} (gdb) print sem->sem $9 = (struct _posix_sem *) 0x400071d0 (gdb) up #3 0x4a88 in ClientServerTest () at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:462 462 rc = PR_WaitSemaphore( sem1 ); (gdb) up #4 0x562c in main (argc=1, argv=0x7f7f02b4) at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:589 589 ClientServerTest(); (gdb) print failed_already $10 = 0 (gdb) print optClient $11 = 0 (gdb) thread 2 warning: reading register r3: No data [Switching to thread 2 (system thread 14356)] #0 0xc01f4708 in __ksleep () from /usr/lib/libc.2 (gdb) up #1 0xc0318448 in _lwp_cond_timedwait () from /usr/lib/libpthread.1 (gdb) up #2 0xc0318184 in pthread_cond_wait () from /usr/lib/libpthread.1 (gdb) up #3 0xc0f54dc4 in PR_WaitCondVar (cvar=0x40007300, timeout=4294967295) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:389 ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:389: No such file or direc tory. (gdb) up #4 0xc0f6d048 in WaitPidDaemonThread (unused=0x0) at ../../../../../mozilla/nsprpub/pr/src/md/unix/uxproces.c:678 ../../../../../mozilla/nsprpub/pr/src/md/unix/uxproces.c:678: No such file or di rectory. (gdb) print pr_wp $12 = {once = {initialized = 1, inProgress = 1, status = PR_SUCCESS}, thread = 0x400073b0, ml = 0x40007258, numProcs = 0, cv = 0x40007300, pidTable = 0x400075e8} (gdb)
And this is the only 'nameshm1' process running when the test hangs. It seems that the 'nameshm1' client process was created successfully but is gone already: (gdb) thread 1 warning: reading register r3: No data [Switching to thread 1 (system thread 5368)] #0 0xc00f2628 in __ksem_wait () from /usr/lib/librt.2 (gdb) up #1 0xc00f18bc in sem_wait () from /usr/lib/librt.2 (gdb) up #2 0xc0f56888 in PR_WaitSemaphore (sem=0x400071b8) at ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730 ../../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:730: No such file or direc tory. (gdb) up #3 0x4a88 in ClientServerTest () at ../../../mozilla/nsprpub/pr/tests/nameshm1.c:462 462 rc = PR_WaitSemaphore( sem1 ); (gdb) print proc $13 = (struct PRProcess *) 0x40007350 (gdb) Note the non-NULL 'proc' in the 'nameshm1' server process.
Status: NEW → ASSIGNED
I think maybe the HP-UX 11.00 machine I'm using (sbshp1) is missing some kernel patches, so interprocess semaphores don't work.
HP tracked this down. This is caused by a bug in sem_open. It also causes the semaping and semaerr tests to fail. *** This bug has been marked as a duplicate of 200162 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Target Milestone: --- → 4.5
You need to log in before you can comment on or make changes to this bug.