Open johalun opened 5 years ago
Another random panic from the same user
#0 doadump () at src/sys/amd64/include/pcpu.h:246
246 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n"
(OFFSETOF_CURTHREAD));
(kgdb) #0 doadump () at src/sys/amd64/include/pcpu.h:246
#1 0xffffffff80785208 in kern_reboot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:479
#2 0xffffffff80785666 in vpanic (fmt=<value optimized out>,
ap=<value optimized out>) at /usr/src/sys/kern/kern_shutdown.c:905
#3 0xffffffff807854a3 in panic (fmt=<value optimized out>)
at /usr/src/sys/kern/kern_shutdown.c:832
#4 0xffffffff80ab4916 in trap_fatal (frame=0xfffffe009ad56430, eva=1)
at /usr/src/sys/amd64/amd64/trap.c:946
#5 0xffffffff80ab4cc9 in trap_pfault (frame=0xfffffe009ad56430,
usermode=0)
at src/sys/amd64/include/cpufunc.h:423
#6 0xffffffff80ab404e in trap (frame=0xfffffe009ad56430)
at /usr/src/sys/amd64/amd64/trap.c:441
#7 0xffffffff80a8e745 in calltrap ()
at /usr/src/sys/amd64/amd64/exception.S:232
#8 0xffffffff819ba4b1 in drm_mm_remove_node () from
/boot/modules/drm.ko
#9 0xffffffff81a346ac in ttm_bo_man_put_node () from
/boot/modules/ttm.ko
#10 0xffffffff81a3c510 in ttm_bo_glob () from /boot/modules/ttm.ko
#11 0xfffffe00999fa830 in ?? ()
#12 0xfffffe009ad565a0 in ?? ()
#13 0xffffffff81a336b1 in ttm_bo_cleanup_refs_or_queue ()
from /boot/modules/ttm.ko
Previous frame identical to this frame (corrupt stack?)
Current language: auto; currently minimal
(kgdb)
It's panicking on 12.0 as well. I use drm-fbsd11.2-kmod as workaround, but I fear that it will stop on recent versions eventually.
I think I'm having the same problem with drm-fbsd-12.0-kmod on 12-STABLE. No panic with drm-fbsd-11.2-kmod. It happens on two different computers with the same Radeon HD 7450 card (it's not supported by the amdgpu driver).
I had filled this bug report about this before: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237544
Fatal trap 9: general protection fault while in kernel mode
cpuid = 1; apic id = 01
instruction pointer = 0x20:0xffffffff8345e1ca
stack pointer = 0x28:0xfffffe0099f7a1f0
frame pointer = 0x28:0xfffffe0099f7a220
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 3
current process = 1952 (X:rcs0)
trap number = 9
panic: general protection fault
cpuid = 1
time = 1563378044
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0099f79f00
vpanic() at vpanic+0x19d/frame 0xfffffe0099f79f50
panic() at panic+0x43/frame 0xfffffe0099f79fb0
trap_fatal() at trap_fatal+0x39c/frame 0xfffffe0099f7a010
trap() at trap+0x6c/frame 0xfffffe0099f7a120
calltrap() at calltrap+0x8/frame 0xfffffe0099f7a120
--- trap 0x9, rip = 0xffffffff8345e1ca, rsp = 0xfffffe0099f7a1f0, rbp = 0xfffffe0099f7a220 ---
radeon_sync_resv() at radeon_sync_resv+0x13a/frame 0xfffffe0099f7a220
radeon_cs_ioctl() at radeon_cs_ioctl+0xa45/frame 0xfffffe0099f7a6a0
drm_ioctl_kernel() at drm_ioctl_kernel+0xf5/frame 0xfffffe0099f7a6f0
drm_ioctl() at drm_ioctl+0x27f/frame 0xfffffe0099f7a7e0
linux_file_ioctl() at linux_file_ioctl+0x299/frame 0xfffffe0099f7a840
kern_ioctl() at kern_ioctl+0x28a/frame 0xfffffe0099f7a8b0
sys_ioctl() at sys_ioctl+0x15d/frame 0xfffffe0099f7a980
amd64_syscall() at amd64_syscall+0x2bb/frame 0xfffffe0099f7aab0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0099f7aab0
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x800ce331a, rsp = 0x7fffdfffdeb8, rbp = 0x7fffdfffdee0 ---
KDB: enter: panic
Uptime: 6h2m12s
Dumping 1658 out of 16270 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%
__curthread () at /usr/src/sys/amd64/include/pcpu.h:246
246 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (OFFSETOF_CURTHREAD));
(kgdb) #0 __curthread () at /usr/src/sys/amd64/include/pcpu.h:246
#1 doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:392
#2 0xffffffff80bca900 in kern_reboot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:479
#3 0xffffffff80bcad79 in vpanic (fmt=<optimized out>, ap=<optimized out>)
at /usr/src/sys/kern/kern_shutdown.c:905
#4 0xffffffff80bcaab3 in panic (fmt=<unavailable>)
at /usr/src/sys/kern/kern_shutdown.c:832
#5 0xffffffff81099ffc in trap_fatal (frame=0xfffffe0099f7a130, eva=0)
at /usr/src/sys/amd64/amd64/trap.c:943
#6 0xffffffff810993fc in trap (frame=0xfffffe0099f7a130)
at /usr/src/sys/amd64/amd64/trap.c:221
#7 <signal handler called>
#8 0xffffffff8345e1ca in radeon_sync_resv () from /boot/modules/radeonkms.ko
#9 0xffffffff834393b5 in radeon_cs_ioctl () from /boot/modules/radeonkms.ko
#10 0xffffffff83532605 in drm_ioctl_kernel () from /boot/modules/drm.ko
#11 0xffffffff8353289f in drm_ioctl () from /boot/modules/drm.ko
#12 0xffffffff83574e09 in linux_file_ioctl_sub (fp=<optimized out>,
filp=<optimized out>, fop=<optimized out>, cmd=<optimized out>, data=0x0,
td=<optimized out>)
at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:967
#13 linux_file_ioctl (fp=<optimized out>, cmd=<optimized out>,
data=<optimized out>, cred=<optimized out>, td=<optimized out>)
at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:1560
#14 0xffffffff80c3adba in fo_ioctl (fp=<optimized out>, com=<optimized out>,
data=0x2b8, active_cred=0x0, td=<optimized out>)
at /usr/src/sys/sys/file.h:333
#15 kern_ioctl (td=<optimized out>, fd=<optimized out>, com=3223348326,
data=0x2b8 <error: Cannot access memory at address 0x2b8>)
at /usr/src/sys/kern/sys_generic.c:800
#16 0xffffffff80c3aabd in sys_ioctl (td=0xfffff80091ac1000,
uap=0xfffff80091ac13c8) at /usr/src/sys/kern/sys_generic.c:712
#17 0xffffffff8109ab2b in syscallenter (td=0xfffff80091ac1000)
at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:144
#18 amd64_syscall (td=0xfffff80091ac1000, traced=0)
at /usr/src/sys/amd64/amd64/trap.c:1180
#19 <signal handler called>
#20 0x0000000800ce331a in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdfffdeb8
(kgdb)
HP EliteBook 8570p
grahamperrin@momh167-gjp4-8570p:~ % date ; uname -v
Wed 17 Jul 2019 16:48:30 BST
FreeBSD 13.0-CURRENT r350027 GENERIC
grahamperrin@momh167-gjp4-8570p:~ % pkg query '%o %v %R' gpu-firmware-kmod drm-kmod drm-current-kmod xf86-video-ati
graphics/gpu-firmware-kmod g20190620 unknown-repository
graphics/drm-kmod g20190710 poudriere
graphics/drm-current-kmod 4.16.g20190710 poudriere
x11-drivers/xf86-video-ati 19.0.1,1 FreeBSD
grahamperrin@momh167-gjp4-8570p:~ % pciconf -lv | grep -B 3 -A 1 -i display
vgapci0@pci0:1:0:0: class=0x030000 card=0x17a9103c chip=0x68411002 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Thames [Radeon HD 7550M/7570M/7650M]'
class = display
subclass = VGA
grahamperrin@momh167-gjp4-8570p:~ %
KDE Plasma Version: 5.16.3 KDE Frameworks Version: 5.60.0 Qt Version: 5.12.2 Kernel Version: 13.0-CURRENT OS Type: 64-bit Processors: 4 × ACPI CPU Memory: 15.9 GiB of RAM
tl;dr panics with drm-devel-kmod
and drm-current-kmod
so I'll step down to drm-legacy-kmod
(I know, legacy is not intended for use with this hardware but I've had good results with it in the past …)
Today I tested drm-current-kmod from shortly after 10:42 (time of installation) until 17:12 (time of panic).
If it helps, at the time of the panic:
Files set aside, following the panic, include copies of:
llvm80-8.0.1_3.log
(modified 17:12:12)llvm70-7.0.1_4.log
(modified 17:12:14). An overview:
$ date ; uname -v
Sat 19 Oct 2019 17:19:45 BST
FreeBSD 13.0-CURRENT #34 r353731: Sat Oct 19 00:08:02 BST 2019 root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
$ bectl list
BE Active Mountpoint Space Created
r350684 - - 1.66M 2019-08-07 19:01
r352657 - - 1.32M 2019-09-24 20:45
r352840 - - 10.6G 2019-09-28 11:34
r352942 - - 17.7M 2019-10-01 22:03
r352942a - - 3.06G 2019-10-02 16:58
r352942b - - 130M 2019-10-04 01:09
r352942c - - 1.98M 2019-10-06 10:23
r352942d - - 18.7M 2019-10-16 18:39
r353731 NR / 123G 2019-10-18 15:28
$ grep radeon /etc/rc.conf
# kld_list="/boot/modules/radeonkms.ko"
kld_list="radeonkms"
$ pkg query '%o %v %R' drm-kmod drm-current-kmod gpu-firmware-kmod xf86-video-ati
graphics/drm-kmod g20190710 poudriere
graphics/drm-current-kmod 4.16.g20190927 poudriere
graphics/gpu-firmware-kmod g20191015 unknown-repository
x11-drivers/xf86-video-ati 19.0.1,1 FreeBSD
$ pkg info drm-current-kmod | grep Installed
Installed on : Sat Oct 19 10:42:40 2019 BST
$ sudo ls -hlrt /var/crash
grahamperrin's password:
total 12874848
-rw-r--r-- 1 root wheel 5B 13 Dec 2018 minfree
-rw-r--r-- 1 root wheel 451K 2 Aug 08:58 core.txt.7
-rw------- 1 root wheel 442B 25 Sep 09:27 info.6
-rw------- 1 root wheel 1.3G 25 Sep 09:28 vmcore.6
-rw-r--r-- 1 root wheel 154K 25 Sep 09:29 core.txt.6
-rw------- 1 root wheel 399B 27 Sep 09:48 info.8
-rw------- 1 root wheel 1.6G 27 Sep 09:49 vmcore.8
-rw-r--r-- 1 root wheel 467K 27 Sep 09:49 core.txt.8
-rw------- 1 root wheel 487B 6 Oct 09:11 info.9
-rw------- 1 root wheel 4.2G 6 Oct 09:12 vmcore.9
-rw-r--r-- 1 root wheel 689K 6 Oct 09:13 core.txt.9
-rw------- 1 root wheel 487B 7 Oct 21:54 info.0
-rw------- 1 root wheel 2.3G 7 Oct 21:54 vmcore.0
-rw-r--r-- 1 root wheel 569K 7 Oct 21:55 core.txt.0
-rw------- 1 root wheel 501B 7 Oct 23:02 info.1
-rw------- 1 root wheel 2.1G 7 Oct 23:03 vmcore.1
-rw-r--r-- 1 root wheel 609K 7 Oct 23:03 core.txt.1
-rw------- 1 root wheel 487B 13 Oct 09:21 info.2
-rw------- 1 root wheel 2.5G 13 Oct 09:23 vmcore.2
-rw-r--r-- 1 root wheel 399K 13 Oct 09:23 core.txt.2
-rw------- 1 root wheel 488B 17 Oct 11:58 info.3
-rw------- 1 root wheel 4.5G 17 Oct 12:01 vmcore.3
-rw-r--r-- 1 root wheel 600K 17 Oct 12:02 core.txt.3
-rw------- 1 root wheel 488B 17 Oct 13:01 info.4
-rw------- 1 root wheel 1.8G 17 Oct 13:02 vmcore.4
-rw-r--r-- 1 root wheel 437K 17 Oct 13:03 core.txt.4
-rw-r--r-- 1 root wheel 2B 19 Oct 17:14 bounds
-rw------- 1 root wheel 488B 19 Oct 17:14 info.5
-rw------- 1 root wheel 3.0G 19 Oct 17:15 vmcore.5
lrwxr-xr-x 1 root wheel 6B 19 Oct 17:15 info.last -> info.5
lrwxr-xr-x 1 root wheel 8B 19 Oct 17:15 vmcore.last -> vmcore.5
-rw-r--r-- 1 root wheel 576K 19 Oct 17:16 core.txt.5
$ sudo cat /var/crash/info.5
Dump header from device: /dev/ada0p3
Architecture: amd64
Architecture Version: 2
Dump Length: 3210235904
Blocksize: 512
Compression: none
Dumptime: Sat Oct 19 17:12:18 2019
Hostname: momh167-gjp4-8570p
Magic: FreeBSD Kernel Dump
Version String: FreeBSD 13.0-CURRENT #34 r353731: Sat Oct 19 00:08:02 BST 2019
root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
Panic String: page fault
Dump Parity: 4245149287
Bounds: 5
Dump Status: good
$
$ sudo sed -i '' 's/kld_list="radeonkms"/#\ kld_list="radeonkms"/' /etc/rc.conf
grahamperrin's password:
$ sudo sysrc kld_list="/boot/modules/radeonkms.ko"
kld_list: -> /boot/modules/radeonkms.ko
$ grep radeon /etc/rc.conf
# kld_list="/boot/modules/radeonkms.ko"
# kld_list="radeonkms"
kld_list="/boot/modules/radeonkms.ko"
$
$ sudo rm /boot/modules/radeonkms.ko && sudo rm /boot/kernel/radeonkms.ko && sudo pkg install drm-legacy-kmod xf86-video-ati-legacy
rm: /boot/kernel/radeonkms.ko: No such file or directory
$ sudo rm /boot/modules/radeonkms.ko && sudo pkg install drm-legacy-kmod xf86-video-ati-legacy
rm: /boot/modules/radeonkms.ko: No such file or directory
$ sudo pkg install drm-legacy-kmod xf86-video-ati-legacy
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
drm-legacy-kmod: g20190910 [poudriere]
xf86-video-ati-legacy: 7.9.0_3,1 [FreeBSD]
Number of packages to be installed: 2
The process will require 4 MiB more space.
126 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching xf86-video-ati-legacy-7.9.0_3,1.txz: 100% 126 KiB 64.6kB/s 00:02
Checking integrity... done (2 conflicting)
- drm-legacy-kmod-g20190910 [poudriere] conflicts with drm-current-kmod-4.16.g20190927 [installed] on /boot/modules/drm.ko
- xf86-video-ati-legacy-7.9.0_3,1 [FreeBSD] conflicts with xf86-video-ati-19.0.1,1 [installed] on /usr/local/lib/xorg/modules/drivers/ati_drv.so
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 5 package(s) will be affected (of 0 checked):
Installed packages to be REMOVED:
drm-kmod-g20190710
xf86-video-ati-19.0.1,1
drm-current-kmod-4.16.g20190927
New packages to be INSTALLED:
drm-legacy-kmod: g20190910 [poudriere]
xf86-video-ati-legacy: 7.9.0_3,1 [FreeBSD]
Number of packages to be removed: 3
Number of packages to be installed: 2
The operation will free 119 MiB.
Proceed with this action? [y/N]: y
[1/5] Deinstalling xf86-video-ati-19.0.1,1...
[1/5] Deleting files for xf86-video-ati-19.0.1,1: 100%
[2/5] Deinstalling drm-kmod-g20190710...
[3/5] Deinstalling drm-current-kmod-4.16.g20190927...
[3/5] Deleting files for drm-current-kmod-4.16.g20190927: 0%
drm-current-kmod-4.16.g20190927: missing file /boot/modules/radeonkms.ko
[3/5] Deleting files for drm-current-kmod-4.16.g20190927: 100%
[4/5] Installing drm-legacy-kmod-g20190910...
[4/5] Extracting drm-legacy-kmod-g20190910: 100%
[5/5] Installing xf86-video-ati-legacy-7.9.0_3,1...
[5/5] Extracting xf86-video-ati-legacy-7.9.0_3,1: 100%
=====
Message from drm-legacy-kmod-g20190910:
--
The drm-legacy-kmod port can be enabled for older Intel and ATI/AMD graphics
adapters as well as legacy graphics adapters through kld_list in /etc/rc.conf.
Simply add kld_list="/boot/modules/[driver].ko to /etc/rc.conf, for example
kld_list="/boot/modules/i915kms.ko" for the intel GPU driver or
kld_list="/boot/modules/radeonkms.ko" for the ATI/AMD GPU driver.
Please ensure that all users requiring graphics are members of the
"video" group.
If you are having trouble with ATI/AMD graphics cards and X, try installing
xf86-video-ati-legacy instead of xf86-video-ati.
$
– after which I restarted the OS (reverting to drm-legacy-kmod
).
The crash I am having looks the same. If I use fbsd11.2 version, I get an even worse condition: the system triple faults without panicking.
I haven't noticed this type of panic in recent months.
@abishai @Math2 @janicez how are things for you?
@grahamperrin I'm hiding from COVID in secluded village with intel laptop, so it's hard to say if my main box panics or not at the moment. :p
I haven't tried my Radeon HD 7450 with radeonkms in a long time. Right now it's working fine in EFI GOP mode in another 12-STABLE computer that usually doesn't have a screen.
amdgpu is working very well on two computers though. An RX550 on a 12-STABLE desktop that is on pretty much 24/7. And an RX590 on another 13-CURRENT computer (with drm-current-kmod and since a few weeks ago, drm-kmod git master) but it's rebooted often and not always running FreeBSD. But still, it's working very well there too and uptime is sometimes more than a week before the next reboot and no GPU-related problems at all.
No issues of late