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
runtime: fatal error polling some file descriptors on macOS Mojave #37726
Comments
I have found that if the _test file is compiled first with However, when run the go source file directly by |
Also, in macos when calling |
/cc @ianlancetaylor for maybe related issue #35566 |
nothing yet ? :( |
@maurorappa While every issue is important to us, please try to be patient as many of us are also juggling personal health and responses to the pandemic. |
What is the real code doing that causes this problem? While clearly using |
If the problem only happens with file descriptor 4, then it's because file descriptor 4 is being used by the runtime package. The runtime package treats the descriptor specially, and only expects it to be polled for read. Using |
A number of our tools run primarily in a subprocess, and the main process passes stdin, stdout and stderr in via |
@jbardin Can you show a complete example that demonstrates the problem, and show what happens when you run it? The example above is different in relevant ways from what you are describing. Thanks. |
Thanks @ianlancetaylor, I'll try to put together a standalone example, (need to find a Mojave machine to debug on). The test example above has the exact same fatal error output as what we're experiencing, so thought it might be close enough. I did however confirm that simply passing stdin, stdout, stderr on 3, 4, 5 works, so there must be something else involved here, and it also seems strange it's related to a specific OS version as well. |
I'm fairly certain that the error |
Thanks again Ian, I see what's going on now. I had time to track this down and find where the file descriptors were being used in the incorrect process. |
Thanks for following up. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
The following test file crashes on macOS Mojave
With the output:
The same error was seen in #35566, but that fix was only for the test in question.
This isn't directly related to testing however, as we've seen this with normal production binaries.
The text was updated successfully, but these errors were encountered: