Branch: refs/heads/fix-thread-pmtud-race
Home: https://github.com/kronosnet/kronosnet
Commit: 30865b9921cab7657fd74df65d22d96add7b3e26
https://github.com/kronosnet/kronosnet/commit/30865b9921cab7657fd74df65d22d…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-16 (Sat, 16 May 2026)
Changed paths:
M libknet/threads_pmtud.c
Log Message:
-----------
libknet: force PMTUD rerun after reschedule interruption
When PMTUD is interrupted by a reschedule request (returns EDEADLK),
some links may have been checked while others were skipped. The next
iteration uses the interval timer to decide which links to check, which
means recently-checked links are skipped even if they need a new PMTUD
run (e.g., after reconnection following onwire protocol upgrade).
Fix by setting pmtud_forcerun=1 when the PMTUD thread detects it was
interrupted (errno == EDEADLK). This ensures the next iteration force-runs
PMTUD on all links regardless of the interval timer, completing discovery
on interrupted and skipped links.
This approach respects the 2018 commit d2a6344f design by setting forcerun
in the PMTUD thread itself (after the interrupted iteration completes) rather
than in _pmtud_reschedule() or its callers, avoiding the lock fighting and
scheduling issues that commit addressed.
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 1a92d58e85668e6ffc5c9a4b5c9c4a087429a0b0
https://github.com/kronosnet/kronosnet/commit/1a92d58e85668e6ffc5c9a4b5c9c4…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-16 (Sat, 16 May 2026)
Changed paths:
M libknet/tests/fun_onwire_upgrade.c
Log Message:
-----------
tests: fix race condition in fun_onwire_upgrade test
Add proper locking in upgrade_onwire_max_ver() to prevent race between
test modifications of onwire_min_ver/onwire_max_ver and RX threads reading
these values. RX threads hold global_rwlock during packet processing and
check version fields without explicit synchronization, causing flaky test
failures on FreeBSD when RX threads see stale values.
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Compare: https://github.com/kronosnet/kronosnet/compare/4a3f496cd675...1a92d58e8566
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications