Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2023 17:03:06 +0200
From:      Mathias Picker <Mathias.Picker@virtual-earth.de>
To:        =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= <uqs@freebsd.org>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, Shane Ambler <FreeBSD@shaneware.biz>, FreeBSD-STABLE <freebsd-stable@freebsd.org>, stable@freebsd.org
Subject:   =?US-ASCII?Q?Re=3A_-stable_from_today_dumps_core_with_?= =?US-ASCII?Q?drm-510-kmod_and_some_graphical_clients?=
Message-ID:  <C827ABED-05F9-4A53-8DD4-45B27EBA6064@virtual-earth.de>
In-Reply-To: <CAJ9axoSeFLHcXoUir%2BYmnGtCuo8hy6E_D9Fm8gAPOFBAV_zsDg@mail.gmail.com>
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> <CAJ9axoSeFLHcXoUir%2BYmnGtCuo8hy6E_D9Fm8gAPOFBAV_zsDg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 11=2E April 2023 16:17:13 MESZ schrieb "Ulrich Sp=C3=B6rlein" <uqs@freeb=
sd=2Eorg>:
>On Thu, Mar 30, 2023 at 3:29=E2=80=AFPM Mathias Picker <
>Mathias=2EPicker@virtual-earth=2Ede> wrote:
>
>>
>> Cy Schubert <Cy=2ESchubert@cschubert=2Ecom> writes:
>>
>> > On Mon, 27 Mar 2023 23:43:35 +0200
>> > Mathias Picker <Mathias=2EPicker@virtual-earth=2Ede> wrote:
>> >
>> >> Am 27=2E M=C3=A4rz 2023 23:05:35 MESZ schrieb Cy Schubert
>> >> <Cy=2ESchubert@cschubert=2Ecom>:
>> >> >In message
>> >> ><8b47d0a4-a8f1-1841-ee59-3949fe69cbd7@ShaneWare=2EBiz>, 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=2E
>> >> >> >
>> >> >> > I can find no error messages after a reboot=2E
>> >> >> >
>> >> >> > 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=2E
>> >> >> >
>> >> >> > =C3=A2=E2=82=AC=C5=93Demanding=C3=A2=E2=82=AC  means even simpl=
e things like
>> >> >> > qterminal=2E 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=2E
>> >> >> > xedit works fine :)
>> >> >> >
>> >> >> > I have nothing in the logs, I have no idea where to look
>> >> >> > or how to debug
>> >> >> > this=2E
>> >> >> >
>> >> >> > Any ideas, tipps, help greatly apreciated=2E
>> >> >>
>> >> >>
>> >> >> FreeBSD Developers Handbook Chapter 10: Kernel Debugging
>> >> >>
>> >> >> https://docs=2Efreebsd=2Eorg/en/books/developers-handbook/kerneld=
ebug/
>> >> >>
>> >> >> 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=2Econf) 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=2E
>> >> >
>> >> >drm-*-kmod probably needs a rebuild=2E Likely a data structure
>> >> >changed=2E In my
>> >> >experience a simple rebuild of the port solves 90% of
>> >> >drm-*-kmod crash
>> >> >problems=2E
>> >> >
>> >> 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=2E
>> >>
>> >> I switched my swap to non-encrypted and will look if I can get
>> >> any information from the kernel dump tomorrow=2E
>> >>
>> >> Oh, and it's on a Thinkpad X1 Yoga 3rd gen, I just noticed I
>> >> didn't mention this=2E
>> >
>> > It may be worth trying drm-515-kmod as some MFC that works with
>> > 515 and
>> > not 510 may have been committed=2E Linux-KPI commits are the usual
>> > suspects=2E
>> >
>> > I use drm-515 with 14-CURRENT=2E
>>
>> Finally I found the time for a kernel crash dump=2E
>> This is what kgdb says
>>
>> mathiasp:amd64=2Eamd64/sys/GENERIC% sudo kgdb kernel
>> /var/crash/vmcore=2E2
>> GNU gdb (GDB) 13=2E1 [GDB v13=2E1 for FreeBSD]
>> Copyright (C) 2023 Free Software Foundation, Inc=2E
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu=2Eorg/licenses/gpl=2Ehtml>;
>> This is free software: you are free to change and redistribute it=2E
>> There is NO WARRANTY, to the extent permitted by law=2E
>> Type "show copying" and "show warranty" for details=2E
>> This GDB was configured as "x86_64-portbld-freebsd13=2E1"=2E
>> Type "show configuration" for configuration details=2E
>> For bug reporting instructions, please see:
>> <https://www=2Egnu=2Eorg/software/gdb/bugs/>=2E
>> Find the GDB manual and other documentation resources online at:
>>     <http://www=2Egnu=2Eorg/software/gdb/documentation/>=2E
>>
>> For help, type "help"=2E
>> Type "apropos word" to search for commands related to "word"=2E=2E=2E
>> Reading symbols from kernel=2E=2E=2E
>> Reading symbols from
>> /usr/obj/usr/src/amd64=2Eamd64/sys/GENERIC/kernel=2Edebug=2E=2E=2E
>>
>> Unread portion of the kernel message buffer:
>>
>>
>> __curthread () at /usr/src/sys/amd64/include/pcpu_aux=2Eh: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=2Eh:55
>> #1  doadump (textdump=3D<optimized out>) at
>>  /usr/src/sys/kern/kern_shutdown=2Ec:396
>> #2  0xffffffff80c07c2a in kern_reboot (howto=3D260) at
>>  /usr/src/sys/kern/kern_shutdown=2Ec:484
>> #3  0xffffffff80c080ce in vpanic (fmt=3D<optimized out>,
>>  ap=3Dap@entry=3D0xfffffe01341fab50) at
>>  /usr/src/sys/kern/kern_shutdown=2Ec:923
>> #4  0xffffffff80c07f03 in panic (fmt=3D<unavailable>) at
>>  /usr/src/sys/kern/kern_shutdown=2Ec:847
>> #5  0xffffffff810c1fa7 in trap_fatal (frame=3D0xfffffe01341fac40,
>>  eva=3D0) at /usr/src/sys/amd64/amd64/trap=2Ec: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=2Ec:761
>> #7  <signal handler called>
>> #8  0xffffffff84a07067 in shmem_get_pages () from
>>  /boot/modules/i915kms=2Eko
>> #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=2Eko
>> #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=
 in
>> -stable=2E
>>
>> /Mathias
>>
>>
>Any updates here? I just ran into this myself and am very close to just
>installing Linux on my laptop, tbh=2E

515 does not build, but RC6 works fine=2E =20

Have not tried -stable again, too much work currently=E2=80=A6

Good luck,

Mathias


>
>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)=2E
>
>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=2E=2E=2E



Mathias Picker
Gesch=C3=A4ftsf=C3=BChrer
virtual earth Gesellschaft f=C3=BCr Wissens re/pr=C3=A4 sentation mbH
Westendstr=2E 142
80339 M=C3=BCnchen
+4915256178344



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C827ABED-05F9-4A53-8DD4-45B27EBA6064>