Bug 250449 - cxl: Page fault in t4_get_lb_stats with T580-LP-SO-CR
Summary: cxl: Page fault in t4_get_lb_stats with T580-LP-SO-CR
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Navdeep Parhar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 07:14 UTC by Ryan Moeller
Modified: 2020-11-24 00:07 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Moeller freebsd_committer 2020-10-19 07:14:03 UTC
When running sysctl dev.t5nex.0.misc:


t5nex0: <Chelsio T580-LP-SO-CR> mem 0xfb300000-0xfb37ffff,0xfa000000-0xfaffffff,0xfbc04000-0xfbc05fff irq 66 at device 0.4 numa-domain 1 on pci12
t5nex0: PCIe gen3 x8, 2 ports, 22 MSI-X interrupts, 70 eq, 21 iq
cxl0: <port 0> numa-domain 1 on t5nex0
cxl0: 16 txq, 8 rxq (NIC); 8 txq (TOE), 2 rxq (TOE)
cxl1: <port 1> numa-domain 1 on t5nex0
cxl1: 16 txq, 8 rxq (NIC); 8 txq (TOE), 2 rxq (TOE)


Fatal trap 12: page fault while in kernel mode
cpuid = 7; apic id = 07
fault virtual address	= 0x6e
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff831b0d90
stack pointer	        = 0x28:0xfffffe016d9b16f8
frame pointer	        = 0x28:0xfffffe016d9b1700
code segment		= base rx0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 3611 (sysctl)
trap number		= 12
panic: page fault
cpuid = 7
time = 1603091242
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe016d9b13a0
vpanic() at vpanic+0x182/frame 0xfffffe016d9b13f0
panic() at panic+0x43/frame 0xfffffe016d9b1450
trap_fatal() at trap_fatal+0x387/frame 0xfffffe016d9b14b0
trap_pfault() at trap_pfault+0x4f/frame 0xfffffe016d9b1510
trap() at trap+0x27d/frame 0xfffffe016d9b1620
calltrap() at calltrap+0x8/frame 0xfffffe016d9b1620
--- trap 0xc, rip = 0xffffffff831b0d90, rsp = 0xfffffe016d9b16f8, rbp = 0xfffffe016d9b1700 ---
t4_get_lb_stats() at t4_get_lb_stats+0x10/frame 0xfffffe016d9b1700
sysctl_lb_stats() at sysctl_lb_stats+0x92/frame 0xfffffe016d9b18a0
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame 0xfffffe016d9b18f0
sysctl_root() at sysctl_root+0x2cd/frame 0xfffffe016d9b1970
userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe016d9b1a20
sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe016d9b1ad0
amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe016d9b1bf0
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe016d9b1bf0
--- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80038435a, rsp = 0x7fffffffc108, rbp = 0x7fffffffc140 ---
KDB: enter: panic
[ thread pid 3611 tid 102915 ]
Stopped at      kdb_enter+0x37: movq    $0,0x108d046(%rip)
db>
Comment 1 Ryan Moeller freebsd_committer 2020-10-19 12:32:52 UTC
(kgdb) frame 10
#10 0xffffffff831c3572 in sysctl_lb_stats (oidp=<optimized out>, arg1=0xfffff811aa13d000, arg2=<optimized out>, req=<optimized out>)
    at /usr/home/ryan/src/sys/dev/cxgbe/t4_main.c:8550
(kgdb) p i
$11 = 2
(kgdb) frame 9
#9  t4_get_lb_stats (adap=0xfffff811aa13d000, idx=<optimized out>, p=0xfffffe016d9b1710) at /usr/home/ryan/src/sys/dev/cxgbe/common/t4_hw.c:6960
(kgdb) p adap->port
$12 = {0xfffff801059b4c00, 0xfffff80147dfe800, 0x0, 0x0}
Comment 2 Ryan Moeller freebsd_committer 2020-10-19 12:34:42 UTC
(kgdb) p adap->chip_params->nchan
$13 = 4
Comment 3 commit-hook freebsd_committer 2020-10-19 20:09:27 UTC
A commit references this bug:

Author: np
Date: Mon Oct 19 20:08:48 UTC 2020
New revision: 366853
URL: https://svnweb.freebsd.org/changeset/base/366853

Log:
  cxgbe(4): Fix page fault in t4_get_lb_stats with 2 port T5 cards.

  PR:		250449
  Reported by:	freqlabs@
  MFC after:	1 week
  Sponsored by:	Chelsio Communications

Changes:
  head/sys/dev/cxgbe/common/t4_hw.c
Comment 4 commit-hook freebsd_committer 2020-11-24 00:07:28 UTC
A commit references this bug:

Author: np
Date: Tue Nov 24 00:07:22 UTC 2020
New revision: 367968
URL: https://svnweb.freebsd.org/changeset/base/367968

Log:
  MFC r366853:

  cxgbe(4): Fix page fault in t4_get_lb_stats with 2 port T5 cards.

  PR:		250449
  Reported by:	freqlabs@
  Sponsored by:	Chelsio Communications

Changes:
_U  stable/12/
  stable/12/sys/dev/cxgbe/common/t4_hw.c