Bug 238711 - Kernel Panic
Summary: Kernel Panic
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: crash, panic
Depends on:
Blocks:
 
Reported: 2019-06-19 23:03 UTC by Wes Wroten
Modified: 2019-06-20 23:53 UTC (History)
3 users (show)

See Also:


Attachments
Kernel panic boot screen pic (815.55 KB, image/jpeg)
2019-06-20 01:07 UTC, Wes Wroten
no flags Details
Proposed patch for fix this (1.09 KB, patch)
2019-06-20 08:23 UTC, Takanori Watanabe
no flags Details | Diff
kernel panic 10:24am nyc time build from 6:51am new york time (86.98 KB, image/jpeg)
2019-06-20 14:26 UTC, Wes Wroten
no flags Details
acpidump -dt results (191.76 KB, text/plain)
2019-06-20 14:36 UTC, Wes Wroten
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Wroten 2019-06-19 23:03:03 UTC
I built the kernel i got from the SVN around 12:30pm EST (new york time to be clear) and i just finished buildkernel and rebooted. I didnt get far into the boot before i got a kernel panic. I'm not totally sure what caused this because the computer froze with this:

db>

if need be i can build and install the kernel again, provided that someone tel me how i can save the boot message to a file. As i said before though, the book message screen froze so i couldnt even drop to a shell and i had to hard reset power off my computer to get it working and boot to kernel.old

thank you, 
~wes
Comment 1 Conrad Meyer freebsd_committer 2019-06-19 23:28:40 UTC
Do you have a swap device or other kernel dump device configured?  If so, please try setting debug.debugger_on_panic="0" in loader.conf and get a stack trace / etc from crashinfo.  If not, next time 'bt' (backtrace) and a photo would be helpful. 

You might consider renaming /boot/kernel to /boot/kernel.bad; /boot/kernel.old  to /boot/kernel; and then 'nextboot -k kernel.bad -e debug.debugger_on_panic=0 && reboot'.  This way you only hit the bad kernel once (if your /boot is not ZFS) and don't need to manually use loader to find kernel.old.

There's not much to go on for now, so please provide more information and reopen the bug.  Thanks!
Comment 2 Wes Wroten 2019-06-20 01:07:53 UTC
Created attachment 205225 [details]
Kernel panic boot screen pic

Here is a picture of my computer screen with the kernel panic. I would have liked to provide more than this but the kernel crashes before it initializes both the mouse and keyboard.
Comment 3 Andriy Gapon freebsd_committer 2019-06-20 06:04:16 UTC
Looks like it is possibly related to base r349161.
Comment 4 Takanori Watanabe freebsd_committer 2019-06-20 06:16:51 UTC
Please send me acpidump -dt result.
Comment 5 Wes Wroten 2019-06-20 06:33:51 UTC
Im building r249223 right now. If i get the same result i will post a photo and the acpidump -dt result.
Comment 6 yoaucid 2019-06-20 07:54:36 UTC
I also got same panic.
The reason is probably that although the function AcpiNsWalkNamespace returns AE_OK, the value of the argument ReturnValue is not changed, resulting in an invalid handle.
After changing as below, my system is boot without panic.


--- src/sys/contrib/dev/acpica/components/namespace/nswalk.c    2019-06-20 16:40:45.119908000 +0900
+++ src_org/sys/contrib/dev/acpica/components/namespace/nswalk.c        2019-06-20 15:45:56.709177000 +0900
@@ -331,9 +331,6 @@ AcpiNsWalkNamespace (
     ChildType = ACPI_TYPE_ANY;
     Level = 1;

-    if (ReturnValue)
-        *ReturnValue = NULL;
-
     /*
      * Traverse the tree of nodes until we bubble back up to where we
      * started. When Level is zero, the loop is done because we have
Comment 7 Takanori Watanabe freebsd_committer 2019-06-20 08:23:55 UTC
Created attachment 205230 [details]
Proposed patch for fix this
Comment 8 Takanori Watanabe freebsd_committer 2019-06-20 08:27:13 UTC
(In reply to yoaucid from comment #6)
Thank you!
So what about do next.
Comment 9 Hans Petter Selasky freebsd_committer 2019-06-20 08:37:12 UTC
Please style:

if(acpi_disabled("usb")){

Into:

if (acpi_disabled("usb")) {

Before committing.

--HPS
Comment 10 Wes Wroten 2019-06-20 14:26:06 UTC
Created attachment 205235 [details]
kernel panic 10:24am nyc time build from 6:51am new york time

still fails
Comment 11 Wes Wroten 2019-06-20 14:35:00 UTC
Comment on attachment 205235 [details]
kernel panic 10:24am nyc time build from 6:51am new york time

build from 6:51 still fails. i added a picture of the boot screen.
i will also inclose a text file called 'new' for the acpidump -dt result as per requested
Comment 12 Wes Wroten 2019-06-20 14:36:59 UTC
Created attachment 205238 [details]
acpidump -dt results

as promised here is the acpidump -dt for debugging purposes.
Comment 13 Takanori Watanabe freebsd_committer 2019-06-20 15:26:10 UTC
(In reply to Wes Wroten from comment #12)
Did you try the patch I post while ago?

https://bz-attachments.freebsd.org/attachment.cgi?id=205230
Comment 14 Wes Wroten 2019-06-20 23:36:30 UTC
Boot successful, the bug has been fixed with the patch.
Comment 15 commit-hook freebsd_committer 2019-06-20 23:53:06 UTC
A commit references this bug:

Author: takawata
Date: Thu Jun 20 23:52:34 UTC 2019
New revision: 349251
URL: https://svnweb.freebsd.org/changeset/base/349251

Log:
  Fix the case where no root hub object while host controller object exist in ACPI namespace.
  Also you can disable ACPI support for USB by setting
  debug.acpi.disabled="usb"

  PR:	238711

Changes:
  head/sys/dev/usb/usb_hub_acpi.c