NetBSD Problem Report #56103

From www@netbsd.org  Mon Apr 12 04:52:29 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E30491A9217
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 Apr 2021 04:52:29 +0000 (UTC)
Message-Id: <20210412045227.1E7511A9239@mollari.NetBSD.org>
Date: Mon, 12 Apr 2021 04:52:27 +0000 (UTC)
From: schaecsn@gmx.net
Reply-To: schaecsn@gmx.net
To: gnats-bugs@NetBSD.org
Subject: i915 crashes kernel
X-Send-Pr-Version: www-1.0

>Number:         56103
>Category:       kern
>Synopsis:       i915 crashes kernel
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 12 04:55:00 +0000 2021
>Last-Modified:  Tue Oct 19 06:35:01 +0000 2021
>Originator:     Stefan Schaeckeler
>Release:        9.1_STABLE
>Organization:
>Environment:
NetBSD xxx.xxxx.xx 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Tue Mar  2 18:31:12 PST 2021  root@dxxx.xxx.xx:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
First, I had NetBSD 9.0/9.1 running on another computer. That computer crashed every 30 days or so for no obvious reason. No logs or kdump were generated. Last month, I put that computer's harddrive into another computer and got there yet another crash after roughly 30 days. This time with some logs.


cat /var/log/messages
...
Apr 11 14:43:12 XXXX syslogd[206]: restart
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] kern info: [drm] stuck on render ring
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] kern info: [drm] GPU HANG: ecode 9:0:0xfefffffe, reason: Ring hung, action: reset
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] drm/i915: Resetting chip after gpu hang
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:5417)i915_gem_init_hw] *ERROR* Failed to initialize GuC, error -5 (ignored)
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] warning: /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c:709: WARN_ON(&target->list == &ring->request_list)kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c:1895)gen8_init_rcs_context] *ERROR* MOCS failed to program: expect performance issues.
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] warning: /usr/src/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c:709: WARN_ON(&target->list == &ring->request_list)kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c:469)i915_gem_context_enable] *ERROR* ring init context: -28
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] kern error: [drm:(/usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:5459)i915_gem_init_hw] *ERROR* Context enable ring #0 failed -28
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] uvm_fault(0xffffffff81585ce0, 0x0, 1) -> e
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] fatal page fault in supervisor mode
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] trap type 6 code 0 rip 0xffffffff80aa0e90 cs 0x8 rflags 0x13293 cr2 0x8 ilevel 0 rsp 0xffffa60066a0fd20
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] curlwp 0xffffa19ccc84d700 pid 0.71 lowest kstack 0xffffa60066a0d2c0
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] panic: trap
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] cpu0: Begin traceback...
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] vpanic() at netbsd:vpanic+0x160
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] snprintf() at netbsd:snprintf
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] startlwp() at netbsd:startlwp
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] alltraps() at netbsd:alltraps+0xbb
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] intel_logical_ring_cleanup() at netbsd:intel_logical_ring_cleanup+0x8d
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] i915_gem_cleanup_ringbuffer() at netbsd:i915_gem_cleanup_ringbuffer+0x51
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] i915_gem_init_hw() at netbsd:i915_gem_init_hw+0x58e
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] i915_reset() at netbsd:i915_reset+0x89
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] i915_handle_error() at netbsd:i915_handle_error+0x9ba
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] linux_workqueue_thread() at netbsd:linux_workqueue_thread+0x14e
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] cpu0: End traceback...
Apr 11 14:43:12 XXXX /netbsd: 
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] dumping to dev 0,1 (offset=4288527, size=1014616):
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] dump wddump: device timed out
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] i/o error
Apr 11 14:43:12 XXXX /netbsd: 
Apr 11 14:43:12 XXXX /netbsd: 
Apr 11 14:43:12 XXXX /netbsd: [ 2924797.8266545] rebooting...
...


About the cpu:

$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping        : 3
cpu MHz         : 3312.00
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp 
clflush size    : 64

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping        : 3
cpu MHz         : 3312.00
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp 
clflush size    : 64



