-
-
Notifications
You must be signed in to change notification settings - Fork 887
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
Does not work in powerpc64 or arm64 #130
Comments
This also happens in normal ppc64 (bigendian) |
In arm64, it just fails with "function not implemented":
|
Hi Martín. Thanks for reporting the issues. Unfortunately I don't have access to Linux on these architectures to test with nor do we have CI/builders on those architectures to catch the issues. The poller code that is failing was submitted by @PieterD in #66 and switched to |
Indeed looks like wrapping epoll_wait to epoll_pwait is needed for arm64. just adding epoll_create1 wasn't enough. I think in go users shouldn't mess with signals, we should only ever pass sigmask of Null to epoll_pwait, which is then identical to epoll_wait. I'll study a bit and propose fix(es). |
I also don't have those architectures, sorry. |
thanks Riku as to the errors on PowerPC, I really have no idea 😢 |
Thanks to all for taking a look! I have access to porter machines in these architectures, as a Debian Developer, but it is not very easy to request access for third parties. I can test whatever you need though. |
I opened this golang issue for the failures on ppc64le: golang/go#15135. |
Thanks @laboger. Are you planning to do a CL for syscall? Should fsnotify switch from using standard libraries syscall to https://godoc.org/golang.org/x/sys? |
Yes I will create a CL and test it for ppc64 & ppc64le. I'm not sure if this fixes arm64 and can't test it there. There might be more than one issue to fix, I'll have to see once I can try it. I think it is best to fix the Go standard libraries syscall and use that. I'm not familiar with what's in golang.org/x/sys or why you'd use it instead. |
Fixing the standard libraries syscall would be preferable. I just thought it was frozen since Go 1.3, but maybe bugfixes are still okay. Thanks. |
I have been testing a patch on ppc64 and ppc64le. All the tests say PASS but when it gets to the end it says FAIL and I'm not sure why. If I run it multiple times in a row it will sometime say PASS at the end. Any clues? |
Is it timing out? Many of the tests only wait so long for the notifications to occur. |
@laboger Care to share that patch? I could run some tests too. |
The syscall package is locked since 1.4[1], all new changes are in x/sys[2] The fixes for epoll/arm64 are going to be loaded to x/sys/unix. This commit is straightforward search/replace with a couple of hand edits. This is needed for fixing fsnotify#130 [1] https://golang.org/s/go1.4-syscall [2] https://godoc.org/golang.org/x/sys/unix
I've submitted a proposed fix for the arm64 side to: |
@suihkulokki To test that, get the current prometheus source from Debian sid, remove the Thanks for working on this! |
Alternatively, you can just download and build prometheus from upstream, which will run al the tests (fsnotify is not yet disabled upstream, but there is a pending PR) |
epoll_wait syscall doesn't exist on arm64. Implement it with by callign epoll_pwait(). According to man epoll_pwait, calling epoll_pwait with sigmask of NULL is identical to epoll_wait. Testing exposed that EpollEvent needs padding on arm64 like on arm. This changeset is to fix: fsnotify/fsnotify#130 Testcase: go test with fsnotify ported from syscall to x/sys: https://github.com/suihkulokki/fsnotify/tree/go-sys Change-Id: I76136bf4c82c2ee597549133848f490da46dd488 Reviewed-on: https://go-review.googlesource.com/21971 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
The syscall package is locked since 1.4[1], all new changes are in x/sys[2] The fixes for epoll/arm64 are going to be loaded to x/sys/unix. This commit is straightforward search/replace with a couple of hand edits. This is needed for fixing fsnotify#130 [1] https://golang.org/s/go1.4-syscall [2] https://godoc.org/golang.org/x/sys/unix
The syscall package is locked since 1.4[1], all new changes are in x/sys[2] The fixes for epoll/arm64 are going to be loaded to x/sys/unix. This commit is straightforward search/replace with a couple of hand edits. This is needed for fixing #130 [1] https://golang.org/s/go1.4-syscall [2] https://godoc.org/golang.org/x/sys/unix closes #135
@TheTincho Can you test arm64 with v1.3.0. It should be working now that @suihkulokki's patch is in: https://go-review.googlesource.com/#/c/21971/ |
We really need to get builders #136 setup for these environments. That way we can ensure they are continuing to work with other changes, and we could also see any test failures that occur. |
@laboger Are you still seeing test failures sometimes? If you are running with the verbose ( |
@nathany I am unable to build the fsnotify test now on ppc64le with the latest golang. src/github.com/fsnotify/fsnotify/inotify.go:39: undefined: unix.InotifyInit Looks like the switch was made to use golang.org/x/sys/unix but that is missing some functions for ppc64le and ppc64. (Same errors in both) |
@laboger Apologies. I merged that change before looking at the work you had done on the syscall library. Would you be willing to submit your syscall changes and any other necessary changes as a CL on golang.org/x/sys/unix? That will enable powerpc to work even on Go 1.5 rather than requiring 1.6.2. I'm looking into getting Go's builder machines in place for fsnotify. That way we can ensure it is tested across linux/arm64 and ppc to avoid such issues in the future. |
I created this golang issue to make the necessary updates to golang.org/x/sys/unix. golang/go#15393. |
Thanks Lynn. |
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Sorry @laboger, I didn't notice ppc was fixed in syscall instead of x/sys. I ended up patching x/sys since some earlier syscall changes I had proposed were rejected and I was told to update x/sys instead. |
@suihkulokki, can you clarify what you mean that previous syscall changes were rejected? Do you mean by the golang community or fsnotify? BOTH golang syscall and golang.org/x/sys/unix had incorrect implementations of the structure EpollEvent for use with epoll syscalls on ppc64x and both need to be fixed if they are going to be used. I'm not sure why you'd fix one and not the other. |
@laboger syscall was supposedly frozen when x/sys was extracted. |
@laboger Here is the relevant proposal and mailing list thread https://docs.google.com/document/d/1QXzI9I1pOfZPujQzxhyRy6EeHYTQitKKjHfpq0zpxZs/edit https://groups.google.com/forum/#!topic/golang-dev/gyOoSwxBkCA
|
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
This whole thing has brought to light something I didn't realize. There are quite a lot of changes to the "frozen" The copy to |
So I've posted a message to golang-dev regarding this whole confusing situation with syscall vs. x/sys: https://groups.google.com/forum/#!topic/golang-dev/cEASnHIXmLI I still think the switch to |
According to git log on syscall, the following changes there are missing from x/sys:
|
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Fixes #15393 Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
There is an open CL for ppc from @clnperez. https://go-review.googlesource.com/#/c/22605/ I'm not sure about s390x. |
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Fixes #15393 Change-Id: Iedad28274ec1d3e48787c34991a725690f3b204d Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
The epoll_event struct was not correct for ppc64* arches. This has been fixed in the syscall package by CL 22207. This patch makes the same change, in addition to adding some missing syscalls needed by fsnotify. See the following for more info: fsnotify/fsnotify#130 golang/go#15393 Fixes #15393 Change-Id: Iedad28274ec1d3e48787c34991a725690f3b204d Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com> Reviewed-on: https://go-review.googlesource.com/22605 Reviewed-by: Ian Lance Taylor <iant@golang.org>
The change list (CL) has been submitted. Thanks Christy.
I don't think any changes are need to fsnotify itself for this update. @TheTincho Can you please test it out. |
Np @nathany. I ran the fsnotify tests on ppc64le as part of my patch validation before submitting and things seemed fine, but more testing is always a good thing. |
Thanks everybody! I am preparing updated packages for x/sys and fsnotify. Will update with test results as soon as I have them. |
I have tested this in the 3 affected arches, and everything seems to work correctly now. Thanks to everybody involved!! |
Hi,
I package prometheus for Debian. And I am getting build errors in ppc64el, which seem to originate in fsnotify. If I try to run fsnotify's tests there I get all kind of failures, and a hang:
The text was updated successfully, but these errors were encountered: