NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/52409: uvm_fault when waking up after sleep (Let's Note CF-{N,S}-9, etc.)
>Number: 52409
>Category: kern
>Synopsis: uvm_fault when waking up after sleep (Let's Note CF-{N,S}-9, etc.)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 16 04:50:00 +0000 2017
>Originator: Makoto Fujiwara
>Release: NetBSD 8.99.1
>Organization:
KINU Corporation
>Environment:
NetBSD 8.99.1 (GENERIC) #0: Sat Jul 15 10:17:09 UTC 2017
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
Architecture: x86_64
Machine: amd64
>Description:
At waking up after sleep state,
(1) In file sys/external/bsd/drm2/pci/drm_pci.c,
---------------------
234 static int
235 drm_pci_irq_install(struct drm_device *dev, irqreturn_t (*handler)(void *),
236 int flags, const char *name, void *arg, struct drm_bus_irq_cookie **cookiep)
... (omit) ...
253 intrstr = pci_intr_string(pa->pa_pc, irq_cookie->intr_handles[0],
254 intrbuf, sizeof(intrbuf));
---------------------
at the line 253, irq_cookie->intr_handles == 0,
which causes following trap.
acpi0: entering state S3
Flushing disk caches: 10 done
ioapic0 reenabling
uvm_fault(0xffffe40110dc68b8, 0x0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip 0xffffffff806435c8 cs 0x8 rflags 0x10202 cr2 0 ilevel 0 rsp 0xffffe4004003baa0
curlwp 0xffffe40115c38480 pid 823.1 lowest kstack 0xffffe400400382c0
panic: trap
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
trap() at netbsd:trap+0xc6b
--- trap (number 6) ---
drm_pci_irq_install() at netbsd:drm_pci_irq_install+0x90
drm_irq_install() at netbsd:drm_irq_install+0xb7
__i915_drm_thaw() at netbsd:__i915_drm_thaw+0xc9
i915drmkms_resume() at netbsd:i915drmkms_resume+0x34
device_pmf_driver_resume() at netbsd:device_pmf_driver_resume+0x46
pmf_device_resume_locked() at netbsd:pmf_device_resume_locked+0xd3
pmf_device_resume() at netbsd:pmf_device_resume+0x41
pmf_system_resume() at netbsd:pmf_system_resume+0xc7
acpi_enter_sleep_state() at netbsd:acpi_enter_sleep_state+0x182
sysctl_hw_acpi_sleepstate() at netbsd:sysctl_hw_acpi_sleepstate+0xfe
sysctl_dispatch() at netbsd:sysctl_dispatch+0xc1
sys___sysctl() at netbsd:sys___sysctl+0xd8
syscall() at netbsd:syscall+0x1d8
--- syscall (number 202) ---
727e27b1bb6a:
cpu0: End traceback...
dumping to dev 0,1 (offset=8802119, size=997005):
dump Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 8.99.1 (GENERIC) #0: Sat Jul 15 10:17:09 UTC 2017
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
total memory = 3894 MB
avail memory = 3759 MB
>How-To-Repeat:
1. Have the machine, Let's Note CF-N9 or CF-S9. CF-J10.
(SX2 or N10 are OK for this purpose, but they have another
problem)
2. Install 8.99.1 from the daily
http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/201707151110Z/amd64/
3. Replace lid_switch by sleep_button in followin path.
ls -lt /etc/powerd/scripts/{sl*,lid*}
-r-xr-xr-x 1 root wheel 1035 Jul 8 00:41 /etc/powerd/scripts/lid_switch
-r-xr-xr-x 1 root wheel 513 Mar 12 03:45 /etc/powerd/scripts/lid_switch.orig
-r-xr-xr-x 1 root wheel 1035 Mar 12 03:45 /etc/powerd/scripts/sleep_button
4. Boot the machine
5. When you see login: prompt, close the lid
(PC gets sleep) .. this works only once after reboot.
see another PR
42051 lid switch works only once
49024 Powerd invokes lid_switch by acpilid only ONCE after boot
6. Wait few seconds, and open the lid
7. You may see some lines for trap or panic (sometimes may not), and soon
screen gets dark out and one or two mins later, it will reboot automatically
Note: (a) in above, don't set ddb.onpanic to 1.
Note: (b) You may replace the procedure 3 to 5 above,
login and do
sudo sysctl -w hw.acpi.sleep.state=3
may give the equivalent effect.
>Fix:
diff --git a/sys/external/bsd/drm2/i915drm/i915_pci.c b/sys/external/bsd/drm2/i915drm/i915_pci.c
index 3ba85bc531c..5b46e472102 100644
--- a/sys/external/bsd/drm2/i915drm/i915_pci.c
+++ b/sys/external/bsd/drm2/i915drm/i915_pci.c
@@ -241,6 +241,7 @@ i915drmkms_resume(device_t self, const pmf_qual_t *qual)
if (dev == NULL)
return true;
+ pci_enable_msi(dev->pdev);
ret = i915_drm_thaw_early(dev);
if (ret)
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index