Port-hppa archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Flaky pthread locks on HP 9000/360



I've successfully installed NetBSD-current on an HP 360 (which BTW
represents remarkable progress since I last tried it about three years ago
--- back then, I couldn't get past kernel panics during the device scan).
The bad news is that userland is a bit flaky: various programs such as
tar, perl, makemandb occasionally dump core.  I discovered that all of
these dumps seem to trace to exactly the same place in libpthread.
For example, here's a backtrace from tar:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xae409af4 in pthread__rwlock_spin (owner=<optimized out>)
    at /usr/src/lib/libpthread/pthread_rwlock.c:148
148     /usr/src/lib/libpthread/pthread_rwlock.c: No such file or directory.
(gdb) bt
#0  0xae409af4 in pthread__rwlock_spin (owner=<optimized out>)
    at /usr/src/lib/libpthread/pthread_rwlock.c:148
#1  0xae409fdc in pthread__rwlock_wrlock (ptr=0xade24afc <__lcl_lock>, ts=0x0)
    at /usr/src/lib/libpthread/pthread_rwlock.c:317
#2  0xadcd40a8 in strftime (s=0xb0001c08 "319492", maxsize=100, 
    format=0x1c7d0 "%b %e %H:%M", t=0xade4b0f8)
    at /usr/src/lib/libc/time/strftime.c:742
#3  0x00016cdc in list_item_verbose ()
#4  0x00014b08 in read_archive ()
#5  0x00015270 in tar_mode_t ()
#6  0x0001abb4 in main ()
(gdb) i locals
thread = 0xfc04fc00
i = <optimized out>
(gdb) p *thread
Cannot access memory at address 0xfc04fc00

The first two stack addresses are the same in every dump I've looked at.
After poking around in the source code I have a couple of theories:

(1) there's some presumably-platform-specific bug in libpthread.

(2) there's something, perhaps platform-specific, wrong in the "RAS"
mechanism that is used to provide atomic_cas when the hardware has
no such instruction.

I don't have a good idea how to make progress in finding the problem,
and am wondering if anyone has advice.  Or indeed if anyone else sees
it at all.

			regards, tom lane


Home | Main Index | Thread Index | Old Index