Bug 268138 - graphics/drm-510-kmod: i915kms: panic following screen glitches (page fault with linux_enable="YES")
Summary: graphics/drm-510-kmod: i915kms: panic following screen glitches (page fault w...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL: https://www.freshports.org/graphics/d...
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2022-12-03 15:49 UTC by Ruby
Modified: 2023-02-24 23:07 UTC (History)
2 users (show)

See Also:


Attachments
How the graphical bug looks like (5.05 KB, image/png)
2023-02-24 23:02 UTC, Ruby
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruby 2022-12-03 15:49:26 UTC
FreeBSD computer 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC  amd64

panic: page fault

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address	= 0x61
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff80f52807
stack pointer	        = 0x28:0xfffffe008370fb60
frame pointer	        = 0x28:0xfffffe008370fba0
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		= 0 (linuxkpi_short_wq_4)
trap number		= 12
panic: page fault
cpuid = 3
time = 1670070970
KDB: stack backtrace:
#0 0xffffffff80c69465 at kdb_backtrace+0x65
#1 0xffffffff80c1bb1f at vpanic+0x17f
#2 0xffffffff80c1b993 at panic+0x43
#3 0xffffffff810afdf5 at trap_fatal+0x385
#4 0xffffffff810afe4f at trap_pfault+0x4f
#5 0xffffffff81087528 at calltrap+0x8
#6 0xffffffff80f528fd at kmem_free+0x2d
#7 0xffffffff82d7659d at __i915_gpu_coredump_free+0x12d
#8 0xffffffff82d47b59 at intel_gt_handle_error+0xa9
#9 0xffffffff82d33041 at heartbeat+0x2a1
#10 0xffffffff80e6e533 at linux_work_fn+0xe3
#11 0xffffffff80c7da41 at taskqueue_run_locked+0x181
#12 0xffffffff80c7ed52 at taskqueue_thread_loop+0xc2
#13 0xffffffff80bd8a5e at fork_exit+0x7e
#14 0xffffffff8108859e at fork_trampoline+0xe

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
55	/usr/src/sys/amd64/include/pcpu_aux.h: No such file or directory.
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=<optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff80c1b71c in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:487
#3  0xffffffff80c1bb8e in vpanic (fmt=0xffffffff811b4fb9 "%s", 
    ap=<optimized out>) at /usr/src/sys/kern/kern_shutdown.c:920
#4  0xffffffff80c1b993 in panic (fmt=<unavailable>)
    at /usr/src/sys/kern/kern_shutdown.c:844
#5  0xffffffff810afdf5 in trap_fatal (frame=0xfffffe008370faa0, eva=97)
    at /usr/src/sys/amd64/amd64/trap.c:944
#6  0xffffffff810afe4f in trap_pfault (frame=0xfffffe008370faa0, 
    usermode=false, signo=<optimized out>, ucode=<optimized out>)
    at /usr/src/sys/amd64/amd64/trap.c:763
#7  <signal handler called>
#8  vm_page_domain (m=0x0) at /usr/src/sys/vm/vm_page.h:1002
#9  _kmem_unback (object=0xffffffff81d15a30 <kernel_object_store>, 
    addr=addr@entry=18446735283940872192, size=size@entry=4096)
    at /usr/src/sys/vm/vm_kern.c:588
#10 0xffffffff80f528fd in kmem_free (addr=18446735283940872192, size=4096)
    at /usr/src/sys/vm/vm_kern.c:624
#11 0xffffffff82d7659d in __i915_gpu_coredump_free ()
   from /boot/modules/i915kms.ko
#12 0xffffffff82d47b59 in intel_gt_handle_error ()
   from /boot/modules/i915kms.ko
#13 0xffffffff82d33041 in heartbeat () from /boot/modules/i915kms.ko
#14 0xffffffff80e6e533 in linux_work_fn (context=0x0, pending=<optimized out>)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_work.c:299
#15 0xffffffff80c7da41 in taskqueue_run_locked (
    queue=queue@entry=0xfffff800016b3400)
    at /usr/src/sys/kern/subr_taskqueue.c:477
#16 0xffffffff80c7ed52 in taskqueue_thread_loop (arg=<optimized out>, 
    arg@entry=0xfffff8000162bd80) at /usr/src/sys/kern/subr_taskqueue.c:794
#17 0xffffffff80bd8a5e in fork_exit (
    callout=0xffffffff80c7ec90 <taskqueue_thread_loop>, 
    arg=0xfffff8000162bd80, frame=0xfffffe008370ff40)
    at /usr/src/sys/kern/kern_fork.c:1093
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-12-04 15:59:48 UTC
> linux_enabled

Was that a typo (the d) here in Bugzilla, or did you use that in your rc.conf file? 

It should be: 

linux_enable
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-12-04 16:02:24 UTC
Can you tell more about the steps that led to the panic?
Comment 3 Ruby 2022-12-04 16:53:05 UTC
(In reply to Graham Perrin from comment #1)
Sorry, it was a typo
(In reply to Graham Perrin from comment #2)
first i enabled

linux_enable="YES"

then ran

# service linux start

and installed linux_base-c7

# doas pkg install linux_base-c7

after that, i tried to run my linux application, but it failed for some reason so i put it aside, but after a while i started getting kernel panics and the system slowing down.

After every system startup i just logged in, started my xorg server, started my browser and noticed that the screen was glitching for some reason. and after it started to do it more and more it panicked.

I have a Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz with 8 gigabytes of ram, and its a x220 laptop.
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-12-04 17:23:20 UTC
(In reply to Ruby from comment #3)

Thanks. Is your X220 amongst those that have been probed here? 

<https://bsd-hardware.info/?view=search_computer&computer_vendor=Lenovo&computer_model=ThinkPad+X220&computer_year=&computer_type=all&d=FreeBSD#list>

(In reply to Ruby from comment #0)

> 13.1-RELEASE

Are panics reproducible if you update the system? 

(The routine at <https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-security-patches> is not only for security advisories; it's also for errata notices.)
Comment 5 Ruby 2022-12-05 23:55:25 UTC
(In reply to Graham Perrin from comment #4)
I didnt want to just reply to one of the questions, and the second one needs some time to let me figure it out if its going to have the same problem with patches applied.

I have the 42902WG model.

> Are panics reproducible if you update the system? 

I havent got one yet after updating, but there is a lot of graphical glitches that happened before, before i got a kernel panic. The glitches like the screen repetead the same stuff and some places went black in a rectangle.
Comment 6 Paul Dufresne 2023-02-22 23:20:15 UTC
I believe this is the same problem as bug #266315.
Comment 7 Ruby 2023-02-24 23:02:41 UTC
Created attachment 240398 [details]
How the graphical bug looks like
Comment 8 Ruby 2023-02-24 23:07:09 UTC
(In reply to Ruby from comment #7)
After i upgraded to p7 i havent had any problems with any graphical glitches, maybe after every ~2 hours i get something like in the comment #7 or sometimes its just a black box or pixels randomly.
If i can hook this up to a somekind of debugger and how let me now.

Sorry that i send multiple messages, i am new to using this.