Subject: tty/thread machine starvation/lockups with 4.99.40 (sparc64)
To: None <current-users@netbsd.org>
From: Rafal Boni <rafal@pobox.com>
List: port-sparc64
Date: 12/12/2007 12:22:49
Folks:
	I've been playing with asterisk on my -current sparc64 box and
	am seeing occasional lockups when lots of data goes to the tty.

	The way I can trigger this pretty repruducibly is to start up
	asterisk in 'console' mode with the verbosity cranked up; at
	startup, this produces hundreds (if not thousands) of lines 
	of output.  Fairly often in this situation, asterisk will
	hang, won't be killable from the tty and will prevent other
	processes from starting (ie, I can't log in as root on the
	console or ssh in to kill it).  I can still get to DDB and
	a kill -9 from DDB reliably un-wedges the system.  If I
	start up asterisk in non-console mode I don't ever see the
	hangs; I haven't yet tried starting asterisk in 'console'
	mode but without the verbosity, but I suspect it will also
	be happy.

	DDB ps outputs for a few cases attached below; I can get
	backtraces if need be, since it's fairly reproducible, but
	I thought I'd bounce it off the list 1st.

	Any thoughts on where I should dig, and/or what other info
	would help track it down?

Thanks,
--rafal

cpu0: kdb breakpoint at 13fcd00
Stopped in pid 27104.5 (asterisk) at    netbsd:cpu_Debugger+0x4:        nop
db> ps/w
 PID        LID          COMMAND     EMUL  PRI WAIT-MSG    WAIT-CHANNEL
>27104        8         asterisk   netbsd   43 select       189ddc8
>27104        7         asterisk   netbsd   43 parked       c831b20
>27104        6         asterisk   netbsd   43 parked       c833eb8
>27104        5         asterisk   netbsd   35 tty          b8137e8
>27104        4         asterisk   netbsd   43 select       189ddc8
>27104        3         asterisk   netbsd   43 parked       c834838
>27104        1         asterisk   netbsd   39              0

cpu0: kdb breakpoint at 13fcd00
Stopped in pid 16372.1 (asterisk) at    netbsd:cpu_Debugger+0x4:        nop
db> ps /w
 PID        LID          COMMAND     EMUL  PRI WAIT-MSG    WAIT-CHANNEL
>16372        8         asterisk   netbsd   43              0
>16372        7         asterisk   netbsd   43              0
>16372        6         asterisk   netbsd   43              0
>16372        5         asterisk   netbsd   28 tty          b8137e8
>16372        4         asterisk   netbsd   43 select       189ddc8
>16372        3         asterisk   netbsd   43              0
>16372        1         asterisk   netbsd   28              0

-- 
  Time is an illusion; lunchtime, doubly so.     |/\/\|           Rafal Boni
                   -- Ford Prefect               |\/\/|      rafal@pobox.com