Subject: Re: sparc64 -current kernel fails to boot
To: Matt Fleming <mjf@NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 12/21/2007 10:27:20
On Dec 21, 2007, at 07:54, Matt Fleming wrote:
> On Fri, Dec 21, 2007 at 12:36:49PM +0000, Robert Swindells wrote:
>>> bt
>> lockdebug_abort(...)
>> mutex_vector_enter(...)
>> zstty_softint(...) at zstty_softint+0x10
>
> The tty_lock mutex was already entered in zsopen() and zstty_softint()
> tries to enter it again.
>
> Is it just safe to remove the calls to mutex_spin_{enter/exit} in
> zstty_softint(), since tty_lock is held throughout anyway and I can't
> see any other code that calls zstty_softint?

   Whether or not that is safe, it doesn't solve the problem in its
entirety.  :-)

Mutex error: mutex_vector_enter: locking against myself

lock address : 0x00000000018a03b0
current cpu  :                  0
current lwp  : 0x0000000001818940
owner field  : 0x00ff070000000000 wait/spin:                0/1

panic: lock error
cpu0: kdb breakpoint at 1429a40
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x4:        nop
db> bt
lockdebug_abort(...) at netbsd:lockdebug_abort+0x54
mutex_vector_enter(...) at netbsd:mutex_vector_enter+0x158
nullmodem(...) at netbsd:nullmodem+0x8
zstty_softint(...) at netbsd:zstty_softint+0x380
zsparam(...) at netbsd:zsparam+0x218
zsopen(...) at netbsd:zsopen+0x200

   So, would it also be safe to take them out of sys/kern/ 
tty.c:nullmodem?
I find it hard to believe it'd be "right" or many other ports would be
having this problem...

                           - Chris