Bug 260330 - if_oce: panic: Assertion in_epoch(net_epoch_preempt)
Summary: if_oce: panic: Assertion in_epoch(net_epoch_preempt)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Tuexen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-11 01:31 UTC by Vincent Milum Jr
Modified: 2022-02-23 00:26 UTC (History)
1 user (show)

See Also:
tuexen: mfc-stable13+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Milum Jr 2021-12-11 01:31:43 UTC
https://reviews.freebsd.org/D31648

It looks like these assertion checks broke the if_oce NIC driver.

The first assert happens instantly upon loading the driver.
Comment 1 Vincent Milum Jr 2021-12-12 23:14:12 UTC
root@honeycomb-bsd ~# kldload if_oce
oce0: <Emulex CNA NIC function:///11.0.50.0///> mem 0x46080000-0x46083fff,0x46000000-0x4601ffff,0x46020000-0x4603ffff at device 0.0 on pci1
oce1: <Emulex CNA NIC function:///11.0.50.0///> mem 0x46084000-0x46087fff,0x46040000-0x4605ffff,0x46060000-0x4607ffff at device 0.1 on pci1
panic: Assertion in_epoch(net_epoch_preempt) failed at /usr/src/sys/netinet/tcp_lro.c:1492
cpuid = 2
time = 1639350682
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x174
panic() at panic+0x44
tcp_lro_flush_all() at tcp_lro_flush_all+0x1b0
oce_rq_handler() at oce_rq_handler+0x1f0
oce_intr() at oce_intr+0xdc
taskqueue_run_locked() at taskqueue_run_locked+0x178
taskqueue_thread_loop() at taskqueue_thread_loop+0xc8
fork_exit() at fork_exit+0x74
fork_trampoline() at fork_trampoline+0x14
KDB: enter: panic
[ thread pid 0 tid 100547 ]
Stopped at      kdb_enter+0x44: undefined       f901811f
db>
Comment 2 Michael Tuexen freebsd_committer freebsd_triage 2021-12-13 00:02:51 UTC
I put up a fix in review D33395. Can you test it? I don't have the hardware and therefore can't test it.
Comment 3 Vincent Milum Jr 2021-12-13 00:41:37 UTC
With that patch, driver is loading. And trying to push some traffic through seems to be working just fine. Thanks for the super fast response!

root@honeycomb-bsd ~# speedtest-cli
Retrieving speedtest.net configuration...
Testing from --- (x.x.x.x)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Green House Data, Inc (Seattle, WA) [3.33 km]: 3.456 ms
Testing download speed................................................................................
Download: 823.39 Mbit/s
Testing upload speed......................................................................................................
Upload: 677.72 Mbit/s
Comment 4 Michael Tuexen freebsd_committer freebsd_triage 2021-12-15 21:34:59 UTC
(In reply to Vincent Milum Jr from comment #3)

The patch has been updated. Could you test the new version, since I don't have the hardware to test the patch?
Comment 5 Vincent Milum Jr 2021-12-18 21:37:49 UTC
So far, so good with the new patch! :)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-12-18 22:50:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e363f832cfb283a543fa8e47ebd9e51817994fde

commit e363f832cfb283a543fa8e47ebd9e51817994fde
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2021-12-18 22:43:00 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2021-12-18 22:43:00 +0000

    if_oce: fix epoch handling

    Thanks to gallatin@ for suggesting the patch.

    PR:                     260330
    Reported by:            Vincent Milum Jr.
    Reviewed by:            gallatin, glebius
    Tested by:              Vincent Milum Jr.
    MFC after:              3 days
    Differential Revision:  https://reviews.freebsd.org/D33395

 sys/dev/oce/oce_if.c    | 6 +++++-
 sys/dev/oce/oce_if.h    | 1 +
 sys/dev/oce/oce_queue.c | 5 ++++-
 3 files changed, 10 insertions(+), 2 deletions(-)
Comment 7 Michael Tuexen freebsd_committer freebsd_triage 2021-12-18 22:51:24 UTC
(In reply to Vincent Milum Jr from comment #5)
Thanks for testing! The patch is committed.
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-02-22 23:54:16 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=257cd2f8c3c5f43dc6c16d49bea731d4c872ebec

commit 257cd2f8c3c5f43dc6c16d49bea731d4c872ebec
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2021-12-18 22:43:00 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2022-02-22 23:52:15 +0000

    if_oce: fix epoch handling

    Thanks to gallatin@ for suggesting the patch.

    PR:                     260330
    Reported by:            Vincent Milum Jr.
    Reviewed by:            gallatin, glebius
    Tested by:              Vincent Milum Jr.
    Differential Revision:  https://reviews.freebsd.org/D33395

    (cherry picked from commit e363f832cfb283a543fa8e47ebd9e51817994fde)

 sys/dev/oce/oce_if.c    | 6 +++++-
 sys/dev/oce/oce_if.h    | 1 +
 sys/dev/oce/oce_queue.c | 5 ++++-
 3 files changed, 10 insertions(+), 2 deletions(-)