Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on 13-CURRENT following r355784 #199

Open
cschuber opened this issue Dec 18, 2019 · 6 comments
Open

Panic on 13-CURRENT following r355784 #199

cschuber opened this issue Dec 18, 2019 · 6 comments

Comments

@cschuber
Copy link

Wed Dec 18 12:35:57 PST 2019

FreeBSD slippy 13.0-CURRENT FreeBSD 13.0-CURRENT #640 r355881M: Wed Dec 18 04:43:50 PST 2019 root@slippy:/export/obj/opt/src/svn-current/amd64.amd64/sys/BREAK amd64

panic: page fault

GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /boot/kernel/kernel...
Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug...

Unread portion of the kernel message buffer:

Fatal trap 12: page fault while in user mode
cpuid = 2; apic id = 02
fault virtual address = 0x7fffffffea88
fault code = user write data, protection violation
m-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:577
WARNING !drm_modeset_is_locked(&crtc->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:577
WARNING !drm_modeset_is_locked(&dev->mode_config.connection_mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:622
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
WARNING !drm_modeset_is_locked(&plane->mutex) failed at /usr/local/sys/modules/drm-current-kmod/drivers/gpu/drm/drm_atomic_helper.c:821
<4>WARN_ON(!mutex_is_locked(&dev->struct_mutex))

<4>WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
panic: page fault
cpuid = 2
time = 1576701000
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0093f0d930
vpanic() at vpanic+0x17e/frame 0xfffffe0093f0d990
panic() at panic+0x43/frame 0xfffffe0093f0d9f0
trap_fatal() at trap_fatal+0x386/frame 0xfffffe0093f0da50
trap_pfault() at trap_pfault+0x4f/frame 0xfffffe0093f0dac0
trap() at trap+0x41b/frame 0xfffffe0093f0dbf0
calltrap() at calltrap+0x8/frame 0xfffffe0093f0dbf0
--- trap 0xc, rip = 0x206d81, rsp = 0x7fffffffea90, rbp = 0x7fffffffeab0 ---
Uptime: 2h5m55s
55 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu,
(kgdb) #0 __curthread () at /opt/src/svn-current/sys/amd64/include/pcpu_aux.h:55
#1 doadump (textdump=1) at /opt/src/svn-current/sys/kern/kern_shutdown.c:392
#2 0xffffffff80690a8a in kern_reboot (howto=260)
at /opt/src/svn-current/sys/kern/kern_shutdown.c:479
#3 0xffffffff80690f26 in vpanic (fmt=, ap=)
at /opt/src/svn-current/sys/kern/kern_shutdown.c:908
#4 0xffffffff80690d43 in panic (fmt=)
at /opt/src/svn-current/sys/kern/kern_shutdown.c:835
#5 0xffffffff80a31c26 in trap_fatal (frame=0xfffffe0093f0dc00,
eva=140737488349832) at /opt/src/svn-current/sys/amd64/amd64/trap.c:926
#6 0xffffffff80a31c7f in trap_pfault (frame=0xfffffe0093f0dc00,
usermode=, signo=, ucode=)
at /opt/src/svn-current/sys/amd64/amd64/trap.c:743
#7 0xffffffff80a3146b in trap (frame=0xfffffe0093f0dc00)
at /opt/src/svn-current/sys/amd64/amd64/trap.c:347
#8
#9 0x0000000000206d81 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffffffea90
(kgdb)

The stack appears corrupted.

WARN_ON(!mutex_is_locked(&fbc->lock)) is printed every time it panics.

@zeising
Copy link
Member

zeising commented Dec 18, 2019

Which version of the drm drivers? Did you built it yourself or are you using packages? What GPU?

@cschuber
Copy link
Author

