Port-i386 archive

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

Re: ddb: fatal breakpoint trap in supervisor mode



(2012/10/10 2:49), Manuel Bouyer wrote:
> On Wed, Oct 10, 2012 at 02:20:33AM +0900, SAITOH Masanobu wrote:
>>  I've noticed that NetBSD/i386 -current's ddb has a bug.
>>
>>> # sysctl -w ddb.fromconsole=1
>>> ddb.fromconsole: 0 -> 1
>> (send BREAK)
>>> # fatal breakpoint trap in supervisor mode <============
>>> trap type 1 code 0 eip c02698a4 cs 8 eflags 202 cr2 bbb62da0 ilevel 8 esp 
>>> da980f6c
>>> curlwp 0xc327ed20 pid 0 lid 2 lowest kstack 0xdaad4000
>>> Stopped in pid 0.2 (system) at  netbsd:breakpoint+0x4:  popl    %ebp
>>> db{0}> c
>>
>> Is this trap intended?
> 
> I think it is. entering ddb is done via cpu_Debugger(), which calls
> breakpoint(), which cause a breakpoint trap.
> 
>> One of my machine is recoverable from db> prompt by 'c' and
>> another is not (with "spl not lowered...).
>>
>> The difference is:
>>
>>  recoverable:
>>      serial console
>>
>>  unrecoverable:
>>      USB keyboard
> 
> This may be a bug in the USB keyboard driver. Either with the cnpoll 
> implementation, which does tricks with the spl level; or maybe
> just because the usb stack is MP-safe but ukbd is not (and wscons
> is probably not either) so it should be called with KERNEL_LOCK held.

 Thanks. The machine using USB keyboard is PS/2-less, so I'll change
the setting to use serial console to avoid this problem.

-- 
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index