Random hangs and reboots

I’m running the 15.1-release version on an AMD Ryzen 3 7320U AIO PC, Radeon Graphics, MATE desktop, 8Gb RAM and rtl8852BE wireless driver. A few seconds after I login the system hangs and quickly reboots. I have verified that the system is up to date and that the tunable compat.linuxkpi.skb.mem_limit is set to 1. The problem happens randomly, sometimes all of a sudden after some minutes of normal behavior. By the way, the wireless connection seems to work without hiccups. It might be a kernel panic or a graphics or other hw issue, don’t really know how to tell because I’m new to FreeBSD. What could I do to find out the culprit? Thanks in advance.
 
Try with a Linux live image.

I've got a machine that lets you install Linux or OpenBSD or FreeBSD, and runs happily for 10-15 minutes and then locks up.

So try with a different OS to eliminate hardware.
 
Maybe it’s still the offender though another way?
It's still under heavy development, as is the DRM driver you're likely also using. Both could certainly have bugs that crash your system. Any messages in /var/log/messages that might provide clues as to what crashed? Anything in /var/crash/? If there's a core dump you might be able to figure out what exactly crashed.
 
rtl8852BE wireless driver
15.0, the culprit was the wireless driver. Maybe it’s still the offender though another way?
Possible. I have a ThinkPad AMD 5700U, ('Lucienne' GPU), with a RTL8852AE wireless. On 15.0-RELEASE the machine kernel panicked with the rtw89(4) driver often, made the system unusable. There was also a report on freebsd-wireless@ mailing list, that the panic could be triggered in combination with the (amdpgu) drm-kmod driver.

I never tracked the issue seriously. At the time I used an external USB wifi since 13.0.

On 15.1-RELEASE the kernel panic occurs on this particular machine only after a suspend/resume- service netif restart. Besides that, the rtw89 driver is working stable.

In your case, as SirDice suggested, inspecting the core dump might give indications what be the issue. If it exists, look at the core.txt.* file.

If any core dump is absent, check in /etc/rc.conf for dumpdev="AUTO" and execute dumpon -l, see if a appropriate dump device (swap) is listed.

Besides trying a Linux distro, as richardtoohey2 suggested, on 15.0 I had planed to disable the (amdgpu) drm-kmod driver and configure xorg with the x11-drivers/xf86-video-scfb driver, to see if the kernel panic still occures with the rtw89 driver. You could try that also.

If the rtw89 looks like the culprit, you should subscribe to the freebsd-wireless@freebsd.org mailing list and report the problem. You can expect a response from the rtw89 driver developer, Boern A. Zeeb, shortly. Begin the mail subject with '[rtw89]'.
 
Thank you all guys for your help! Unfortunately I wouldn't want to replace drm-kmod with sfcb because I need to run gammastep (that does not work with sfcb). I am attaching the /var/log/messages file. There is no log in /var/crash.
 

Attachments

In my case..
A few months before the power supply exploded, my system often crashed 🙀
After replacing the exploded power supply, my system became very stable even heavy loading. 😸🐱
 
I am attaching the /var/log/messages file.
These are the interesting bits:
Code:
Dec  2 16:26:44 wastelander-pc kernel: Fatal trap 12: page fault while in kernel mode
Dec  2 16:26:44 wastelander-pc kernel: cpuid = 7; apic id = 07
Dec  2 16:26:44 wastelander-pc kernel: fault virtual address	= 0x18
Dec  2 16:26:44 wastelander-pc kernel: fault code		= supervisor read data, page not present
Dec  2 16:26:44 wastelander-pc kernel: instruction pointer	= 0x20:0xffffffff84401284
Dec  2 16:26:44 wastelander-pc kernel: stack pointer	        = 0x28:0xfffffe00864b5d40
Dec  2 16:26:44 wastelander-pc kernel: frame pointer	        = 0x28:0xfffffe00864b5d40
Dec  2 16:26:44 wastelander-pc kernel: code segment		= base 0x0, limit 0xfffff, type 0x1b
Dec  2 16:26:44 wastelander-pc kernel: 			= DPL 0, pres 1, long 1, def32 0, gran 1
Dec  2 16:26:44 wastelander-pc kernel: processor eflags	= interrupt enabled, resume, IOPL = 0
Dec  2 16:26:44 wastelander-pc kernel: current process		= 0 (thread taskq)
Dec  2 16:26:44 wastelander-pc kernel: rdi: fffffe00c51a7640 rsi: fffffe00c5b49f00 rdx: fffffffffffffff8
Dec  2 16:26:44 wastelander-pc kernel: rcx: fffffe00c5fb5a60  r8: fffffe00864b5d54  r9: fffffe00c5b49f00
Dec  2 16:26:44 wastelander-pc kernel: rax: fffff80171f9c4b0 rbx: fffffe00c5fb5a60 rbp: fffffe00864b5d40
Dec  2 16:26:44 wastelander-pc kernel: r10: 0000000100000010 r11: fffffe00c8056044 r12: fffffe00c51a7640
Dec  2 16:26:44 wastelander-pc kernel: r13: fffffe00c2513000 r14: fffff80171f9c1c0 r15: fffffe00c51a7580
Dec  2 16:26:44 wastelander-pc kernel: trap number		= 12
Dec  2 16:26:44 wastelander-pc kernel: panic: page fault
Dec  2 16:26:44 wastelander-pc kernel: cpuid = 7
Dec  2 16:26:44 wastelander-pc kernel: time = 1796225169
Dec  2 16:26:44 wastelander-pc kernel: KDB: stack backtrace:
Dec  2 16:26:44 wastelander-pc kernel: #0 0xffffffff80bf004d at kdb_backtrace+0x5d
Dec  2 16:26:44 wastelander-pc kernel: #1 0xffffffff80ba0b36 at vpanic+0x136
Dec  2 16:26:44 wastelander-pc kernel: #2 0xffffffff80ba09f3 at panic+0x43
Dec  2 16:26:44 wastelander-pc kernel: #3 0xffffffff810b2fcd at trap_pfault+0x37d
Dec  2 16:26:44 wastelander-pc kernel: #4 0xffffffff810893d8 at calltrap+0x8
Dec  2 16:26:44 wastelander-pc kernel: #5 0xffffffff84410dad at rtw89_ops_tx+0x10d
Dec  2 16:26:44 wastelander-pc kernel: #6 0xffffffff80e1e928 at lkpi_80211_txq_tx_one+0x7c8
Dec  2 16:26:44 wastelander-pc kernel: #7 0xffffffff80e22603 at lkpi_80211_txq_task+0x113
Dec  2 16:26:44 wastelander-pc kernel: #8 0xffffffff80c06b42 at taskqueue_run_locked+0x182
Dec  2 16:26:44 wastelander-pc kernel: #9 0xffffffff80c07d12 at taskqueue_thread_loop+0xc2
Dec  2 16:26:44 wastelander-pc kernel: #10 0xffffffff80b56f8b at fork_exit+0x7b
Dec  2 16:26:44 wastelander-pc kernel: ---<<BOOT>>---

And it looks like your rtw89(4) might have been the culprit. At least in this case.
 
Oh yes, honestly I hadn’t ever noticed these lines but it’s the confirmation that rtw89 is still problematic. There was a panic report in the FreeBSD bugzilla with the same trap 12 message, though on 15.0. I have just updated the discussion reporting the panic still happening on 15.1 too.
 
Back
Top