Subject: Re: SS10 unstable under high load (SMP)
To: matthew green <mrg@eterna.com.au>
From: Atte =?iso-8859-1?Q?Peltom=E4ki?= <atte.peltomaki@iki.fi>
List: port-sparc
Date: 07/19/2007 11:17:49
On Fri, Jul 13, 2007 at 09:00:03AM +1000, matthew green wrote:
>    On Tue, Jul 10, 2007 at 09:42:41AM +0300, Atte Peltomäki wrote:
>    > I have two SPARCstations; SS5 and SS10. Both are running NetBSD 3 with
>    > jdc@'s raidframe patches(1*). The SS5 is UP, and stable. The SS10
>    > however, is very unstable under high load, subject to hang and/or panic
>    [...] 
>    > However, after compiling a UP kernel things seem to work just fine. I'm
>    > typing this on the problematic box with UP kernel, network constantly
>    > blowing ~220kB/sec down and CPU constantly between 60 and 100 percentage
>    > use. Apart from a little sluggishness involvend with using mutt and vim
>    > with syntax highlighting, the box seems to work fine. 
>    
>    Updated information: 
>    
>    Since the writing of this, I have managed to reproduce the bug on both
>    SS5, and SS10 using UP kernel. All it seems to take is to fire up enough
>    python bittorrent clients, which cause both CPU and the Lance to get
>    plenty of load. 
>    
>    I'm now compiling kernel with 'options LOCKDEBUG', and I believe this is
>    related to the more serious stability problems people are experiencing
>    with L2-cacheless MP-setups, and the one newlock2 related 4.0_BETA PR. 
>    
>    Btw. forcing a crashdump on the SS5 simply says "Bad dump device" while
>    on the SS10 it crashes (see screenshots from prev. post). I'm positive
>    the dump device is configured correctly. 
> 
> 
> interesting;  can you try compiling python with GNU pth instead of
> native pthreads?  they are a known problem on 4.0/sparc...

Tried, and failed miserably. After having hubertf read
pthread.buildlink3.mk for me enough to locate the undocumented
PREFER_NATIVE_PTHREADS environment variable and setting it to "no" in
python24 Makefile, I get this:

---clip---
===> Building for python24-2.4.4
cc -pthread -c -fno-strict-aliasing -DNDEBUG -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include -I/usr/include -I. -I./Include -fPIC -DPy_BUILD_CORE -o Pyt
hon/thread.o Python/thread.c
In file included from Python/thread_pthread.h:9,
                 from Python/thread.c:115:
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:285: error: conflicting types for `pthread_t'
/usr/include/pthread_types.h:71: error: previous declaration of `pthread_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:286: error: conflicting types for `pthread_attr_t'
/usr/include/pthread_types.h:72: error: previous declaration of `pthread_attr_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:287: warning: redefinition of `pthread_key_t'
/usr/include/pthread_types.h:83: warning: `pthread_key_t' previously declared here
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:288: error: conflicting types for `pthread_once_t'
/usr/include/pthread_types.h:77: error: previous declaration of `pthread_once_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:289: error: conflicting types for `pthread_mutexattr_t'
/usr/include/pthread_types.h:74: error: previous declaration of `pthread_mutexattr_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:290: error: conflicting types for `pthread_mutex_t'
/usr/include/pthread_types.h:73: error: previous declaration of `pthread_mutex_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:291: error: conflicting types for `pthread_condattr_t'
/usr/include/pthread_types.h:76: error: previous declaration of `pthread_condattr_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:292: error: conflicting types for `pthread_cond_t'
/usr/include/pthread_types.h:75: error: previous declaration of `pthread_cond_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:293: error: conflicting types for `pthread_rwlockattr_t'
/usr/include/pthread_types.h:80: error: previous declaration of `pthread_rwlockattr_t'
/usr/pkgsrc/lang/python24/work/.buildlink/include/pthread.h:294: error: conflicting types for `pthread_rwlock_t'
/usr/include/pthread_types.h:79: error: previous declaration of `pthread_rwlock_t'
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/python24/work/Python-2.4.4
*** Error code 1

Stop.
---clip--- 

Any hints? 

-- 
Atte Peltomäki