For the kernel and userland, I follow

:/usr/src$ cat CVS/Tag 
Tnetbsd-9


These crashes always happen when I'm not around, e.g. no particular work-load was running. xset was probably turning the monitor off.


Xorg did not log anything at the time of the crash. There is no custom xorg.conf file.

$ cat /var/log/Xorg.0.log
[ 57951.170] 
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[ 57951.170] Build Operating System: NetBSD/amd64 9.1_STABLE - The NetBSD Foundation, Inc.
[ 57951.170] Current Operating System: NetBSD xxx.xxx.xx 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Tue Mar  2 18:31:12 PST 2021  root@xxx.xxx.xx:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
[ 57951.171] Build Date: 03 March 2019  07:11:23AM
[ 57951.171]  
[ 57951.171] Current version of pixman: 0.38.4
[ 57951.171]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 57951.171] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 57951.171] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Mar  9 09:19:44 2021
[ 57951.172] (II) Loader magic: 0x5f48ea60
[ 57951.172] (II) Module ABI versions:
[ 57951.172]    X.Org ANSI C Emulation: 0.4
[ 57951.172]    X.Org Video Driver: 24.0
[ 57951.172]    X.Org XInput driver : 24.1
[ 57951.172]    X.Org Server Extension : 10.0
[ 57951.188] (--) PCI:*(0@0:2:0) 8086:1902:1028:07c5 rev 6, Mem @ 0xde000000/16777216, 0xc0000000/268435456, I/O @ 0x0000f000/64
[ 57951.188] (==) Using default built-in configuration (39 lines)
[ 57951.188] (==) --- Start of built-in configuration ---
[ 57951.188]    Section "Device"
[ 57951.188]            Identifier      "Builtin Default intel Device 0"
[ 57951.188]            Driver  "intel"
[ 57951.188]    EndSection
[ 57951.188]    Section "Screen"
[ 57951.188]            Identifier      "Builtin Default intel Screen 0"
[ 57951.188]            Device  "Builtin Default intel Device 0"
[ 57951.188]    EndSection
[ 57951.188]    Section "Device"
[ 57951.188]            Identifier      "Builtin Default modesetting Device 0"
[ 57951.188]            Driver  "modesetting"
[ 57951.188]    EndSection
[ 57951.188]    Section "Screen"
[ 57951.188]            Identifier      "Builtin Default modesetting Screen 0"
[ 57951.188]            Device  "Builtin Default modesetting Device 0"
[ 57951.188]    EndSection
[ 57951.188]    Section "Device"
[ 57951.188]            Identifier      "Builtin Default vesa Device 0"
[ 57951.188]            Driver  "vesa"
[ 57951.188]    EndSection
[ 57951.188]    Section "Screen"
[ 57951.188]            Identifier      "Builtin Default vesa Screen 0"
[ 57951.188]            Device  "Builtin Default vesa Device 0"
[ 57951.188]    EndSection
[ 57951.188]    Section "Device"
[ 57951.188]            Identifier      "Builtin Default wsfb Device 0"
[ 57951.188]            Driver  "wsfb"
[ 57951.188]    EndSection
[ 57951.188]    Section "Screen"
[ 57951.189]            Identifier      "Builtin Default wsfb Screen 0"
[ 57951.189]            Device  "Builtin Default wsfb Device 0"
[ 57951.189]    EndSection
[ 57951.189]    Section "ServerLayout"
[ 57951.189]            Identifier      "Builtin Default Layout"
[ 57951.189]            Screen  "Builtin Default intel Screen 0"
[ 57951.189]            Screen  "Builtin Default modesetting Screen 0"
[ 57951.189]            Screen  "Builtin Default vesa Screen 0"
[ 57951.189]            Screen  "Builtin Default wsfb Screen 0"
[ 57951.189]    EndSection
[ 57951.189] (==) --- End of built-in configuration ---
[ 57951.189] (==) ServerLayout "Builtin Default Layout"
[ 57951.189] (**) |-->Screen "Builtin Default intel Screen 0" (0)
[ 57951.189] (**) |   |-->Monitor "<default monitor>"
[ 57951.190] (**) |   |-->Device "Builtin Default intel Device 0"
[ 57951.190] (==) No monitor specified for screen "Builtin Default intel Screen 0".
        Using a default monitor configuration.
[ 57951.190] (**) |-->Screen "Builtin Default modesetting Screen 0" (1)
[ 57951.190] (**) |   |-->Monitor "<default monitor>"
[ 57951.190] (**) |   |-->Device "Builtin Default modesetting Device 0"
[ 57951.190] (==) No monitor specified for screen "Builtin Default modesetting Screen 0".
        Using a default monitor configuration.
[ 57951.190] (**) |-->Screen "Builtin Default vesa Screen 0" (2)
[ 57951.190] (**) |   |-->Monitor "<default monitor>"
[ 57951.191] (**) |   |-->Device "Builtin Default vesa Device 0"
[ 57951.191] (==) No monitor specified for screen "Builtin Default vesa Screen 0".
        Using a default monitor configuration.
[ 57951.191] (**) |-->Screen "Builtin Default wsfb Screen 0" (3)
[ 57951.191] (**) |   |-->Monitor "<default monitor>"
[ 57951.192] (**) |   |-->Device "Builtin Default wsfb Device 0"
[ 57951.192] (==) No monitor specified for screen "Builtin Default wsfb Screen 0".
        Using a default monitor configuration.
[ 57951.192] (==) Not automatically adding devices
[ 57951.192] (==) Not automatically enabling devices
[ 57951.192] (==) Not automatically adding GPU devices
[ 57951.192] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 57951.192] (==) FontPath set to:
        /usr/X11R7/lib/X11/fonts/misc/,
        /usr/X11R7/lib/X11/fonts/TTF/,
        /usr/X11R7/lib/X11/fonts/Type1/,
        /usr/X11R7/lib/X11/fonts/75dpi/,
        /usr/X11R7/lib/X11/fonts/100dpi/
[ 57951.192] (==) ModulePath set to "/usr/X11R7/lib/modules"
[ 57951.192] (==) |-->Input Device "<default pointer>"
[ 57951.192] (==) |-->Input Device "<default keyboard>"
[ 57951.192] (==) The core pointer device wasn't specified explicitly in the layout.
        Using the default mouse configuration.
[ 57951.192] (==) The core keyboard device wasn't specified explicitly in the layout.
        Using the default keyboard configuration.
[ 57951.192] (II) LoadModule: "glx"
[ 57951.195] (II) Loading /usr/X11R7/lib/modules/extensions/libglx.so
[ 57951.196] (II) Module glx: vendor="X.Org Foundation"
[ 57951.196]    compiled for 1.20.5, module version = 1.0.0
[ 57951.196]    ABI class: X.Org Server Extension, version 10.0
[ 57951.196] (II) LoadModule: "intel"
[ 57951.197] (II) Loading /usr/X11R7/lib/modules/drivers/intel_drv.so
[ 57951.198] (II) Module intel: vendor="X.Org Foundation"
[ 57951.198]    compiled for 1.20.5, module version = 2.99.917
[ 57951.198]    Module class: X.Org Video Driver
[ 57951.198]    ABI class: X.Org Video Driver, version 24.0
[ 57951.198] (II) LoadModule: "modesetting"
[ 57951.199] (II) Loading /usr/X11R7/lib/modules/drivers/modesetting_drv.so
[ 57951.202] (II) Module modesetting: vendor="X.Org Foundation"
[ 57951.202]    compiled for 1.20.5, module version = 1.20.5
[ 57951.202]    Module class: X.Org Video Driver
[ 57951.202]    ABI class: X.Org Video Driver, version 24.0
[ 57951.202] (II) LoadModule: "vesa"
[ 57951.204] (II) Loading /usr/X11R7/lib/modules/drivers/vesa_drv.so
[ 57951.208] (II) Module vesa: vendor="X.Org Foundation"
[ 57951.208]    compiled for 1.20.5, module version = 2.4.0
[ 57951.208]    Module class: X.Org Video Driver
[ 57951.208]    ABI class: X.Org Video Driver, version 24.0
[ 57951.208] (II) LoadModule: "wsfb"
[ 57951.209] (II) Loading /usr/X11R7/lib/modules/drivers/wsfb_drv.so
[ 57951.210] (II) Module wsfb: vendor="X.Org Foundation"
[ 57951.210]    compiled for 1.20.5, module version = 0.4.0
[ 57951.210]    ABI class: X.Org Video Driver, version 24.0
[ 57951.210] (II) LoadModule: "mouse"
[ 57951.211] (II) Loading /usr/X11R7/lib/modules/drivers/mouse_drv.so
[ 57951.211] (II) Module mouse: vendor="X.Org Foundation"
[ 57951.211]    compiled for 1.20.5, module version = 1.9.2
[ 57951.211]    Module class: X.Org XInput Driver
[ 57951.211]    ABI class: X.Org XInput driver, version 24.1
[ 57951.211] (II) LoadModule: "kbd"
[ 57951.212] (II) Loading /usr/X11R7/lib/modules/drivers/kbd_drv.so
[ 57951.213] (II) Module kbd: vendor="X.Org Foundation"
[ 57951.213]    compiled for 1.20.5, module version = 1.9.0
[ 57951.213]    Module class: X.Org XInput Driver
[ 57951.213]    ABI class: X.Org XInput driver, version 24.1
[ 57951.213] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
        i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
        915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
        Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
        GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 57951.214] (II) intel: Driver for Intel(R) HD Graphics
[ 57951.214] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 57951.214] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 57951.214] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 57951.214] (II) VESA: driver for VESA chipsets: vesa
[ 57951.214] (II) wsfb: driver for wsdisplay framebuffer: wsfb
[ 57951.214] (--) Using wscons driver on /dev/ttyE4 in pcvt compatibility mode (version 3.32)
[ 57951.214] (--) using VT number 5
[ 57951.231] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20151010
[ 57951.234] (WW) Falling back to old probe method for modesetting
[ 57951.235] (WW) Falling back to old probe method for wsfb
[ 57951.235] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 57951.235] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 510
[ 57951.235] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2; using a maximum of 1 threads
[ 57951.236] (II) intel(0): Creating default Display subsection in Screen section
        "Builtin Default intel Screen 0" for depth/fbbpp 24/32
[ 57951.236] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[ 57951.236] (==) intel(0): RGB weight 888
[ 57951.236] (==) intel(0): Default visual is TrueColor
[ 57951.239] (II) intel(0): Output DP1 has no monitor section
[ 57951.239] (II) intel(0): Enabled output DP1
[ 57951.239] (II) intel(0): Output HDMI1 has no monitor section
[ 57951.240] (II) intel(0): Enabled output HDMI1
[ 57951.240] (II) intel(0): Output DP2 has no monitor section
[ 57951.240] (II) intel(0): Enabled output DP2
[ 57951.240] (II) intel(0): Output HDMI2 has no monitor section
[ 57951.240] (II) intel(0): Enabled output HDMI2
[ 57951.240] (II) intel(0): Output DP3 has no monitor section
[ 57951.240] (II) intel(0): Enabled output DP3
[ 57951.240] (II) intel(0): Output HDMI3 has no monitor section
[ 57951.241] (II) intel(0): Enabled output HDMI3
[ 57951.241] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[ 57951.241] (II) intel(0): Output VIRTUAL1 has no monitor section
[ 57951.241] (II) intel(0): Enabled output VIRTUAL1
[ 57951.241] (--) intel(0): Output HDMI1 using initial mode 1920x1080 on pipe 0
[ 57951.241] (==) intel(0): TearFree enabled
[ 57951.241] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
[ 57951.241] (==) intel(0): DPI set to (96, 96)
[ 57951.241] (II) Loading sub module "dri2"
[ 57951.241] (II) LoadModule: "dri2"
[ 57951.241] (II) Module "dri2" already built-in
[ 57951.241] (II) UnloadModule: "modesetting"
[ 57951.241] (II) Unloading modesetting
[ 57951.241] (II) UnloadModule: "vesa"
[ 57951.242] (II) Unloading vesa
[ 57951.242] (II) UnloadModule: "wsfb"
[ 57951.242] (II) Unloading wsfb
[ 57951.244] (II) intel(0): SNA initialized with Skylake (gen9) backend
[ 57951.244] (==) intel(0): Backing store enabled
[ 57951.244] (==) intel(0): Silken mouse enabled
[ 57951.244] (II) intel(0): HW Cursor enabled
[ 57951.245] (==) intel(0): DPMS enabled
[ 57951.247] (II) intel(0): [DRI2] Setup complete
[ 57951.247] (II) intel(0): [DRI2]   DRI driver: i965
[ 57951.247] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[ 57951.247] (II) intel(0): direct rendering: DRI2 enabled
[ 57951.247] (II) Initializing extension Generic Event Extension
[ 57951.248] (II) Initializing extension SHAPE
[ 57951.248] (II) Initializing extension MIT-SHM
[ 57951.249] (II) Initializing extension XInputExtension
[ 57951.250] (II) Initializing extension XTEST
[ 57951.250] (II) Initializing extension BIG-REQUESTS
[ 57951.251] (II) Initializing extension SYNC
[ 57951.252] (II) Initializing extension XKEYBOARD
[ 57951.252] (II) Initializing extension XC-MISC
[ 57951.253] (II) Initializing extension SECURITY
[ 57951.254] (II) Initializing extension XFIXES
[ 57951.254] (II) Initializing extension XFree86-Bigfont
[ 57951.255] (II) Initializing extension RENDER
[ 57951.256] (II) Initializing extension RANDR
[ 57951.257] (II) Initializing extension COMPOSITE
[ 57951.257] (II) Initializing extension DAMAGE
[ 57951.258] (II) Initializing extension MIT-SCREEN-SAVER
[ 57951.259] (II) Initializing extension DOUBLE-BUFFER
[ 57951.259] (II) Initializing extension RECORD
[ 57951.260] (II) Initializing extension DPMS
[ 57951.261] (II) Initializing extension Present
[ 57951.261] (II) Initializing extension X-Resource
[ 57951.262] (II) Initializing extension XVideo
[ 57951.262] (II) Initializing extension XVideo-MotionCompensation
[ 57951.262] (II) Initializing extension GLX
[ 57951.291] (II) AIGLX: Loaded and initialized i965
[ 57951.291] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 57951.291] (II) Initializing extension XFree86-VidModeExtension
[ 57951.292] (II) Initializing extension XFree86-DGA
[ 57951.293] (II) Initializing extension XFree86-DRI
[ 57951.293] (II) Initializing extension DRI2
[ 57951.303] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 0, position (0, 0), rotation normal, reflection none
[ 57951.303] (II) intel(0): Setting screen physical size to 508 x 285
[ 57951.619] (II) Using input driver 'mouse' for '<default pointer>'
[ 57951.619] (**) Option "CorePointer" "on"
[ 57951.619] (**) <default pointer>: always reports core events
[ 57951.619] (**) <default pointer>: auto calibration enabled
[ 57951.619] (**) <default pointer>: associated screen: 0
[ 57951.619] (WW) <default pointer>: No Device specified, looking for one...
[ 57951.684] (II) <default pointer>: found Device "/dev/wsmouse"
[ 57951.748] (--) <default pointer>: Device: "/dev/wsmouse"
[ 57951.748] (==) <default pointer>: Protocol: "WSMouse"
[ 57951.748] (**) <default pointer>: always reports core events
[ 57951.748] (**) Option "Device" "/dev/wsmouse"
[ 57951.877] (==) <default pointer>: Emulate3Buttons, Emulate3Timeout: 50
[ 57951.877] (**) <default pointer>: ZAxisMapping: buttons 4 and 5
[ 57951.877] (**) <default pointer>: Buttons: 9
[ 57951.877] (II) XINPUT: Adding extended input device "<default pointer>" (type: MOUSE, id 6)
[ 57951.877] (**) <default pointer>: (accel) keeping acceleration scheme 1
[ 57951.878] (**) <default pointer>: (accel) acceleration profile 0
[ 57951.878] (**) <default pointer>: (accel) acceleration factor: 2.000
[ 57951.878] (**) <default pointer>: (accel) acceleration threshold: 4
[ 57951.942] (II) Using input driver 'kbd' for '<default keyboard>'
[ 57951.942] (**) Option "CoreKeyboard" "on"
[ 57951.942] (**) <default keyboard>: always reports core events
[ 57951.942] (**) <default keyboard>: always reports core events
[ 57951.942] (**) Option "Protocol" "standard"
[ 57951.942] (**) Option "XkbRules" "base"
[ 57951.942] (**) Option "XkbModel" "pc105"
[ 57951.942] (**) Option "XkbLayout" "us"
[ 57951.942] (II) XINPUT: Adding extended input device "<default keyboard>" (type: KEYBOARD, id 7)
[ 57953.531] (--) intel(0): HDMI max TMDS frequency 225000KHz
[258626.618] (WW) Got unexpected buttonTimer in state 0
[860010.132] (II) AIGLX: Suspending AIGLX clients for VT switch
[860041.169] (II) AIGLX: Resuming AIGLX clients after VT switch
[860041.203] (II) intel(0): switch to mode 1920x1080@60.0 on HDMI1 using pipe 0, position (0, 0), rotation normal, reflection none
[860041.283] (--) intel(0): HDMI max TMDS frequency 225000KHz

>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Stefan Schaeckeler <schaecsn@gmx.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/56103: i915 crashes kernel
Date: Mon, 18 Oct 2021 22:27:35 -0700 (PDT)

 > From: gnats-admin@netbsd.org
 >
 > Thank you very much for your problem report.
 > It has the internal identification `kern/56103'.
 > The individual assigned to look at your
 > report is: kern-bug-people.
 >
 > >Category:       kern
 > >Responsible:    kern-bug-people
 > >Synopsis:       i915 crashes kernel
 > >Arrival-Date:   Mon Apr 12 04:55:00 +0000 2021
 >

 =46rom a Google search, I learned that this is a common problem on NetBSD.=
  The
 recommended workaround is switching to uxa acceleration. Uxa acceleration =
 works
 for a few hours, days or weeks. Eventually, the uxa driver fails for me in

 ./external/mit/xf86-video-intel/dist/src/uxa/intel_batchbuffer.c with

 [ 26933.347] (EE) intel(0): Failed to submit batch buffer, expect renderin=
 g corruption: Cannot allocate memory.


 I don't see a rendering corruption; this results in multimedia application=
 s
 segfaulting in /usr/X11R7/lib/modules/dri/i965_dri.so. Only a restart of t=
 he X
 server makes multimedia applications work, again. Here is a segfault of ff=
 play:

 $ gdb ffplay -c ffplay.core
 GNU gdb (GDB) 8.3
 ...
 Reading symbols from ffplay...
 [New process 1]
 [New process 16]
 [New process 15]
 [New process 14]
 [New process 13]
 [New process 12]
 [New process 11]
 [New process 10]
 [New process 9]
 [New process 8]
 [New process 7]
 [New process 4]
 [New process 3]
 [New process 2]
 Core was generated by `ffplay'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x000071b08a541007 in gen6_update_renderbuffer_surface (surf_index=3D0=
 , unit=3D0, rb=3D0x71b0a3ba5b00, brw=3D0x71b0a20a6f30)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_w=
 m_surface_state.c:253
 253           .base_level =3D irb->mt_level - irb->mt->first_level,
 [Current thread is 1 (process 1)]

 (gdb) bt
 #0  0x000071b08a541007 in gen6_update_renderbuffer_surface (surf_index=3D0=
 , unit=3D0, rb=3D0x71b0a3ba5b00, brw=3D0x71b0a20a6f30)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_w=
 m_surface_state.c:253
 #1  update_renderbuffer_surfaces (brw=3D0x71b0a20a6f30) at /usr/xsrc/exter=
 nal/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_wm_surface_state.c:1013
 #2  0x000071b08a7e2e04 in check_and_emit_atom (atom=3D0x71b0a20bde18, stat=
 e=3D<synthetic pointer>, brw=3D0x71b0a20a6f30)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_s=
 tate_upload.c:496
 #3  brw_upload_pipeline_state (pipeline=3DBRW_RENDER_PIPELINE, brw=3D0x71b=
 0a20a6f30)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_s=
 tate_upload.c:615
 #4  brw_upload_render_state (brw=3D0x71b0a20a6f30) at /usr/xsrc/external/m=
 it/MesaLib/dist/src/mesa/drivers/dri/i965/brw_state_upload.c:637
 #5  0x000071b08a625f13 in brw_draw_single_prim (indirect=3D0x0, stream=3D0=
 , xfb_obj=3D0x0, prim_id=3D0, prim=3D<optimized out>, ctx=3D0x71b0a20a6f30=
 )
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_d=
 raw.c:987
 #6  brw_draw_prims (ctx=3D0x71b0a20a6f30, prims=3D<optimized out>, nr_prim=
 s=3D1, ib=3D<optimized out>, index_bounds_valid=3D<optimized out>, min_ind=
 ex=3D<optimized out>,
     max_index=3D<optimized out>, gl_xfb_obj=3D0x0, stream=3D0, indirect=3D=
 0x0) at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/brw_=
 draw.c:1107
 #7  0x000071b08a3d0bd5 in vbo_exec_vtx_flush (exec=3Dexec@entry=3D0x71b0a3=
 b48a70, keepUnmapped=3D<optimized out>)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/vbo/vbo_exec_draw.c:39=
 3
 #8  0x000071b08a3d1b72 in vbo_exec_FlushVertices_internal (exec=3D0x71b0a3=
 b48a70, unmap=3D<optimized out>)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/vbo/vbo_exec_api.c:643
 #9  0x000071b08a3e387c in vbo_exec_FlushVertices (ctx=3Dctx@entry=3D0x71b0=
 a20a6f30, flags=3Dflags@entry=3D1)
     at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/vbo/vbo_exec_api.c:125=
 5
 #10 0x000071b08a494835 in clear (no_error=3Dfalse, mask=3D16384, ctx=3D0x7=
 1b0a20a6f30) at /usr/xsrc/external/mit/MesaLib/dist/src/mesa/main/clear.c:=
 146
 #11 _mesa_Clear (mask=3D16384) at /usr/xsrc/external/mit/MesaLib/dist/src/=
 mesa/main/clear.c:242
 #12 0x000071b0a085377a in GL_RunCommandQueue (renderer=3D0x71b0a3baaa00, c=
 md=3D0x71b0a3b63750, vertices=3D0x71b0a41b1800, vertsize=3D<optimized out>=
 )
     at /var/tmp/pkgsrc/devel/SDL2/work/SDL2-2.0.14/src/render/opengl/SDL_r=
 ender_gl.c:1235
 #13 0x000071b0a0847635 in FlushRenderCommands (renderer=3Drenderer@entry=
 =3D0x71b0a3baaa00) at /var/tmp/pkgsrc/devel/SDL2/work/SDL2-2.0.14/src/rend=
 er/SDL_render.c:221
 #14 0x000071b0a084cb79 in SDL_RenderPresent_REAL (renderer=3D0x71b0a3baaa0=
 0) at /var/tmp/pkgsrc/devel/SDL2/work/SDL2-2.0.14/src/render/SDL_render.c:=
 3174
 #15 0x000000000041224c in video_display (is=3Dis@entry=3D0x71b0a18bf600) a=
 t fftools/ffplay.c:1372
 #16 0x0000000000413d20 in video_refresh (opaque=3Dopaque@entry=3D0x71b0a18=
 bf600, remaining_time=3Dremaining_time@entry=3D0x7f7fffe43868) at fftools/=
 ffplay.c:1689
 #17 0x0000000000414bd8 in refresh_loop_wait_event (event=3D0x7f7fffe43870,=
  is=3D0x71b0a18bf600) at fftools/ffplay.c:3245
 #18 event_loop (cur_stream=3D<optimized out>) at fftools/ffplay.c:3285
 #19 main (argc=3D<optimized out>, argv=3D<optimized out>) at fftools/ffpla=
 y.c:3776


 debugging optimized code: this cast is actually irb:

 (gdb) p/x  *((struct intel_renderbuffer *)rb)
 $18 =3D {Base =3D {Base =3D {Mutex =3D {ptm_magic =3D 0x33330003, ptm_erro=
 rcheck =3D 0x0,
         ptm_pad1 =3D {0x0, 0x0, 0x0}, {ptm_ceiling =3D 0x0, ptm_unused =3D=
  0x0}, ptm_pad2 =3D {
           0x0, 0x0, 0x0}, ptm_owner =3D 0x0, ptm_waiters =3D 0x0, ptm_recu=
 rsed =3D 0x0,
         ptm_spare2 =3D 0x0}, ClassID =3D 0x12345678, Name =3D 0x0, Label =
 =3D 0x0,
       RefCount =3D 0x1, Width =3D 0x0, Height =3D 0x0, Depth =3D 0x0, Purg=
 eable =3D 0x0,
       AttachedAnytime =3D 0x0, NeedsFinishRenderTexture =3D 0x0, NumSample=
 s =3D 0x0,
       NumStorageSamples =3D 0x0, InternalFormat =3D 0x1907, _BaseFormat =
 =3D 0x1907,
       Format =3D 0x6, TexImage =3D 0x0, Delete =3D 0x71b08a4fbb71,
       AllocStorage =3D 0x71b08a4fbb60}, Buffer =3D 0x0, Map =3D 0x0, RowSt=
 ride =3D 0x0,
     ColorType =3D 0x0}, mt =3D 0x0, singlesample_mt =3D 0x0, align_wa_mt =
 =3D 0x0,
   mt_level =3D 0x0, mt_layer =3D 0x0, layer_count =3D 0x1, draw_x =3D 0x0,=
  draw_y =3D 0x0,
   need_downsample =3D 0x1, need_map_upsample =3D 0x0, singlesample_mt_is_t=
 mp =3D 0x0,
   need_srgb =3D 0x0}


 unfortunately, irb->mt is 0x0 and so irb->mt->first_level seg-faults in li=
 ne 253:

       .base_level =3D irb->mt_level - irb->mt->first_level,

 Here I gave up. The actual problem is probably anway in

 ./external/mit/xf86-video-intel/dist/src/uxa/intel_batchbuffer.c

 [ 26933.347] (EE) intel(0): Failed to submit batch buffer, expect renderin=
 g corruption: Cannot allocate memory.

 for which I don't have any debugging info - that is very outlandish code.


 A little bit about my hardware

 # lspci -s  00:02.0
 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 510 (rev =
 06) (prog-if 00 [VGA controller])


 $ dmesg | egrep "drm|915|intelfb"
 [     1.053248] i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product =
 1902 (rev. 0x06)
 [     5.098524] kern info: [drm] Memory usable by graphics device =3D 4096=
 M
 [     5.107554] kern info: [drm] Supports vblank timestamp caching Rev 2 (=
 21.10.2013).
 [     5.107554] kern info: [drm] Driver supports precise vblank timestamp =
 query.
 [     5.107554] kern info: [drm] failed to find VBIOS tables
 [     5.108524] i915drmkms0: interrupting at ioapic0 pin 16 (i915drmkms0)
 [     5.138522] kern info: [drm] failed to retrieve link info, disabling e=
 DP
 [     5.258522] intelfb0 at i915drmkms0
 [     5.258522] intelfb0: framebuffer at 0xffffd08066abc000, size 1920x108=
 0, depth 32, stride 7680
 [     5.308522] wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 e=
 mulation), using wskbd0
 [     6.188524] kern info: [drm] RC6 on

  Stefan

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.