Bug 228628 - Kernel panic after resume
Summary: Kernel panic after resume
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: regression
Depends on:
Blocks:
 
Reported: 2018-05-31 06:36 UTC by Manuel Stühn
Modified: 2018-05-31 17:32 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Stühn 2018-05-31 06:36:30 UTC
Since upgrading CURRENT from r333740 to r334167 I'm experiencing reproducibly
Kernel panics. Before the update i did not have any of those.  

Steps to reproduce:
In my case i have to repeat these steps several times (2-7x), then the panic (backtrace below) occurs.

1. suspend
2. resume
3. start firefox

Hardware:
Lenovo Thinkpad T450 Laptop

Software:
FreeBSD CURRENT with Kernel-Config GENERIC-NODEBUG,
drm-stable-kmod from ports

Additional:
I've built and installed kernels until the error appears:
The last working revision is r334117, the first not 
working is r334123. Revisions 334118-334122 of the kernel did not build, 
so i cannot try these.


Backtrace:
__curthread () at ./machine/pcpu.h:231
231     ./machine/pcpu.h: No such file or directory.
(kgdb) #0  __curthread () at ./machine/pcpu.h:231
#1  doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:366
#2  0xffffffff80b9a6f0 in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:446
#3  0xffffffff80b9ab83 in vpanic (fmt=<optimized out>, 
ap=0xfffffe0056507e50)
    at /usr/src/sys/kern/kern_shutdown.c:863
#4  0xffffffff80b9a973 in panic (fmt=<unavailable>)
    at /usr/src/sys/kern/kern_shutdown.c:790
#5  0xffffffff80ba5c3b in kdb_switch () at 
/usr/src/sys/kern/kern_synch.c:377
#6  0xffffffff80ba5bb9 in mi_switch (flags=<unavailable>, newtd=0x0)
    at /usr/src/sys/kern/kern_synch.c:406
#7  0xffffffff80bf3f5f in sleepq_timedwait (wchan=<unavailable>, 
pri=<unavailable>) at /usr/src/sys/kern/subr_sleepqueue.c:727
#8  0xffffffff833c7bed in linux_add_to_sleepqueue 
(wchan=0xfffff8000bf6ad80, task=0xfffff8000bf6ad80, wmesg=<optimized 
out>, timeout=50, state=<optimized out>)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:70
#9  0xffffffff833c7a58 in linux_wait_event_common (wqh=<optimized out>, 
wq=<optimized out>, timeout=50, state=2, lock=0x0)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:270
#10 0xffffffff83458de6 in ?? ()
#11 0x000000061d026200 in ?? ()
#12 0x0000000600000000 in ?? ()
#13 0xfffff8000bf6ad80 in ?? ()
#14 0xffffffff833c7540 in ?? ()
    at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:167
   from /boot/kernel/linuxkpi.ko
#15 0xfffff80007804828 in ?? ()
#16 0xfffff80007804828 in ?? ()
#17 0x0000000000000030 in ?? ()
#18 0x0000000000000000 in ?? ()
(kgdb) 


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x3
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80cc60cb
stack pointer           = 0x28:0xfffffe0056508560
frame pointer           = 0x28:0xfffffe0056508760
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 10218 (nextcloud)
--
Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x300000011
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80cc60cb
stack pointer           = 0x28:0xfffffe005e4d1560
frame pointer           = 0x28:0xfffffe005e4d1760
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 17918 (DNS Resolver #16)
--
Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x3
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80cc60cb
stack pointer           = 0x28:0xfffffe0056508560
frame pointer           = 0x28:0xfffffe0056508760
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 10218 (nextcloud)
Comment 1 Andriy Gapon freebsd_committer 2018-05-31 07:49:55 UTC
The problem is like caused by base r334118.
I think that it should be fixed now as there have been several follow-up commits. But the fix is likely after r334167 that you tried.
Comment 2 Manuel Stühn 2018-05-31 17:32:22 UTC
Thank you. I've updated to r334422 and now I'm indeed not able to reproduce the panic anymore.