Built from ports, yesterday (you forgot to update PORTREVISION when GH_TAGNAME was updated. GH_TAGNAME= 9ea021d

drm-current-kmod-4.16.g20191217
Name : drm-current-kmod
Version : 4.16.g20191217
Installed on : Tue Dec 17 18:42:41 2019 PST
Origin : graphics/drm-current-kmod
Architecture : FreeBSD:13:amd64
Prefix : /usr/local
Categories : graphics kld
Licenses : BSD2CLAUSE, MIT, GPLv2
Maintainer : [email protected]
WWW : https://github.com/FreeBSDDesktop/kms-drm
Comment : DRM modules for the linuxkpi-based KMS components
Options :
DEBUG : off
SOURCE : on
Annotations :
FreeBSD_version: 1300068
Flat size : 122MiB
Description :
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components.
Currently corresponding to Linux 4.16 DRM.
This version is for FreeBSD CURRENT.
amdgpu and radeonkms are known to fail with EFI boot.

WWW: https://github.com/FreeBSDDesktop/kms-drm

The GPU is HD3000 (i915)

[drm] Got stolen memory base 0xd7a00000, size 0x8000000
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector LVDS-1: get mode from tunables:
[drm] - kern.vt.fb.modes.LVDS-1
[drm] - kern.vt.fb.default_mode
[drm] Connector VGA-1: get mode from tunables:
[drm] - kern.vt.fb.modes.VGA-1
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-1
[drm] - kern.vt.fb.default_mode
[drm] Initialized i915 1.6.0 20171222 for drmn0 on minor 0

sysctls:
vm.uma.i915_priolist.stats.xdomain: 0
vm.uma.i915_priolist.stats.fails: 0
vm.uma.i915_priolist.stats.frees: 0
vm.uma.i915_priolist.stats.allocs: 0
vm.uma.i915_priolist.stats.current: 0
vm.uma.i915_priolist.domain.0.wss: 0
vm.uma.i915_priolist.domain.0.imin: 0
vm.uma.i915_priolist.domain.0.imax: 0
vm.uma.i915_priolist.domain.0.nitems: 0
vm.uma.i915_priolist.limit.sleeps: 0
vm.uma.i915_priolist.limit.sleepers: 0
vm.uma.i915_priolist.limit.max_items: 0
vm.uma.i915_priolist.limit.items: 0
vm.uma.i915_priolist.keg.efficiency: 98
vm.uma.i915_priolist.keg.free: 0
vm.uma.i915_priolist.keg.pages: 0
vm.uma.i915_priolist.keg.align: 63
vm.uma.i915_priolist.keg.ipers: 63
vm.uma.i915_priolist.keg.ppera: 1
vm.uma.i915_priolist.keg.rsize: 64
vm.uma.i915_priolist.keg.name: i915_priolist
vm.uma.i915_priolist.bucket_size_max: 253
vm.uma.i915_priolist.bucket_size: 253
vm.uma.i915_priolist.flags: 0
vm.uma.i915_priolist.size: 48
vm.uma.i915_dependency.stats.xdomain: 0
vm.uma.i915_dependency.stats.fails: 0
vm.uma.i915_dependency.stats.frees: 0
vm.uma.i915_dependency.stats.allocs: 0
vm.uma.i915_dependency.stats.current: 0
vm.uma.i915_dependency.domain.0.wss: 0
vm.uma.i915_dependency.domain.0.imin: 0
vm.uma.i915_dependency.domain.0.imax: 0
vm.uma.i915_dependency.domain.0.nitems: 0
vm.uma.i915_dependency.limit.sleeps: 0
vm.uma.i915_dependency.limit.sleepers: 0
vm.uma.i915_dependency.limit.max_items: 0
vm.uma.i915_dependency.limit.items: 0
vm.uma.i915_dependency.keg.efficiency: 98
vm.uma.i915_dependency.keg.free: 0
vm.uma.i915_dependency.keg.pages: 0
vm.uma.i915_dependency.keg.align: 63
vm.uma.i915_dependency.keg.ipers: 63
vm.uma.i915_dependency.keg.ppera: 1
vm.uma.i915_dependency.keg.rsize: 64
vm.uma.i915_dependency.keg.name: i915_dependency
vm.uma.i915_dependency.bucket_size_max: 253
vm.uma.i915_dependency.bucket_size: 253
vm.uma.i915_dependency.flags: 0
vm.uma.i915_dependency.size: 64
vm.uma.drm_i915_gem_request.stats.xdomain: 0
vm.uma.drm_i915_gem_request.stats.fails: 0
vm.uma.drm_i915_gem_request.stats.frees: 441
vm.uma.drm_i915_gem_request.stats.allocs: 441
vm.uma.drm_i915_gem_request.stats.current: 0
vm.uma.drm_i915_gem_request.domain.0.wss: 0
vm.uma.drm_i915_gem_request.domain.0.imin: 13
vm.uma.drm_i915_gem_request.domain.0.imax: 13
vm.uma.drm_i915_gem_request.domain.0.nitems: 13
vm.uma.drm_i915_gem_request.limit.sleeps: 0
vm.uma.drm_i915_gem_request.limit.sleepers: 0
vm.uma.drm_i915_gem_request.limit.max_items: 0
vm.uma.drm_i915_gem_request.limit.items: 0
vm.uma.drm_i915_gem_request.keg.efficiency: 85
vm.uma.drm_i915_gem_request.keg.free: 0
vm.uma.drm_i915_gem_request.keg.pages: 13
vm.uma.drm_i915_gem_request.keg.align: 63
vm.uma.drm_i915_gem_request.keg.ipers: 5
vm.uma.drm_i915_gem_request.keg.ppera: 1
vm.uma.drm_i915_gem_request.keg.rsize: 704
vm.uma.drm_i915_gem_request.keg.name: drm_i915_gem_request
vm.uma.drm_i915_gem_request.bucket_size_max: 253
vm.uma.drm_i915_gem_request.bucket_size: 13
vm.uma.drm_i915_gem_request.flags: 0
vm.uma.drm_i915_gem_request.size: 696
vm.uma.i915_lut_handle.stats.xdomain: 0
vm.uma.i915_lut_handle.stats.fails: 0
vm.uma.i915_lut_handle.stats.frees: 22
vm.uma.i915_lut_handle.stats.allocs: 37
vm.uma.i915_lut_handle.stats.current: 15
vm.uma.i915_lut_handle.domain.0.wss: 0
vm.uma.i915_lut_handle.domain.0.imin: 0
vm.uma.i915_lut_handle.domain.0.imax: 0
vm.uma.i915_lut_handle.domain.0.nitems: 0
vm.uma.i915_lut_handle.limit.sleeps: 0
vm.uma.i915_lut_handle.limit.sleepers: 0
vm.uma.i915_lut_handle.limit.max_items: 0
vm.uma.i915_lut_handle.limit.items: 0
vm.uma.i915_lut_handle.keg.efficiency: 98
vm.uma.i915_lut_handle.keg.free: 80
vm.uma.i915_lut_handle.keg.pages: 13
vm.uma.i915_lut_handle.keg.align: 7
vm.uma.i915_lut_handle.keg.ipers: 84
vm.uma.i915_lut_handle.keg.ppera: 1
vm.uma.i915_lut_handle.keg.rsize: 48
vm.uma.i915_lut_handle.keg.name: i915_lut_handle
vm.uma.i915_lut_handle.bucket_size_max: 253
vm.uma.i915_lut_handle.bucket_size: 253
vm.uma.i915_lut_handle.flags: 0
vm.uma.i915_lut_handle.size: 48
vm.uma.i915_vma.stats.xdomain: 0
vm.uma.i915_vma.stats.fails: 0
vm.uma.i915_vma.stats.frees: 24
vm.uma.i915_vma.stats.allocs: 52
vm.uma.i915_vma.stats.current: 28
vm.uma.i915_vma.domain.0.wss: 0
vm.uma.i915_vma.domain.0.imin: 0
vm.uma.i915_vma.domain.0.imax: 0
vm.uma.i915_vma.domain.0.nitems: 0
vm.uma.i915_vma.limit.sleeps: 0
vm.uma.i915_vma.limit.sleepers: 0
vm.uma.i915_vma.limit.max_items: 0
vm.uma.i915_vma.limit.items: 0
vm.uma.i915_vma.keg.efficiency: 85
vm.uma.i915_vma.keg.free: 0
vm.uma.i915_vma.keg.pages: 13
vm.uma.i915_vma.keg.align: 63
vm.uma.i915_vma.keg.ipers: 5
vm.uma.i915_vma.keg.ppera: 1
vm.uma.i915_vma.keg.rsize: 704
vm.uma.i915_vma.keg.name: i915_vma
vm.uma.i915_vma.bucket_size_max: 253
vm.uma.i915_vma.bucket_size: 13
vm.uma.i915_vma.flags: 0
vm.uma.i915_vma.size: 648
vm.uma.drm_i915_gem_object.stats.xdomain: 0
vm.uma.drm_i915_gem_object.stats.fails: 0
vm.uma.drm_i915_gem_object.stats.frees: 305
vm.uma.drm_i915_gem_object.stats.allocs: 342
vm.uma.drm_i915_gem_object.stats.current: 37
vm.uma.drm_i915_gem_object.domain.0.wss: 0
vm.uma.drm_i915_gem_object.domain.0.imin: 26
vm.uma.drm_i915_gem_object.domain.0.imax: 26
vm.uma.drm_i915_gem_object.domain.0.nitems: 26
vm.uma.drm_i915_gem_object.limit.sleeps: 0
vm.uma.drm_i915_gem_object.limit.sleepers: 0
vm.uma.drm_i915_gem_object.limit.max_items: 0
vm.uma.drm_i915_gem_object.limit.items: 0
vm.uma.drm_i915_gem_object.keg.efficiency: 81
vm.uma.drm_i915_gem_object.keg.free: 0
vm.uma.drm_i915_gem_object.keg.pages: 26
vm.uma.drm_i915_gem_object.keg.align: 63
vm.uma.drm_i915_gem_object.keg.ipers: 4
vm.uma.drm_i915_gem_object.keg.ppera: 1
vm.uma.drm_i915_gem_object.keg.rsize: 832
vm.uma.drm_i915_gem_object.keg.name: drm_i915_gem_object
vm.uma.drm_i915_gem_object.bucket_size_max: 253
vm.uma.drm_i915_gem_object.bucket_size: 13
vm.uma.drm_i915_gem_object.flags: 0
vm.uma.drm_i915_gem_object.size: 776
hw.dri.0.name: i915 0x5c6 pci:0000:00:02.0
compat.linuxkpi.i915_enable_gvt: 0
compat.linuxkpi.i915_enable_dpcd_backlight: 0
compat.linuxkpi.i915_inject_load_failure: 0
compat.linuxkpi.i915_enable_dp_mst: 1
compat.linuxkpi.i915_guc_log_level: -1
compat.linuxkpi.i915_enable_guc: 0
compat.linuxkpi.i915_edp_vswing: 0
compat.linuxkpi.i915_nuclear_pageflip: 0
compat.linuxkpi.i915_verbose_state_checks: 1
compat.linuxkpi.i915_mmio_debug: 0
compat.linuxkpi.i915_enable_cmd_parser: 1
compat.linuxkpi.i915_disable_display: 0
compat.linuxkpi.i915_invert_brightness: 0
compat.linuxkpi.i915_force_reset_modeset_test: 0
compat.linuxkpi.i915_load_detect_test: 0
compat.linuxkpi.i915_prefault_disable: 0
compat.linuxkpi.i915_fastboot: 0
compat.linuxkpi.i915_enable_ips: 1
compat.linuxkpi.i915_disable_power_well: 1
compat.linuxkpi.i915_alpha_support: 1
compat.linuxkpi.i915_enable_psr: -1
compat.linuxkpi.i915_enable_ppgtt: 1
compat.linuxkpi.i915_enable_hangcheck: 1
compat.linuxkpi.i915_error_capture: 1
compat.linuxkpi.i915_reset: 2
compat.linuxkpi.i915_vbt_sdvo_panel_type: -1
compat.linuxkpi.i915_panel_use_ssc: -1
compat.linuxkpi.i915_lvds_channel_mode: 0
compat.linuxkpi.i915_enable_fbc: 0
compat.linuxkpi.i915_enable_dc: -1
compat.linuxkpi.i915_panel_ignore_lid: 1
compat.linuxkpi.i915_modeset: -1

@johalun
Copy link
Member

johalun commented Dec 18, 2019

Is this crash a one off thing? Repeatable? What software were running?

@zeising
Copy link
Member

zeising commented Dec 18, 2019

I forgot to bump the version of drm-devel-kmod. drm-current-kmod looks OK from what I can see. drm-devel-kmod has been bumped now though.

@cschuber
Copy link
Author

This crash has occurred three times over the last two days. Once yesterday. Twice today.

@cschuber
Copy link
Author

Sorry, longer than three days. Four panics since Dec 9.

info.0: Dumptime: Mon Dec 9 18:48:31 2019
info.1: Dumptime: Mon Dec 16 12:23:25 2019
info.2: Dumptime: Wed Dec 18 10:21:32 2019
info.3: Dumptime: Wed Dec 18 12:30:00 2019

slippy# grep WARN_ON core.txt.?
core.txt.0:<4>WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.0:<4>WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.0:WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.0:WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.1:<4>WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.1:<4>WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.1:WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.1:WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.2:<4>WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.2:<4>WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.2:WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.2:WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.3:<4>WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.3:<4>WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.3:WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.3:WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.3:Dec 18 10:26:23 slippy kernel: WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.3:Dec 18 10:26:23 slippy kernel: WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
core.txt.3:WARN_ON(!mutex_is_locked(&dev->struct_mutex))
core.txt.3:WARN_ON(!mutex_is_locked(&fbc->lock))WARN_ON(!mutex_is_locked(&fbc->lock))
slippy#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants