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

syscall: arm64: epoll_wait syscall not implemented #25813

Closed
nplanel opened this issue Jun 11, 2018 · 5 comments
Closed

syscall: arm64: epoll_wait syscall not implemented #25813

nplanel opened this issue Jun 11, 2018 · 5 comments

Comments

@nplanel
Copy link

@nplanel nplanel commented Jun 11, 2018

Please answer these questions before submitting your issue. Thanks!

Seems I found a syscall not implemented in latest golang (and earlier), I assume this is not the only one.
I didn't found any related GH issue to arm64 syscall not implemented or missing, so I created this ticket.

What version of Go are you using (go version)?

1.10.3

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Linux apm-mustang 4.16.14-300.fc28.aarch64 #1 SMP Tue Jun 5 16:00:29 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

GOARCH="arm64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GORACE=""
GOROOT="/home/user/.gimme/versions/go1.10.3.linux.arm64"
GOTMPDIR=""
GOTOOLDIR="/home/user/.gimme/versions/go1.10.3.linux.arm64/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build763200214=/tmp/go-build -gno-record-gcc-switches"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

package main

import (
"fmt"
"syscall"
)

func main() {
maxEpollEvents := 10
events := make([]syscall.EpollEvent, maxEpollEvents)

epollFd, err := syscall.EpollCreate1(0)
if err != nil {
	fmt.Printf("Failed to create epoll: %s", err)
}

_, err = syscall.EpollWait(epollFd, events[:], 200)
if err != nil {
	fmt.Printf("Failed to  epoll wait: %s", err)
}

}

What did you expect to see?

no output

What did you see instead?

Failed to epoll wait: function not implemented

@nplanel nplanel changed the title arm64: epoll syscall not implemented arm64: epoll_wait syscall not implemented Jun 11, 2018
@nplanel
Copy link
Author

@nplanel nplanel commented Jun 11, 2018

syscall epoll_pwait and epoll_wait are supported / tested : fc28 ; glibc 2.27 ; kernel 4.16.14-300.fc28.aarch64

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jun 11, 2018

Use gopath.org/x/sys/unix instead of syscall.

Leaving this open because I suppose we should fix the syscall package too. But even then you should use gopath.org/x/sys/unix instead.

@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Jun 11, 2018
@ianlancetaylor ianlancetaylor changed the title arm64: epoll_wait syscall not implemented syscall: arm64: epoll_wait syscall not implemented Jun 11, 2018
@nplanel
Copy link
Author

@nplanel nplanel commented Jun 11, 2018

I tested golang master and it's working fine, could you backport the fix ?

@tklauser
Copy link
Member

@tklauser tklauser commented Jun 11, 2018

In case we want to backport the fix in syscall, this was https://golang.org/cl/115735 (which will be part of the upcoming Go 1.11 release).

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Jul 10, 2018

If this is coming in Go 1.11, that's sufficient to close this bug.

This doesn't warrant backporting since there's an obvious workaround: use golang.org/x/sys/unix, which is recommended anyway. The syscall package should not be used.

@bradfitz bradfitz closed this Jul 10, 2018
dparalen added a commit to dparalen/kube-router that referenced this issue May 15, 2019
To be able to compile and run on the Linux@arm64 architecture
one has to use the golang.org/x/system/unix package instead
the system package. This is mainly due to these Go upstream
bugs that won't be fixed in the standard library:

- syscall: arm64: epoll_wait syscall not implemented
  golang/go#25813
  This can be worked around using cgo but then one
  hits this next bug:

- proposal: change type of syscall.EpollEvent.Pad from int32 to [8]byte
  golang/go#15435
  which in my case manifested as a stray FD being returned from
  the EpollWait function, triggering the "unexpected epoll behavior"
  error.
dparalen added a commit to dparalen/kube-router that referenced this issue May 16, 2019
To be able to compile and run on the Linux@arm64 architecture
one has to use the `golang.org/x/sys/unix` package instead
the `syscall` package. This is because of these Go upstream
bugs that won't be fixed in the standard library:

- syscall: arm64: epoll_wait syscall not implemented
  golang/go#25813
dparalen added a commit to dparalen/kube-router that referenced this issue May 20, 2019
To be able to compile and run on the Linux@arm64 architecture
one has to use the `golang.org/x/sys/unix` package instead
the `syscall` package. This is because of these Go upstream
bugs that won't be fixed in the standard library:

- syscall: arm64: epoll_wait syscall not implemented
  golang/go#25813
dparalen added a commit to dparalen/kube-router that referenced this issue May 27, 2019
To be able to compile and run on the Linux@arm64 architecture
one has to use the `golang.org/x/sys/unix` package instead
the `syscall` package. This is because of these Go upstream
bugs that won't be fixed in the standard library:

- syscall: arm64: epoll_wait syscall not implemented
  golang/go#25813
murali-reddy added a commit to cloudnativelabs/kube-router that referenced this issue May 27, 2019
* Make gobgp compile in an image

This patch adds Makefile logic, similar to the kube-router target,
allowing gobgp to be built in a container.

* Use unix.Epoll* functions

To be able to compile and run on the Linux@arm64 architecture
one has to use the `golang.org/x/sys/unix` package instead
the `syscall` package. This is because of these Go upstream
bugs that won't be fixed in the standard library:

- syscall: arm64: epoll_wait syscall not implemented
  golang/go#25813
@golang golang locked and limited conversation to collaborators Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.