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.
Details
- Reviewers
sbruno pho kmacy kbowling - Commits
- rS325241: Fix PR221990 - Assertion at iflib.c:1947
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.