Date: Tue, 11 Apr 2023 16:17:13 +0200 From: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= <uqs@freebsd.org> To: Mathias Picker <Mathias.Picker@virtual-earth.de> Cc: Cy Schubert <Cy.Schubert@cschubert.com>, Shane Ambler <FreeBSD@shaneware.biz>, FreeBSD-STABLE <freebsd-stable@freebsd.org>, stable@freebsd.org Subject: Re: -stable from today dumps core with drm-510-kmod and some graphical clients Message-ID: <CAJ9axoSeFLHcXoUir%2BYmnGtCuo8hy6E_D9Fm8gAPOFBAV_zsDg@mail.gmail.com> In-Reply-To: <86o7oa1i6t.fsf@virtual-earth.de> References: <86o7og27eh.fsf@virtual-earth.de> <8b47d0a4-a8f1-1841-ee59-3949fe69cbd7@ShaneWare.Biz> <20230327210535.9ED5A1D7@slippy.cwsent.com> <044587F7-4BA9-4585-A789-F4B53E8D02A2@virtual-earth.de> <20230327145629.3b55eed8@slippy> <86o7oa1i6t.fsf@virtual-earth.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000808d8905f91026c2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 30, 2023 at 3:29=E2=80=AFPM Mathias Picker < Mathias.Picker@virtual-earth.de> wrote: > > Cy Schubert <Cy.Schubert@cschubert.com> writes: > > > On Mon, 27 Mar 2023 23:43:35 +0200 > > Mathias Picker <Mathias.Picker@virtual-earth.de> wrote: > > > >> Am 27. M=C3=A4rz 2023 23:05:35 MESZ schrieb Cy Schubert > >> <Cy.Schubert@cschubert.com>: > >> >In message > >> ><8b47d0a4-a8f1-1841-ee59-3949fe69cbd7@ShaneWare.Biz>, Shane > >> >Ambler w > >> >rites: > >> >> On 26/3/23 01:37, Mathias Picker wrote: > >> >> > > >> >> > Starting sddm works fine, starting my normal session > >> >> > crashes or freezes > >> >> > FreeBSD. > >> >> > > >> >> > I can find no error messages after a reboot. > >> >> > > >> >> > I found out, that I can start xterm or emacs (exwm) > >> >> > without problems, > >> >> > xrandr works with external screen, but once I start > >> >> > anything more > >> >> > demanding (I guess demanding of the GPU) everything > >> >> > freezes or FreeBSD > >> >> > even reboots. > >> >> > > >> >> > =C3=A2=E2=82=AC=C5=93Demanding=C3=A2=E2=82=AC means even simple = things like > >> >> > qterminal. I tried firefox an > >> >> d > >> >> > blender and then I had it with the reboots and > >> >> > didn=C3=A2=E2=82=AC=E2=84=A2t try anything else. > >> >> > xedit works fine :) > >> >> > > >> >> > I have nothing in the logs, I have no idea where to look > >> >> > or how to debug > >> >> > this. > >> >> > > >> >> > Any ideas, tipps, help greatly apreciated. > >> >> > >> >> > >> >> FreeBSD Developers Handbook Chapter 10: Kernel Debugging > >> >> > >> >> https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/ > >> >> > >> >> Running stable, kernel dumps may already be enabled, look in > >> >> /var/crash > >> >> > >> >> By enabling a kernel dump when it panics (dumpdev=3D"AUTO" in > >> >> rc.conf) the > >> >> kernel core is saved to swap space, then on reboot gets > >> >> copied to > >> >> dumpdir (/var/crash) where you can then use kgdb (from > >> >> devel/gdb) to get > >> >> a stack trace to find where the panic happened. > >> > > >> >drm-*-kmod probably needs a rebuild. Likely a data structure > >> >changed. In my > >> >experience a simple rebuild of the port solves 90% of > >> >drm-*-kmod crash > >> >problems. > >> > > >> Hi Cy, > >> > >> sorry I didn't mention that, but I did rebuild drm-kmod, I > >> actually do it after every new kernel build, just to be on the > >> safe side. > >> > >> I switched my swap to non-encrypted and will look if I can get > >> any information from the kernel dump tomorrow. > >> > >> Oh, and it's on a Thinkpad X1 Yoga 3rd gen, I just noticed I > >> didn't mention this. > > > > It may be worth trying drm-515-kmod as some MFC that works with > > 515 and > > not 510 may have been committed. Linux-KPI commits are the usual > > suspects. > > > > I use drm-515 with 14-CURRENT. > > Finally I found the time for a kernel crash dump. > This is what kgdb says > > mathiasp:amd64.amd64/sys/GENERIC% sudo kgdb kernel > /var/crash/vmcore.2 > GNU gdb (GDB) 13.1 [GDB v13.1 for FreeBSD] > Copyright (C) 2023 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.1". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <https://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 kernel... > Reading symbols from > /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug... > > Unread portion of the kernel message buffer: > > > __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > 55 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" > (offsetof(struct pcpu, > (kgdb) backtrace > #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > #1 doadump (textdump=3D<optimized out>) at > /usr/src/sys/kern/kern_shutdown.c:396 > #2 0xffffffff80c07c2a in kern_reboot (howto=3D260) at > /usr/src/sys/kern/kern_shutdown.c:484 > #3 0xffffffff80c080ce in vpanic (fmt=3D<optimized out>, > ap=3Dap@entry=3D0xfffffe01341fab50) at > /usr/src/sys/kern/kern_shutdown.c:923 > #4 0xffffffff80c07f03 in panic (fmt=3D<unavailable>) at > /usr/src/sys/kern/kern_shutdown.c:847 > #5 0xffffffff810c1fa7 in trap_fatal (frame=3D0xfffffe01341fac40, > eva=3D0) at /usr/src/sys/amd64/amd64/trap.c:942 > #6 0xffffffff810c1fff in trap_pfault (frame=3D0xfffffe01341fac40, > usermode=3Dfalse, signo=3D<optimized out>, ucode=3D<optimized out>) > at /usr/src/sys/amd64/amd64/trap.c:761 > #7 <signal handler called> > #8 0xffffffff84a07067 in shmem_get_pages () from > /boot/modules/i915kms.ko > #9 0x0000000300000015 in ?? () > #10 0x0000000000000060 in ?? () > #11 0x0000000000000060 in ?? () > #12 0x0000000000060000 in ?? () > #13 0xfffffe00dc365a80 in ?? () > #14 0xfffff00100000060 in ?? () > #15 0xfffff8003e270c00 in ?? () > #16 0x00000000fffff000 in ?? () > #17 0xfffff8002138fc20 in ?? () > #18 0xfffffe00dc365a80 in ?? () > #19 0x0000000000000060 in ?? () > #20 0xfffff8003e270c00 in ?? () > #21 0x0000000000000060 in ?? () > #22 0xfffffe0131e0fc80 in ?? () > #23 0xfffffe01341fade0 in ?? () > #24 0xffffffff84a07596 in shmem_pwrite () from > /boot/modules/i915kms.ko > #25 0x0000000000000000 in ?? () > (kgdb) > > > Anything else I can do to help? > > I=E2=80=99m now building drm-515-kmod, let=E2=80=99s see how that works i= n > -stable. > > /Mathias > > Any updates here? I just ran into this myself and am very close to just installing Linux on my laptop, tbh. I've rebuilt stable/13 today, then rebuilt the 510-kmod (because the 515-kmod doesn't even build) and pretty much anything that's not an XTerm will panic/reboot the machine (a Thinkpad T490 with Intel GPU). dmesg got this to say: Fatal trap 12: page fault while in kernel mode cpuid =3D 1; apic id =3D 02 fault virtual address =3D 0x0 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff84430626 stack pointer =3D 0x28:0xfffffe0140c83cf0 frame pointer =3D 0x28:0xfffffe0140c83d70 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 0 (i915-userptr-acquir) trap number =3D 12 panic: page fault cpuid =3D 1 time =3D 1681221523 KDB: stack backtrace: #0 0xffffffff80c5fc15 at kdb_backtrace+0x65 #1 0xffffffff80c12e02 at vpanic+0x152 #2 0xffffffff80c12ca3 at panic+0x43 #3 0xffffffff810d1577 at trap_fatal+0x387 #4 0xffffffff810d15cf at trap_pfault+0x4f #5 0xffffffff810a8568 at calltrap+0x8 #6 0xffffffff84430c02 at __i915_gem_userptr_get_pages_worker+0x1f2 #7 0xffffffff80e80883 at linux_work_fn+0xe3 #8 0xffffffff80c746f1 at taskqueue_run_locked+0x181 #9 0xffffffff80c759b3 at taskqueue_thread_loop+0xc3 #10 0xffffffff80bcf55d at fork_exit+0x7d #11 0xffffffff810a95de at fork_trampoline+0xe It apparently dumps core, will have to reacquaint myself with how to poke at this some more... --000000000000808d8905f91026c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Thu, Mar 30, 2023 at 3:29=E2=80=AFPM M= athias Picker <<a href=3D"mailto:Mathias.Picker@virtual-earth.de">Mathia= s.Picker@virtual-earth.de</a>> wrote:<br></div><div class=3D"gmail_quote= "><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde= r-left:1px solid rgb(204,204,204);padding-left:1ex"><br> Cy Schubert <<a href=3D"mailto:Cy.Schubert@cschubert.com" target=3D"_bla= nk">Cy.Schubert@cschubert.com</a>> writes:<br> <br> > On Mon, 27 Mar 2023 23:43:35 +0200<br> > Mathias Picker <<a href=3D"mailto:Mathias.Picker@virtual-earth.de" = target=3D"_blank">Mathias.Picker@virtual-earth.de</a>> wrote:<br> ><br> >> Am 27. M=C3=A4rz 2023 23:05:35 MESZ schrieb Cy Schubert <br> >> <<a href=3D"mailto:Cy.Schubert@cschubert.com" target=3D"_blank"= >Cy.Schubert@cschubert.com</a>>:<br> >> >In message <br> >> ><8b47d0a4-a8f1-1841-ee59-3949fe69cbd7@ShaneWare.Biz>, Sh= ane <br> >> >Ambler w<br> >> >rites:=C2=A0 <br> >> >> On 26/3/23 01:37, Mathias Picker wrote:=C2=A0 <br> >> >> > <br> >> >> > Starting sddm works fine, starting my normal session= <br> >> >> > crashes or freezes<br> >> >> > FreeBSD.<br> >> >> > <br> >> >> > I can find no error messages after a reboot.<br> >> >> > <br> >> >> > I found out, that I can start xterm or emacs (exwm) = <br> >> >> > without problems,<br> >> >> > xrandr works with external screen, but once I start = <br> >> >> > anything more<br> >> >> > demanding (I guess demanding of the GPU) everything = <br> >> >> > freezes or FreeBSD<br> >> >> > even reboots.<br> >> >> > <br> >> >> > =C3=A2=E2=82=AC=C5=93Demanding=C3=A2=E2=82=AC=C2=A0 = means even simple things like <br> >> >> > qterminal. I tried firefox an=C2=A0 <br> >> >> d=C2=A0 <br> >> >> > blender and then I had it with the reboots and <br> >> >> > didn=C3=A2=E2=82=AC=E2=84=A2t try anything else.<br> >> >> > xedit works fine :)<br> >> >> > <br> >> >> > I have nothing in the logs, I have no idea where to = look <br> >> >> > or how to debug<br> >> >> > this.<br> >> >> > <br> >> >> > Any ideas, tipps, help greatly apreciated.=C2=A0 <br= > >> >><br> >> >><br> >> >> FreeBSD Developers Handbook Chapter 10: Kernel Debugging<= br> >> >><br> >> >> <a href=3D"https://docs.freebsd.org/en/books/developers-h= andbook/kerneldebug/" rel=3D"noreferrer" target=3D"_blank">https://docs.fre= ebsd.org/en/books/developers-handbook/kerneldebug/</a><br> >> >><br> >> >> Running stable, kernel dumps may already be enabled, look= in <br> >> >> /var/crash<br> >> >><br> >> >> By enabling a kernel dump when it panics (dumpdev=3D"= ;AUTO" in <br> >> >> rc.conf) the<br> >> >> kernel core is saved to swap space, then on reboot gets <= br> >> >> copied to<br> >> >> dumpdir (/var/crash) where you can then use kgdb (from <b= r> >> >> devel/gdb) to get<br> >> >> a stack trace to find where the panic happened.=C2=A0 <br= > >> ><br> >> >drm-*-kmod probably needs a rebuild. Likely a data structure <= br> >> >changed. In my <br> >> >experience a simple rebuild of the port solves 90% of <br> >> >drm-*-kmod crash <br> >> >problems.<br> >> >=C2=A0 <br> >> Hi Cy,<br> >> <br> >> sorry I didn't mention that, but I did rebuild drm-kmod, I <br= > >> actually do it after every new kernel build, just to be on the <br= > >> safe side.<br> >> <br> >> I switched my swap to non-encrypted and will look if I can get <br= > >> any information from the kernel dump tomorrow.<br> >> <br> >> Oh, and it's on a Thinkpad X1 Yoga 3rd gen, I just noticed I <= br> >> didn't mention this.<br> ><br> > It may be worth trying drm-515-kmod as some MFC that works with <br> > 515 and<br> > not 510 may have been committed. Linux-KPI commits are the usual<br> > suspects.<br> ><br> > I use drm-515 with 14-CURRENT.<br> <br> Finally I found the time for a kernel crash dump.<br> This is what kgdb says<br> <br> mathiasp:amd64.amd64/sys/GENERIC% sudo kgdb kernel <br> /var/crash/vmcore.2 <br> GNU gdb (GDB) 13.1 [GDB v13.1 for FreeBSD]<br> Copyright (C) 2023 Free Software Foundation, Inc.<br> License GPLv3+: GNU GPL version 3 or later <br> <<a href=3D"http://gnu.org/licenses/gpl.html" rel=3D"noreferrer" target= =3D"_blank">http://gnu.org/licenses/gpl.html</a>><br> This is free software: you are free to change and redistribute it.<br> There is NO WARRANTY, to the extent permitted by law.<br> Type "show copying" and "show warranty" for details.<br= > This GDB was configured as "x86_64-portbld-freebsd13.1".<br> Type "show configuration" for configuration details.<br> For bug reporting instructions, please see:<br> <<a href=3D"https://www.gnu.org/software/gdb/bugs/" rel=3D"noreferrer" t= arget=3D"_blank">https://www.gnu.org/software/gdb/bugs/</a>>.<br> Find the GDB manual and other documentation resources online at:<br> =C2=A0 =C2=A0 <<a href=3D"http://www.gnu.org/software/gdb/documentation/= " rel=3D"noreferrer" target=3D"_blank">http://www.gnu.org/software/gdb/docu= mentation/</a>>.<br> <br> For help, type "help".<br> Type "apropos word" to search for commands related to "word&= quot;...<br> Reading symbols from kernel...<br> Reading symbols from <br> /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug...<br> <br> Unread portion of the kernel message buffer:<br> <br> <br> __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55<br> 55=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __asm("movq %%gs:%P= 1,%0" : "=3Dr" (td) : "n" <br> (offsetof(struct pcpu,<br> (kgdb) backtrace<br> #0=C2=A0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55<br> #1=C2=A0 doadump (textdump=3D<optimized out>) at <br> =C2=A0/usr/src/sys/kern/kern_shutdown.c:396<br> #2=C2=A0 0xffffffff80c07c2a in kern_reboot (howto=3D260) at <br> =C2=A0/usr/src/sys/kern/kern_shutdown.c:484<br> #3=C2=A0 0xffffffff80c080ce in vpanic (fmt=3D<optimized out>, <br> =C2=A0ap=3Dap@entry=3D0xfffffe01341fab50) at <br> =C2=A0/usr/src/sys/kern/kern_shutdown.c:923<br> #4=C2=A0 0xffffffff80c07f03 in panic (fmt=3D<unavailable>) at <br> =C2=A0/usr/src/sys/kern/kern_shutdown.c:847<br> #5=C2=A0 0xffffffff810c1fa7 in trap_fatal (frame=3D0xfffffe01341fac40, <br> =C2=A0eva=3D0) at /usr/src/sys/amd64/amd64/trap.c:942<br> #6=C2=A0 0xffffffff810c1fff in trap_pfault (frame=3D0xfffffe01341fac40, <br= > =C2=A0usermode=3Dfalse, signo=3D<optimized out>, ucode=3D<optimize= d out>)<br> =C2=A0 =C2=A0 at /usr/src/sys/amd64/amd64/trap.c:761<br> #7=C2=A0 <signal handler called><br> #8=C2=A0 0xffffffff84a07067 in shmem_get_pages () from <br> =C2=A0/boot/modules/i915kms.ko<br> #9=C2=A0 0x0000000300000015 in ?? ()<br> #10 0x0000000000000060 in ?? ()<br> #11 0x0000000000000060 in ?? ()<br> #12 0x0000000000060000 in ?? ()<br> #13 0xfffffe00dc365a80 in ?? ()<br> #14 0xfffff00100000060 in ?? ()<br> #15 0xfffff8003e270c00 in ?? ()<br> #16 0x00000000fffff000 in ?? ()<br> #17 0xfffff8002138fc20 in ?? ()<br> #18 0xfffffe00dc365a80 in ?? ()<br> #19 0x0000000000000060 in ?? ()<br> #20 0xfffff8003e270c00 in ?? ()<br> #21 0x0000000000000060 in ?? ()<br> #22 0xfffffe0131e0fc80 in ?? ()<br> #23 0xfffffe01341fade0 in ?? ()<br> #24 0xffffffff84a07596 in shmem_pwrite () from <br> =C2=A0/boot/modules/i915kms.ko<br> #25 0x0000000000000000 in ?? ()<br> (kgdb) <br> <br> <br> Anything else I can do to help?<br> <br> I=E2=80=99m now building drm-515-kmod, let=E2=80=99s see how that works in = <br> -stable.<br> <br> /Mathias<br><br></blockquote><div><br></div><div>Any updates here? I just r= an into this myself and am very close to just installing Linux on my laptop= , tbh.</div><div><br></div><div>I've rebuilt stable/13 today, then rebu= ilt the 510-kmod (because the 515-kmod doesn't even build) and pretty m= uch anything that's not an XTerm will panic/reboot the machine (a Think= pad T490 with Intel GPU).=C2=A0</div><div><br></div><div>dmesg got this to = say:</div><div><br></div><div>Fatal trap 12: page fault while in kernel mod= e<br>cpuid =3D 1; apic id =3D 02<br>fault virtual address =C2=A0 =3D 0x0<br= >fault code =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D supervisor = read data, page not present<br>instruction pointer =C2=A0 =C2=A0 =3D 0x20:0= xffffffff84430626<br>stack pointer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 0= x28:0xfffffe0140c83cf0<br>frame pointer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D 0x28:0xfffffe0140c83d70<br>code segment =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D base 0x0, limit 0xfffff, type 0x1b<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D DPL 0, p= res 1, long 1, def32 0, gran 1<br>processor eflags =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D interrupt enabled, resume, IOPL =3D 0<br>current process =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =3D 0 (i915-userptr-acquir)<br>trap number =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 12<br>panic: page fault<br>cpuid =3D 1<br>t= ime =3D 1681221523<br>KDB: stack backtrace:<br>#0 0xffffffff80c5fc15 at kdb= _backtrace+0x65<br>#1 0xffffffff80c12e02 at vpanic+0x152<br>#2 0xffffffff80= c12ca3 at panic+0x43<br>#3 0xffffffff810d1577 at trap_fatal+0x387<br>#4 0xf= fffffff810d15cf at trap_pfault+0x4f<br>#5 0xffffffff810a8568 at calltrap+0x= 8<br>#6 0xffffffff84430c02 at __i915_gem_userptr_get_pages_worker+0x1f2<br>= #7 0xffffffff80e80883 at linux_work_fn+0xe3<br>#8 0xffffffff80c746f1 at tas= kqueue_run_locked+0x181<br>#9 0xffffffff80c759b3 at taskqueue_thread_loop+0= xc3<br>#10 0xffffffff80bcf55d at fork_exit+0x7d<br>#11 0xffffffff810a95de a= t fork_trampoline+0xe<br></div><div><br></div><div>It apparently dumps core= , will have to reacquaint myself with how to poke at this some more...</div= ></div></div> --000000000000808d8905f91026c2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ9axoSeFLHcXoUir%2BYmnGtCuo8hy6E_D9Fm8gAPOFBAV_zsDg>