Bug 278084

Summary: qlnxe: multiple panics with WITNESS enabled [PATCH]
Product: Base System Reporter: Keith Reynolds <keith.reynolds>
Component: kernAssignee: Kevin Bowling <kbowling>
Status: Closed FIXED    
Severity: Affects Some People CC: kbowling, keithr, leonardo.secci
Priority: --- Keywords: easy, vendor
Version: 13.3-RELEASE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266480
Attachments:
Description Flags
patch file that fixes all the panics
none
kernel config that enables WITNESS and INVARIANTS
none
first panic
none
second panic
none
third panic
none
fourth panic
none
fifth panic
none
sixth panic none

Description Keith Reynolds 2024-04-01 04:27:24 UTC
Created attachment 249613 [details]
patch file that fixes all the panics

When enabling WITNESS and booting 13.3 on a system with a qlnxe NIC, multiple panics are reported due to various problems with locking.  Fixing each one led to another panic until all of them were fixed.  I'll attach the panic output for each panic and a patch file that fixes all of them.
Comment 1 Keith Reynolds 2024-04-01 04:28:10 UTC
Created attachment 249614 [details]
kernel config that enables WITNESS and INVARIANTS
Comment 2 Keith Reynolds 2024-04-01 04:29:17 UTC
Created attachment 249615 [details]
first panic
Comment 3 Keith Reynolds 2024-04-01 04:29:36 UTC
Created attachment 249616 [details]
second panic
Comment 4 Keith Reynolds 2024-04-01 04:29:54 UTC
Created attachment 249617 [details]
third panic
Comment 5 Keith Reynolds 2024-04-01 04:30:51 UTC
Created attachment 249618 [details]
fourth panic
Comment 6 Keith Reynolds 2024-04-01 04:31:10 UTC
Created attachment 249619 [details]
fifth panic
Comment 7 Keith Reynolds 2024-04-01 04:31:28 UTC
Created attachment 249620 [details]
sixth panic
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-05-28 06:16:32 UTC
A commit in branch main references this bug:

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

commit 29684d08fa3010c2035b4eb1ce0b39091ad07723
Author:     Keith Reynolds <keith.reynolds@hpe.com>
AuthorDate: 2024-05-28 06:13:10 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-05-28 06:13:10 +0000

    qlnxe: Fix multiple locking issues

    Multiple issues are reported with WITNESS and code inspection of the
    locking and lock initialization.

    PR:             278084
    MFC after:      1 week

 sys/dev/qlnx/qlnxe/bcm_osal.h  | 8 ++++----
 sys/dev/qlnx/qlnxe/ecore.h     | 1 +
 sys/dev/qlnx/qlnxe/ecore_mcp.h | 6 +++---
 sys/dev/qlnx/qlnxe/qlnx_def.h  | 2 +-
 sys/dev/qlnx/qlnxe/qlnx_os.c   | 9 +++++----
 sys/dev/qlnx/qlnxe/qlnx_os.h   | 4 ++--
 6 files changed, 16 insertions(+), 14 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-05-28 06:43:37 UTC
A commit in branch main references this bug:

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

commit 1c45a62a2f667b45ec10a92ad58ff5a34e68b569
Author:     Keith Reynolds <keith.reynolds@hpe.com>
AuthorDate: 2024-05-28 06:41:05 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-05-28 06:41:05 +0000

    qlnxe: Fix multiple locking issues

    Multiple issues are reported with WITNESS and code inspection of the
    locking and lock initialization.

    PR:             278084
    MFC after:      1 week

 sys/dev/qlnx/qlnxe/bcm_osal.h  |  8 +++----
 sys/dev/qlnx/qlnxe/ecore.h     |  1 +
 sys/dev/qlnx/qlnxe/ecore_mcp.c | 48 +++++++++++++++++++++---------------------
 sys/dev/qlnx/qlnxe/ecore_mcp.h |  6 +++---
 sys/dev/qlnx/qlnxe/qlnx_def.h  |  2 +-
 sys/dev/qlnx/qlnxe/qlnx_os.c   |  9 ++++----
 sys/dev/qlnx/qlnxe/qlnx_os.h   |  4 ++--
 7 files changed, 40 insertions(+), 38 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-06-07 05:50:25 UTC
A commit in branch stable/14 references this bug:

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

commit 101f1a88de95093c8061db391ba0d205a575f874
Author:     Keith Reynolds <keith.reynolds@hpe.com>
AuthorDate: 2024-05-28 06:41:05 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-06-07 05:49:04 +0000

    qlnxe: Fix multiple locking issues

    Multiple issues are reported with WITNESS and code inspection of the
    locking and lock initialization.

    PR:             278084

    (cherry picked from commit 1c45a62a2f667b45ec10a92ad58ff5a34e68b569)

 sys/dev/qlnx/qlnxe/bcm_osal.h  |  8 +++----
 sys/dev/qlnx/qlnxe/ecore.h     |  1 +
 sys/dev/qlnx/qlnxe/ecore_mcp.c | 48 +++++++++++++++++++++---------------------
 sys/dev/qlnx/qlnxe/ecore_mcp.h |  6 +++---
 sys/dev/qlnx/qlnxe/qlnx_def.h  |  2 +-
 sys/dev/qlnx/qlnxe/qlnx_os.c   |  9 ++++----
 sys/dev/qlnx/qlnxe/qlnx_os.h   |  4 ++--
 7 files changed, 40 insertions(+), 38 deletions(-)
Comment 11 Kevin Bowling freebsd_committer freebsd_triage 2024-06-07 05:54:44 UTC
*** Bug 266480 has been marked as a duplicate of this bug. ***