Skip to content

sock/udp: work around gnrc_sock_recv() returning early timeout #19965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Oct 6, 2023

Contribution description

sock_udp_recv_buf_aux() sometimes will return -ETIMEDOUT before the given timeout has expired (e.g. after 28798µs instead of 160000µs).

This messes with many assumptions and breaks protocols that rely on the timeout.

Until we have a proper fix, add this workaround.

Testing procedure

tests/net/gcoap_fileserver should now be more reliable even without the increased retries.

Issues/PRs references

@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Oct 6, 2023
@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Oct 6, 2023
@benpicco benpicco force-pushed the sock_udp_recv-ealry branch from bcd07f5 to 6e60cfb Compare October 6, 2023 13:09
@benpicco benpicco force-pushed the sock_udp_recv-ealry branch from 6e60cfb to 1118a79 Compare October 6, 2023 13:27
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 15, 2023
@riot-ci
Copy link

riot-ci commented Oct 15, 2023

Murdock results

✔️ PASSED

c4634f5 examples/gcoap: add saml1x-xpro to Makefile.ci

Artifacts

@MrKevinWeiss
Copy link
Contributor

Should this be closed if #18977 is merged?

@benpicco benpicco force-pushed the sock_udp_recv-ealry branch from 1118a79 to bce6c23 Compare November 13, 2023 13:03
@benpicco benpicco requested a review from maribu November 13, 2023 13:04
@benpicco benpicco force-pushed the sock_udp_recv-ealry branch from bce6c23 to ae48e4e Compare November 13, 2023 13:14
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

Let's go with this for now and revert it when the underlying bug is fixed.

sock_udp_recv_buf_aux() sometimes will return -ETIMEDOUT before
the given timeout has expired (e.g. 28798µs instead of 160000µs).

This messes with many assumptions and breaks protocols that rely
on the timeout.

Until we have a proper fix, add this workaround.
@benpicco benpicco force-pushed the sock_udp_recv-ealry branch from ae48e4e to e3d0068 Compare November 14, 2023 12:33
@maribu maribu added this pull request to the merge queue Nov 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2023
@github-actions github-actions bot added the Area: examples Area: Example Applications label Nov 27, 2023
@benpicco benpicco added this pull request to the merge queue Nov 28, 2023
Merged via the queue into RIOT-OS:master with commit db6d918 Nov 28, 2023
@benpicco benpicco deleted the sock_udp_recv-ealry branch November 28, 2023 17:47
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
@maribu
Copy link
Member

maribu commented Dec 31, 2024

TODO: Revert this when #21113 is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications Area: network Area: Networking Area: sys Area: System 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.

4 participants