Skip to content
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

Revert "freebsd,linux: add recvmmsg() + sendmmsg() udp implementation" #2792

Closed
wants to merge 1 commit into from

Conversation

bnoordhuis
Copy link
Member

This reverts commit 3d71366.
This reverts commit d9cd7d4.

The first reverted commit is the sendmmsg/recvmmsg support, the second
one a fix-up to deliver datagrams in order. The second commit has been
implicated in causing bind9 to crash on freebsd.

A quick review of the code suggests that downstream code written against
pre-v1.35.0 libuv can't safely deal with multi-datagram support because
they are unaware of the UV_UDP_MMSG_CHUNK flag and what that implies
for buffer management, hence I'm moving to revert it.

The UV_UDP_MMSG_CHUNK flag remains part of uv_udp_flags for
API/ABI backwards compatibility reasons but it is no longer used.

Fixes: #2791
Refs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245653
CI: https://ci.nodejs.org/job/libuv-test-commit/1856/


This is my quick reading of the code, I don't mind being proven wrong. Is there a way to maintain the multi-datagram feature without breaking existing users?

This reverts commit 3d71366.
This reverts commit d9cd7d4.

The first reverted commit is the sendmmsg/recvmmsg support, the second
one a fix-up to deliver datagrams in order. The second commit has been
implicated in causing bind9 to crash on freebsd.

A quick review of the code suggests that downstream code written against
pre-v1.35.0 libuv can't safely deal with multi-datagram support because
they are unaware of the `UV_UDP_MMSG_CHUNK` flag and what that implies
for buffer management, hence I'm moving to revert it.

The `UV_UDP_MMSG_CHUNK` flag remains part of `uv_udp_flags` for
API/ABI backwards compatibility reasons but it is no longer used.

Fixes: libuv#2791
Refs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245653
@saghul
Copy link
Member

saghul commented Apr 16, 2020

As mentioned in #2791 (comment) how about we turn it off with a flag instead? That would retain the previous behavior and ada new way to turn it on, instead of completely scraping the feature. I can work on such patch.

uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 16, 2020
…ns/bind916).

See <libuv/libuv#2791>
and <libuv/libuv#2792>

PR:		245653
Reported by:	lysfjord.daniel(at)smokepit.net and many


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@531835 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 16, 2020
…ns/bind916).

See <libuv/libuv#2791>
and <libuv/libuv#2792>

PR:		245653
Reported by:	lysfjord.daniel(at)smokepit.net and many
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this pull request Apr 16, 2020
…ns/bind916).

See <libuv/libuv#2791>
and <libuv/libuv#2792>

PR:		245653
Reported by:	lysfjord.daniel(at)smokepit.net and many


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@531835 35697150-7ecd-e111-bb59-0022644237b5
@jer-gentoo
Copy link
Contributor

A quick review of the code suggests that downstream code written against
pre-v1.35.0 libuv

That should read pre-v1.36.0, right?

@bnoordhuis
Copy link
Member Author

The feature was introduced in v1.35.0, the fix (that fixes one bug but causes another) in v1.36.0.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Rubberstamp LGTM, but I'm also open to the flag if the PR comes in. I'll have time for a release tomorrow.

saghul added a commit to saghul/libuv that referenced this pull request Apr 18, 2020
Instead of implicitly enabling it by checking the supplied buffer size
to alloc_cb, have a dedicated flag that must be set on `uv_udp_init_ex`.

Fixes: libuv#2791
Closes: libuv#2792
saghul added a commit to saghul/libuv that referenced this pull request Apr 18, 2020
Instead of implicitly enabling it by checking the supplied buffer size
to alloc_cb, have a dedicated flag that must be set on `uv_udp_init_ex`.

Fixes: libuv#2791
Closes: libuv#2792
saghul added a commit to saghul/libuv that referenced this pull request Apr 19, 2020
Instead of implicitly enabling it by checking the supplied buffer size
to alloc_cb, have a dedicated flag that must be set on `uv_udp_init_ex`.

Fixes: libuv#2791
Closes: libuv#2792
PR-URL: libuv#2799
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@cjihrig cjihrig closed this in 5736658 Apr 19, 2020
ericbsd pushed a commit to ghostbsd/ghostbsd-ports that referenced this pull request Apr 22, 2020
…ns/bind916).

See <libuv/libuv#2791>
and <libuv/libuv#2792>

PR:		245653
Reported by:	lysfjord.daniel(at)smokepit.net and many
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this pull request Jan 10, 2024
…ns/bind916).

See <libuv/libuv#2791>
and <libuv/libuv#2792>

PR:		245653
Reported by:	lysfjord.daniel(at)smokepit.net and many
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dns/bind 9.16.2 crashes with libuv v1.36.0
4 participants