Skip to content

tests: gnrc_ipv6_ext_frag: various fixes#21935

Merged
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:tests/fix/gnrc_ipv6_ext_frag+native64
Dec 5, 2025
Merged

tests: gnrc_ipv6_ext_frag: various fixes#21935
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:tests/fix/gnrc_ipv6_ext_frag+native64

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Dec 5, 2025

Contribution description

Fixes #21931. Only the test was broken, not the implementation 😌

Testing procedure

sudo dist/tools/tapsetup/tapsetup
make -C tests/net/gnrc_ipv6_ext_frag/ -j clean flash test-as-root

Should now succeed (sometimes there is a timing issue where a regex is not caught properly, but rerunning the test should work).

Issues/PRs references

Fixes #21931.

… ends

Otherwise the match below might fail spuriously
Otherwise the test just crashes when packet buffer runs full.
@miri64 miri64 requested a review from mguetschow December 5, 2025 16:15
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Dec 5, 2025
@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed Area: tests Area: tests and testing framework labels Dec 5, 2025
@miri64 miri64 requested a review from crasbe December 5, 2025 16:16
@miri64 miri64 changed the title Tests/fix/gnrc ipv6 ext frag+native64 tests: gnrc_ipv6_ext_frag: various fixes. Dec 5, 2025
@miri64 miri64 changed the title tests: gnrc_ipv6_ext_frag: various fixes. tests: gnrc_ipv6_ext_frag: various fixes Dec 5, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Dec 5, 2025

Murdock results

✔️ PASSED

3505533 tests: gnrc_ipv6_ext_frag: make slack for pktbuf test dependent on BOARD

Success Failures Total Runtime
19 0 19 01m:34s

Artifacts

Copy link
Copy Markdown
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm the test succeeds now and the segmentation fault could not be reproduced with make -C tests/net/gnrc_ipv6_ext_frag/ -j BOARD=native64 clean flash cleanterm and udp send fe80::c094:a8ff:fedb:73a8%6 20908 5950 anymore (same for native32 and 6000) as reported in #21931 (comment).

However, the other behavior is still present, where RIOT would report success, but actually only send out one or even no IPv6 fragment for some UDP payload lengths. Should we split that out into a separate issue?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Dec 5, 2025

However, the other behavior is still present, where RIOT would report success, but actually only send out one or even no IPv6 fragment for some UDP payload lengths. Should we split that out into a separate issue?

That's expected. Unless you specifically ask GNRC, it does not report any errors back to the application on sending. For the sizes you reported in #21931 (comment), it is to be expected, that at some point the packet buffer just runs full and the packet is discarded en-route through the stack. Since size_t and void * are larger in 64-bit architectures, the snips take more space within the packet buffer.

native64 has sizeof(size_t) == 8 and sizeof(void *) == 8 instead of 4, so we need more slack for
that board.
@miri64 miri64 force-pushed the tests/fix/gnrc_ipv6_ext_frag+native64 branch from 2c09890 to 3505533 Compare December 5, 2025 17:05
if BOARD in ["native64"]:
# size_t and pointers are 4 bytes larger in 64-bit architectures, so add some
# more slack per snip, since they are larger
slack += 96
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work - the python scrip manages to overflow a buffer in the RIOT application?

Copy link
Copy Markdown
Member Author

@miri64 miri64 Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, the python script uses the udp command, provided by the application with a large payload (in the udp_send function called below). This way the buffer is overflown.

@mguetschow
Copy link
Copy Markdown
Contributor

That's expected. Unless you specifically ask GNRC, it does not report any errors back to the application on sending.

True, forgot that. Confusing for newcomers, I guess, but well :)

@miri64 miri64 added this pull request to the merge queue Dec 5, 2025
Merged via the queue into RIOT-OS:master with commit f1580b7 Dec 5, 2025
29 checks passed
@miri64 miri64 deleted the tests/fix/gnrc_ipv6_ext_frag+native64 branch December 6, 2025 00:19
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Dec 6, 2025

Backport provided in #21939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: gnrc_ipv6_ext_frag crashes

6 participants