Bug 252795

Summary: Reproducable kernel panic an aarch64 (panic: bad link elm 0xfff.... prev->next != elm)
Product: Base System Reporter: Gordon Bergling <gbe>
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Stacktrace arm64 UFS panic none

Description Gordon Bergling freebsd_committer freebsd_triage 2021-01-18 08:24:07 UTC
I recently hit a reproducible kernel panic an arm64 (RPi4B) while running a kyua test run. After bisecting the tests I narrowed it down to 'sys/netpfil/pf/route_to:v6'.

The FreeBSD revision is b7ab6832cd98 with

arm64: Trim duplicate code from cpu_fork_kthread_handler()
https://reviews.freebsd.org/D28182

and

arm64: Clear FPU flags in the pcb in cpu_copy_thread()
https://reviews.freebsd.org/D28183

applied for KTLS.

Kernel configuration is
include		GENERIC
options		RATELIMIT
options		TCPHPTS
options		ROUTE_MPATH
options		FIB_ALGO
options		KERN_TLS
options		RANDOM_FENESTRASX
device		pass
options		MMCCAM
nodevice	mmc
nodevice	mmcsd
options IOMMU

src.conf is
WITH_MALLOC_PRODUCTION=1
WITH_EXTRA_TCP_STACKS=1
WITH_BEARSSL=1
WITH_PIE=1
WITH_RETPOLINE=1
WITHOUT_CLEAN=1
Comment 1 Ed Maste freebsd_committer freebsd_triage 2021-01-18 14:57:34 UTC
Can you paste the backtrace?
Comment 2 Gordon Bergling freebsd_committer freebsd_triage 2021-01-18 16:07:29 UTC
Created attachment 221710 [details]
Stacktrace arm64 UFS panic

@emaste, I have attached a screenshot of the stack trace. The left part of the screen isn't visible. I have tried to workaround it in config.txt, but I wasn't be able to solve that. If I can provide a short version of the stack trace via ddb, just let me know.
Comment 3 Gordon Bergling freebsd_committer freebsd_triage 2021-04-17 12:57:36 UTC
(In reply to Gordon Bergling from comment #2)

Still happens on 14-CURRENT as of today.
Comment 4 Gordon Bergling freebsd_committer freebsd_triage 2021-08-20 12:19:55 UTC
On a 13-STABLE from today the kyua test suite doesn't trigger a panic any more. Tested as root and non-root user.