Run reason: Pull request #486 updated
Total runtime: 7 min 59 sec
Split logs: https://ci.kronosnet.org/job/kronosnet/job/kronosnet-pipeline/job/PR-486/4/…
Full log: https://ci.kronosnet.org/job/kronosnet/job/kronosnet-pipeline/job/PR-486/4/…
Please report the following errors to your friendly local Jenkins admin (though they have probably already seen them and are already panicking).
Exception caught on centos-9-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-12-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-13-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-testing-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-42-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-power9-ppc64le during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-13-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-14-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-15-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-coverity-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-power9-ppc64le during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-coverity-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-coverity-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-power9-ppc64le during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-s390x during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-22-04-lts-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-24-04-lts-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-25-10-x86-64 during voting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on alpine-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-experimental-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-unstable-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-power9-ppc64le during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-s390x during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-devel-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on openindiana-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-devel-x86-64 during nonvoting_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on alpine-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on alpine-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-12-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-12-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-13-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-13-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-experimental-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-experimental-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-testing-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-testing-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-unstable-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on debian-unstable-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-42-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-42-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-power9-ppc64le during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-power9-ppc64le during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-power9-ppc64le during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-power9-ppc64le during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-13-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-13-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-14-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-14-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-15-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-15-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-devel-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on freebsd-devel-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on openindiana-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on openindiana-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-power9-ppc64le during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-power9-ppc64le during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-power9-ppc64le during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-power9-ppc64le during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-s390x during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-s390x during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-22-04-lts-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-22-04-lts-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-24-04-lts-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-24-04-lts-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-25-10-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-25-10-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-devel-x86-64 during nonvoting-clang: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on ubuntu-devel-x86-64 during nonvoting-clang_debug: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-9-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on centos-10-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-42-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-power9-ppc64le during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-43-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-power9-ppc64le during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on fedora-rawhide-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-power9-ppc64le during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-power9-ppc64le during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-s390x during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-x86-64 during buildrpms: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-8-coverity-x86-64 during covscan: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-9-coverity-x86-64 during covscan: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Exception caught on rhel-10-coverity-x86-64 during covscan: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:
Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: 4df3ec4c982875d1d0cbf8159e57ba8d0e771f49
https://github.com/kronosnet/kronosnet/commit/4df3ec4c982875d1d0cbf8159e57b…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/handle_api.c
M libknet/host.c
M libknet/internals.h
M libknet/threads_rx.c
M libknet/threads_tx.c
M libknet/transport_common.c
M libknet/transport_common.h
Log Message:
-----------
libknet: add MSG_EOR support for SOCK_SEQPACKET socketpairs
Detected on FreeBSD 15 which changed SOCK_SEQPACKET from atomic datagrams
to stream sockets with record markers. This exposed a bug in knet: we were
not using MSG_EOR to mark record boundaries as required by the SOCK_SEQPACKET
specification (documented in both Linux and FreeBSD man pages).
Without MSG_EOR, multiple records can coalesce into single reads, breaking
packet boundaries.
Add is_seqpacket flag to knet_sock tracker, set during socket creation.
Use flag to apply MSG_EOR on all socketpair writes:
- writev_all() for RX/loopback delivery to user
- knet_send() for user data to network
- dstsockfd internal signaling
Add coverity MISSING_LOCK suppressions for is_seqpacket flag access.
All accesses are protected by global_rwlock held by caller functions.
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 82846104a27ea16f5cbdaa09df17c32904fb1885
https://github.com/kronosnet/kronosnet/commit/82846104a27ea16f5cbdaa09df17c…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/host.c
Log Message:
-----------
libknet: fix defragmentation buffer reclamation using wrong sequence number
The defragmentation buffer reclamation was using the old received sequence
number (dst_seq_num) instead of the current packet's sequence number to
calculate the valid buffer window.
This caused buffers to be reclaimed based on stale sequence information,
potentially freeing buffers that should still be valid or keeping buffers
that should be reclaimed.
Fixed by passing seq_num (current packet) instead of dst_seq_num (last
received) to _reclaim_old_defrag_bufs().
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 420718160d207ace5a4ad5af534325656aaa74bc
https://github.com/kronosnet/kronosnet/commit/420718160d207ace5a4ad5af53432…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/host.c
Log Message:
-----------
libknet: fix sequence number wraparound calculation in defragmentation
The distance calculation between sequence numbers was incorrect when
wraparound occurred. The formula was backwards: it subtracted in the wrong
direction and didn't account for the +1 needed for modular arithmetic.
This caused incorrect buffer reclamation decisions near the SEQ_MAX boundary.
Practical examples (SEQ_MAX = 65535):
Example 1 - Normal case (no wraparound):
Last packet: dst_seq_num = 1000
New packet: seq_num = 1005
Expected distance: 5
BEFORE (wrong):
seq_dist = dst_seq_num - seq_num = 1000 - 1005 = -5 (negative!)
AFTER (correct):
seq_dist = seq_num - dst_seq_num = 1005 - 1000 = 5
Example 2 - Wraparound case:
Last packet: dst_seq_num = 65534
New packet: seq_num = 3 (wrapped around)
Expected distance: 5 (65534→65535→0→1→2→3)
BEFORE (wrong):
seq_dist = (SEQ_MAX - seq_num) + dst_seq_num
seq_dist = (65535 - 3) + 65534 = 131066 (huge wrong number!)
AFTER (correct):
seq_dist = (SEQ_MAX - dst_seq_num) + seq_num + 1
seq_dist = (65535 - 65534) + 3 + 1 = 5
The +1 accounts for the transition from 65535→0 being one step, not zero.
Verification that circular buffer cleaning is not broken:
The seq_dist value is used to determine whether the new packet is:
a) Within the circular buffer window (seq_dist < KNET_CBUFFER_SIZE)
b) Far enough to require full buffer clear (seq_dist > threshold)
c) Should trigger incremental cleaning (fall through case)
Test case 1 - Normal sequential packet:
dst_seq_num = 1000, seq_num = 1005, expected distance = 5
BEFORE: seq_dist = -5 (unsigned overflow ~65530)
→ Incorrectly clears entire buffer for normal sequential packets!
AFTER: seq_dist = 5
→ Correctly identifies packet as within buffer window, no clearing needed
Test case 2 - Wraparound (close distance):
dst_seq_num = 65534, seq_num = 3, expected distance = 5
BEFORE: seq_dist = 131066
→ Falls through to circular buffer cleaning code incorrectly
AFTER: seq_dist = 5
→ Correctly identifies packet as within buffer window
Test case 3 - Large jump requiring buffer clear:
dst_seq_num = 1000, seq_num = 50000, expected distance = 49000
BEFORE: seq_dist = -49000 (unsigned ~16536)
→ Clears buffer (correct by accident)
AFTER: seq_dist = 49000
→ Clears buffer (correct by design)
The circular buffer cleaning code (lines 673-684) uses seq_num and dst_seq_num
directly via modulo operations to find buffer positions. It does not use
seq_dist for position calculations, only for the threshold check to determine
whether to run. The fix corrects the threshold logic without affecting the
position calculations.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 9f56209233872c2c8ea902b4600fbe2fa588b0e7
https://github.com/kronosnet/kronosnet/commit/9f56209233872c2c8ea902b4600fb…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/tests/Makefile.am
A libknet/tests/int_seq_wraparound_stress.c
Log Message:
-----------
[tests] add comprehensive sequence number wraparound stress test
Add new int_seq_wraparound_stress test that exercises sequence number
wraparound and defragmentation buffer management with realistic packet
loss scenarios.
The test uses knet_recv() to properly receive packets one at a time
through the socketpair interface, verifying correct behavior across 8
comprehensive test scenarios:
1. Normal sequential packets with occasional loss
2. Wraparound boundary (65535->0) with packet loss
3. Large sequence jumps (>KNET_CBUFFER_SIZE) triggering buffer clearing
4. Out-of-order fragment delivery within same sequence number
5. Out-of-order complete packet delivery (different sequence numbers)
6. Extreme packet loss beyond receive window
7. Wraparound with extreme loss (>KNET_CBUFFER_SIZE gap)
8. Wraparound stress with multiple cycles and duplicate detection
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/96c12c8d6bb4...9f5620923387
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications
Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: cbd7f7f5afad70eb71e093eea403993c36606438
https://github.com/kronosnet/kronosnet/commit/cbd7f7f5afad70eb71e093eea4039…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/handle_api.c
M libknet/host.c
M libknet/internals.h
M libknet/threads_rx.c
M libknet/threads_tx.c
M libknet/transport_common.c
M libknet/transport_common.h
Log Message:
-----------
libknet: add MSG_EOR support for SOCK_SEQPACKET socketpairs
Detected on FreeBSD 15 which changed SOCK_SEQPACKET from atomic datagrams
to stream sockets with record markers. This exposed a bug in knet: we were
not using MSG_EOR to mark record boundaries as required by the SOCK_SEQPACKET
specification (documented in both Linux and FreeBSD man pages).
Without MSG_EOR, multiple records can coalesce into single reads, breaking
packet boundaries.
Add is_seqpacket flag to knet_sock tracker, set during socket creation.
Use flag to apply MSG_EOR on all socketpair writes:
- writev_all() for RX/loopback delivery to user
- knet_send() for user data to network
- dstsockfd internal signaling
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: c2b101622416cbcd244674cdd8dfa66d21295a75
https://github.com/kronosnet/kronosnet/commit/c2b101622416cbcd244674cdd8dfa…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/host.c
Log Message:
-----------
libknet: fix defragmentation buffer reclamation using wrong sequence number
The defragmentation buffer reclamation was using the old received sequence
number (dst_seq_num) instead of the current packet's sequence number to
calculate the valid buffer window.
This caused buffers to be reclaimed based on stale sequence information,
potentially freeing buffers that should still be valid or keeping buffers
that should be reclaimed.
Fixed by passing seq_num (current packet) instead of dst_seq_num (last
received) to _reclaim_old_defrag_bufs().
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 9437bd6baa2a3bdd5a71451297a5c869be23cb47
https://github.com/kronosnet/kronosnet/commit/9437bd6baa2a3bdd5a71451297a5c…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/host.c
Log Message:
-----------
libknet: fix sequence number wraparound calculation in defragmentation
The distance calculation between sequence numbers was incorrect when
wraparound occurred. The formula was backwards: it subtracted in the wrong
direction and didn't account for the +1 needed for modular arithmetic.
This caused incorrect buffer reclamation decisions near the SEQ_MAX boundary.
Practical examples (SEQ_MAX = 65535):
Example 1 - Normal case (no wraparound):
Last packet: dst_seq_num = 1000
New packet: seq_num = 1005
Expected distance: 5
BEFORE (wrong):
seq_dist = dst_seq_num - seq_num = 1000 - 1005 = -5 (negative!)
AFTER (correct):
seq_dist = seq_num - dst_seq_num = 1005 - 1000 = 5
Example 2 - Wraparound case:
Last packet: dst_seq_num = 65534
New packet: seq_num = 3 (wrapped around)
Expected distance: 5 (65534→65535→0→1→2→3)
BEFORE (wrong):
seq_dist = (SEQ_MAX - seq_num) + dst_seq_num
seq_dist = (65535 - 3) + 65534 = 131066 (huge wrong number!)
AFTER (correct):
seq_dist = (SEQ_MAX - dst_seq_num) + seq_num + 1
seq_dist = (65535 - 65534) + 3 + 1 = 5
The +1 accounts for the transition from 65535→0 being one step, not zero.
Verification that circular buffer cleaning is not broken:
The seq_dist value is used to determine whether the new packet is:
a) Within the circular buffer window (seq_dist < KNET_CBUFFER_SIZE)
b) Far enough to require full buffer clear (seq_dist > threshold)
c) Should trigger incremental cleaning (fall through case)
Test case 1 - Normal sequential packet:
dst_seq_num = 1000, seq_num = 1005, expected distance = 5
BEFORE: seq_dist = -5 (unsigned overflow ~65530)
→ Incorrectly clears entire buffer for normal sequential packets!
AFTER: seq_dist = 5
→ Correctly identifies packet as within buffer window, no clearing needed
Test case 2 - Wraparound (close distance):
dst_seq_num = 65534, seq_num = 3, expected distance = 5
BEFORE: seq_dist = 131066
→ Falls through to circular buffer cleaning code incorrectly
AFTER: seq_dist = 5
→ Correctly identifies packet as within buffer window
Test case 3 - Large jump requiring buffer clear:
dst_seq_num = 1000, seq_num = 50000, expected distance = 49000
BEFORE: seq_dist = -49000 (unsigned ~16536)
→ Clears buffer (correct by accident)
AFTER: seq_dist = 49000
→ Clears buffer (correct by design)
The circular buffer cleaning code (lines 673-684) uses seq_num and dst_seq_num
directly via modulo operations to find buffer positions. It does not use
seq_dist for position calculations, only for the threshold check to determine
whether to run. The fix corrects the threshold logic without affecting the
position calculations.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 76348256fb9b111a3a41744df7679c70dec2cf2a
https://github.com/kronosnet/kronosnet/commit/76348256fb9b111a3a41744df7679…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/tests/Makefile.am
A libknet/tests/int_seq_wraparound_stress.c
Log Message:
-----------
[tests] add comprehensive sequence number wraparound stress test
Add new int_seq_wraparound_stress test that exercises sequence number
wraparound and defragmentation buffer management with realistic packet
loss scenarios.
The test uses knet_recv() to properly receive packets one at a time
through the socketpair interface, verifying correct behavior across 8
comprehensive test scenarios:
1. Normal sequential packets with occasional loss
2. Wraparound boundary (65535->0) with packet loss
3. Large sequence jumps (>KNET_CBUFFER_SIZE) triggering buffer clearing
4. Out-of-order fragment delivery within same sequence number
5. Out-of-order complete packet delivery (different sequence numbers)
6. Extreme packet loss beyond receive window
7. Wraparound with extreme loss (>KNET_CBUFFER_SIZE gap)
8. Wraparound stress with multiple cycles and duplicate detection
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
Commit: 96c12c8d6bb4d8bcbc9c682fd161aec6061d5a03
https://github.com/kronosnet/kronosnet/commit/96c12c8d6bb4d8bcbc9c682fd161a…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M libknet/threads_rx.c
M libknet/threads_tx.c
Log Message:
-----------
libknet: add coverity suppressions for SOCK_SEQPACKET is_seqpacket flag access
Add MISSING_LOCK suppressions for is_seqpacket flag access in RX/TX threads.
All accesses are protected by global_rwlock held by caller functions.
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/f55a1bfdbc0b...96c12c8d6bb4
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications