-
Notifications
You must be signed in to change notification settings - Fork 18k
syscall: unimplemented EpollWait fails to return an error on android/arm64 #35479
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
Comments
Duplicate of #25813 |
Thanks for the explanation, appreciate it.
Oh, now that I look at it there is a deprecation warning:
But I must have missed it every single time I was browsing that page. Maybe making it bold or moving it to the top of the description would be a good idea. |
That was just a proof-of-concept code, I have other examples that do check it. I just verified this on my simple test code by adding a check for error from |
If you have a concrete example that demonstrates a nil |
Well, yes, I modified that test program: status-im/infra-utils@28aea97 & status-im/infra-utils@68a3244
See as |
The implementation of |
Change https://golang.org/cl/206838 mentions this issue: |
Change https://golang.org/cl/206858 mentions this issue: |
Check the fd returned in EpollEvent to detect potential padding issues. Also, fail the test if the number of events mismatches. Updates golang/go#35479 Change-Id: I39f856ca2c336e849876a33acffb70b82aa83c3f Reviewed-on: https://go-review.googlesource.com/c/sys/+/206858 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using?
Does this issue reproduce with the latest release?
Yes. Also tested it with
go1.13.1
.What operating system and processor architecture are you using?
I built the binary for Android with
GOARCH=arm64
on Linux withGOHOSTARCH=amd64
.What did you do?
I've built this test application that does TCP pinging using the
syscall
package, and found out that theEpollWait
call returns anEpollEvent
with onlyEvents
attribute set. TheFd
attribute is always set to0
when run onarm64
.Here's the code:
https://github.com/status-im/infra-utils/blob/113e4e50/tcp-ping/main.go
I ran it on my android device(OnePlus 6 with Android 9) with the following results:
As you can see the
EpollEvent
returned byEpollWait
has the 2nd attribute(Fd
) set to0
.I have fixed it by switching from using
syscall
package tox/sys/unix
:https://github.com/status-im/infra-utils/blob/ec20ad39/tcp-ping/main.go
What did you expect to see?
I expected the event returned from
EpollWait
to include the number of the file descriptor for which the event was triggered.What did you see instead?
File descriptor being set to
0
, making theEpollWait
call useless when used with multiple file descriptors.Notes
I understand that the
syscall
was frozen as of Go 1.3 and that it won't be fixed. My intention in creating this issue is maybe helping someone else avoid hours of research by finding this issue.I was also curious about why exactly the value for the file descriptor is always
0
.The text was updated successfully, but these errors were encountered: