Subject: Re: pthread_create() and more than 1 CPU
To: None <current-users@netbsd.org>
From: =?ISO-8859-1?Q?Stefan_Kr=FCger?= <skrueger@meinberlikomm.de>
List: current-users
Date: 02/06/2005 23:05:06
Stefan Krüger wrote:
> Michael Graff wrote:
> 
>> [...]
>> Would it Really Break anything if I applied this patch?  It will make 
>> it so a process by default uses ncpu for its maximum concurrency, 
>> which really seems more in line with every other OS out there.  Other 
>> than Solaris, of course, where pthread_setconcurrency() must be called 
>> to set the limit up to ncpu.  I suppose we could implement that as 
>> well, but I'd rather see libpthread do what most people expect -- use 
>> ncpu by default.
>>
>> --Michael
> 
> at least xmms and bmp hang after a short while w/ PHTREAD_CONCURRENCY 
> higher than 1 :-(
it's even worse, I just a had a hardlock :-(

situation:

ogg123 -z *.ogg playing for a while, then CTRL+Z'ed for approx 10min 
followed by a fg

assertion "target->pt_state != PT_STATE_RUNNING || target->pt_blockgen 
!= target->pt_unblockgen" failed: file 
"/usr/src/lib/libpthread/pthread_sig.c", line 796, function "pthread_kill"

according to the pthread_kill regression test it's not 
PTHREAD_CONCURRENCY<1 safe but why does it hardlock the entire system?

so for now I'd suggest no one sets PTHREAD_CONCURRENCY<1