NetBSD Problem Report #47153

From gson@gson.org  Fri Nov  2 15:39:44 2012
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 1A43363E547
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  2 Nov 2012 15:39:44 +0000 (UTC)
Message-Id: <20121102153940.7A9DB75F14@guava.gson.org>
Date: Fri,  2 Nov 2012 17:39:40 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@gnats.NetBSD.org
Subject: Plugging in USB keyboard at "root device:" prompt crashes 6.0
X-Send-Pr-Version: 3.95

>Number:         47153
>Category:       kern
>Synopsis:       Plugging in USB keyboard at "root device:" prompt crashes 6.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    skrll
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 02 15:40:01 +0000 2012
>Last-Modified:  Sat Jan 18 07:40:38 +0000 2014
>Originator:     Andreas Gustafsson
>Release:        NetBSD 6.0
>Organization:
>Environment:
System: NetBSD guava.gson.org 6.0
Architecture: amd64
Machine: amd64
>Description:

I successfully installed NetBSD 6.0/amd64 on a SATA disk in one
machine, then moved the disk to a second machine and attempted
to boot it there.

This resulted in the kernel not finding the root file system and
displaying a "root device:" prompt.  I guess that's to be expected
given the disk transplant; so far so good.

I then plugged in a USB keyboard to enter the root device name.
When I did, the kernel printed some usb attach messages, followed
by

  This port is broken, it does not call cnpollc() before calling cngetc().
  This should be fixed, but it will work anyway (for now).
  uvm_fault(0xffffffff80e11b20, 0x0, 1) -> e
  fatal page fault in supervisor mode
  [...some lines omitted..]
  Stopped in pid 0.59 (system) at netbsd:usb_transfer_complete+0x124: movq 78(%rax),%rax
  db{0}>

Just in case it's relevant, I should mention that when I previously
attempted to boot 6.0_RC1 on the same (second) machine, I ran into
kern/46696.

The kernel messages in kern/46285 also show evidence of a crash
triggered by plugging in a USB keyboard at the root device prompt, but
since the subject of that PR is the disk error triggering the "root
device" prompt and not the crash following it, I'm considering it a
separate problem and filing a separate PR.

>How-To-Repeat:

Boot an amd64 machine in such a way as to trigger the "root device:"
prompt, and then plug in an USB keyboard.

>Fix:

Please.

>Release-Note:

>Audit-Trail:

From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/47153: Plugging in USB keyboard at "root device:" prompt crashes 6.0
Date: Fri, 2 Nov 2012 18:29:59 +0200

 On closer examination of the boot messages, there is a

   ahcisata0: BSY never cleared, TD 0x80

 a few lines before the "root device:" prompt, which probably explains
 why the root device was not found.  After reseating the SATA cables,
 the machine booted.

 The kernel still shouldn't crash, though, so there is still a bug
 somewhere.  Given that there are known bugs in the ahcisata error
 handling (kern/47097), maybe the condition that triggers the crash is
 not plugging in the keyboard at the root device prompt, but doing it
 after an ahcisata error.
 -- 
 Andreas Gustafsson, gson@gson.org

Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Sat, 18 Jan 2014 07:40:38 +0000
Responsible-Changed-Why:
Take


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.