Skip to content

Test write readiness after ENOBUFS#2594

Draft
mxinden wants to merge 3 commits intoquinn-rs:mainfrom
mxinden:enobufs
Draft

Test write readiness after ENOBUFS#2594
mxinden wants to merge 3 commits intoquinn-rs:mainfrom
mxinden:enobufs

Conversation

@mxinden
Copy link
Copy Markdown
Collaborator

@mxinden mxinden commented Mar 31, 2026

Trying to reproduce missing wake-up on ENOBUFS discussed in #2293.

@mxinden
Copy link
Copy Markdown
Collaborator Author

mxinden commented Mar 31, 2026

@larseggert I am having a hard time triggering an ENOBUFS on a MacOS CI runner. Am I doing something wrong? Does this test trigger on your Mac?

@larseggert
Copy link
Copy Markdown
Contributor

You might not be able to trigger this over loopback.

@thomaseizinger
Copy link
Copy Markdown
Collaborator

thomaseizinger commented Apr 2, 2026

I was able to easily trigger this by sending packets to a random public IP (pick one from a dark block in https://map.bgp.tools/). The program will simply hang if you map ENOBUFS to WouldBlock inside UdpSocket::async_io. That is a pretty clear reproducer IMO that wakers are not correctly registered in that case.

@mxinden
Copy link
Copy Markdown
Collaborator Author

mxinden commented Apr 4, 2026

@thomaseizinger were you able to reproduce with the test provided in this pull request? If no, can you try this test?

I am unable to trigger a ENOBUFS in the first place. Both here on CI and on a MacOS M1.

You might not be able to trigger this over loopback.

I tried loopback, some random IP as well as a Google STUN server. @larseggert do you have any luck?

@thomaseizinger
Copy link
Copy Markdown
Collaborator

thomaseizinger commented Apr 5, 2026

@thomaseizinger were you able to reproduce with the test provided in this pull request? If no, can you try this test?

I haven't tried that yet. Currently travelling without my Macbook but can run it next week when I am back. I did reproduce it on a Macbook Air M1 by sending buffers of > 1000 bytes to 1.1.1.1 if I remember correctly.

I didn't use a test at the time but wrote a little binary. Have you tried compiling the test in release mode?

@mxinden
Copy link
Copy Markdown
Collaborator Author

mxinden commented Apr 5, 2026

I did reproduce it on a Macbook Air M1 by sending buffers of > 1000 bytes to 1.1.1.1 if I remember correctly.

I just tried 1.1.1.1:53 without success.

Have you tried compiling the test in release mode?

Yes. Can't trigger an ENOBUFS in debug nor release mode.

Currently travelling without my Macbook but can run it next week when I am back.

That would be greatly appreciated 🙏

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.

3 participants