re0 buggy (Revision)

From: Budi Janto <budijanto_at_studiokaraoke.co.id>
Date: Mon, 11 Nov 2024 21:25:48 UTC
Hi,

# freebsd-version
14.1-RELEASE-p5

# pciconf -lv re0
re0@pci0:4:0:0:	class=0x020000 rev=0x05 hdr=0x00 vendor=0x10ec 
device=0x8125 subvendor=0x1458 subdevice=0xe000
     vendor     = 'Realtek Semiconductor Co., Ltd.'
     device     = 'RTL8125 2.5GbE Controller'
     class      = network
     subclass   = ethernet

# dmesg
---cut
CPU: 12th Gen Intel(R) Core(TM) i5-12400 (2496.00-MHz K8-class CPU)
   Origin="GenuineIntel"  Id=0x90675  Family=0x6  Model=0x97  Stepping=5
  
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  
Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
   AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
   AMD Features2=0x121<LAHF,ABM,Prefetch>
   Structured Extended 
Features=0x239c27eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,SHA>
   Structured Extended 
Features2=0x98c007bc<UMIP,PKU,OSPKE,WAITPKG,GFNI,VAES,VPCLMULQDQ,RDPID,MOVDIRI,MOVDIR64B>
   Structured Extended 
Features3=0xfc184410<FSRM,MD_CLEAR,IBT,IBPB,STIBP,L1DFL,ARCH_CAP,CORE_CAP,SSBD>
   XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
   IA32_ARCH_CAPS=0xc88fd6b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO,TAA_NO>
   VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
   TSC: P-state invariant, performance statistics
---cut

I try command:
# traceroute 8.8.8.8

Suddenly, the CPU restarts by itself. I found this with `dmesg`:

Fatal trap 12: page fault while in kernel mode
cpuid = 10; apic id = 0a
fault virtual address    = 0x10007
fault code        = supervisor read data, page not present
instruction pointer    = 0x20:0xffffffff80c58f80
stack pointer            = 0x28:0xfffffe00e3f29d40
frame pointer            = 0x28:0xfffffe00e3f29d80
code segment        = base 0x0, limit 0xfffff, type 0x1b
             = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags    = interrupt enabled, resume, IOPL = 0
current process        = 0 (re0 taskq)
rdi: fffffe00e3c09800 rsi: 000000000000ffff rdx: fffff80741c80800
rcx: fffffe00e3c09e90  r8: 00000000000000d7  r9: ffffffffffffffff
rax: 0000000000000000 rbx: fffff8000253b740 rbp: fffffe00e3f29d80
r10: fffff80741c80800 r11: 000000008edf98a5 r12: 000000000000ffff
r13: fffffe01091d8460 r14: 0000000000000000 r15: 0000000000008803
trap number        = 12
panic: page fault
cpuid = 10
time = 1731359165
KDB: stack backtrace:
#0 0xffffffff80b7fefd at kdb_backtrace+0x5d
#1 0xffffffff80b32bd1 at vpanic+0x131
#2 0xffffffff80b32a93 at panic+0x43
#3 0xffffffff8100091b at trap_fatal+0x40b
#4 0xffffffff81000966 at trap_pfault+0x46
#5 0xffffffff80fd6d48 at calltrap+0x8
#6 0xffffffff821643d4 at re_rxeof+0x344
#7 0xffffffff82157835 at re_int_task_8125+0xb5
#8 0xffffffff80b953d2 at taskqueue_run_locked+0x182
#9 0xffffffff80b96652 at taskqueue_thread_loop+0xc2
#10 0xffffffff80aecf7f at fork_exit+0x7f
#11 0xffffffff80fd7dae at fork_trampoline+0xe

Thanks.

-- 
Regards,
Budi Janto