-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Invalid argument in wait__ (ethr_event.c) #5339
Comments
Thanks for the detailed bug report! It turns out that that the I've made a pull request #5342 which should fix this issue. The branch of the pull request is based on OTP 22.3.4. This so we can reuse the branch for patches on OTP 22 and onwards. It should merge cleanly to any OTP version later than OTP 22.3.4. Note that I have only done very limited testing of it, but I'm quite confident that it will solve this issue. Please try it out in your test environment and confirm that it fixes the crashes you see. |
Hmm, I just looked at the posix documentation of |
Thanks for the quick reply and PR @rickard-green! I applied e90aa6f on top of OTP-24.1.4. With that, our tests no longer crash! |
Great, thanks! I've replaced that PR with PR #5345 which will treat |
* rickard/select-timeout-fix/GH-5339/OTP-17735: Limit timeout value in calls to select()
…t-24 * rickard/select-timeout-fix/GH-5339/OTP-17735: Limit timeout value in calls to select()
…t-23 * rickard/select-timeout-fix/GH-5339/OTP-17735: Limit timeout value in calls to select()
…t-22 * rickard/select-timeout-fix/GH-5339/OTP-17735: Limit timeout value in calls to select()
The fix has been released in the patch packages OTP 24.1.5, OTP 23.3.4.9, and OTP 22.3.4.23 now. |
Describe the bug
When running our test suite on macOS (and only there!), we are sometimes hit with this:
It seems that the
select_timeout
value can be too large, see this LLDB session (using a debug VM built with 947eb1f) :The fd sets in
select()
do not look suspicious. There aren't too many of them:To Reproduce
This happens during our large test suite. It does not always happen during the same tests, so I cannot provide a minimal example.
Affected versions
I can reliably reproduce this with OTP 24, but it also happens with earlier versions. We encountered it with OTP 22 and OTP 21 as well.
Additional context
I can currently trigger this reliably and also provide more debugging information as needed. Providing a core dump would also be possible if we can find a secure channel to do that. Note that our software uses NIFs implemented with rustler. Some of the NIFs run on dirty schedulers. However, we did not yet see any other indicators of corruption due to NIFs (no segfaults for example; we have been runnning the NIFs in one form or another for about 3 years).
macOS version information:
EINVAL
can be triggered forselect()
with the following C example on our test machine (empty fd sets!):The text was updated successfully, but these errors were encountered: