Page MenuHomeFreeBSD

Possible fix for PR221990
ClosedPublic

Authored by shurd on Oct 26 2017, 5:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 15 2024, 12:03 PM
Unknown Object (File)
Jan 9 2024, 7:45 AM
Unknown Object (File)
Dec 26 2023, 8:39 PM
Unknown Object (File)
Dec 25 2023, 3:08 PM
Unknown Object (File)
Dec 22 2023, 11:51 PM
Unknown Object (File)
Oct 26 2023, 4:08 AM
Unknown Object (File)
Sep 3 2023, 12:46 AM
Unknown Object (File)
Jun 11 2023, 4:07 AM
Subscribers

Details

Summary

Assuming that ifl_pidx and ifl_credits are going out of sync in
_iflib_fl_refill(), use the same update logic for both to fix error.

Test Plan

If it's verified this is the root cause, have reporter test
in failing case.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

With this patch I see:

panic: Assertion sd_m[frag_idx] == NULL failed at ../../../net/iflib.c:1912
cpuid = 6
time = 1509192766
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe07c1559660
kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe07c1559710
vpanic() at vpanic+0x19f/frame 0xfffffe07c1559790
kassert_panic() at kassert_panic+0x139/frame 0xfffffe07c1559800
_iflib_fl_refill() at _iflib_fl_refill+0x1fc/frame 0xfffffe07c15598f0
_task_fn_rx() at _task_fn_rx+0xb92/frame 0xfffffe07c15599f0
gtaskqueue_run_locked() at gtaskqueue_run_locked+0x119/frame 0xfffffe07c1559a40
gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0xab/frame 0xfffffe07c1559a70
fork_exit() at fork_exit+0x84/frame 0xfffffe07c1559ab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe07c1559ab0

Details @ https://people.freebsd.org/~pho/stress/log/iflib.txt

If an error occurs in _iflib_fl_refill(), still update pidx/count and
refill up to the error. Should prevent sd_m[idx] != NULL.

I tested this version for 12 hours without seeing any problems.

This revision is now accepted and ready to land.Oct 31 2017, 5:26 PM
This revision was automatically updated to reflect the committed changes.