-
Notifications
You must be signed in to change notification settings - Fork 128
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
epoll_wait syscall doesn't exist on arm64. #116
Conversation
834396b
to
0764e32
Compare
watcher_inotify.go
Outdated
@@ -13,14 +13,16 @@ import ( | |||
"runtime" | |||
"sync" | |||
"sync/atomic" | |||
"syscall" | |||
|
|||
"golang.org/x/sys/unix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should go under unsafe import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/cc @ppknap |
@harshavardhana You'd also need to add missing import to event_kqueue.go:
Goimports seems to not like build tags. Thanks for the PR! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please fix missing import in event_kqueue.go
One more:
You can test build with:
|
With 465c9e8 fen does not work anymore. Tests hang:
|
Regression in x/sys? Do you have a chance to debug on which syscall does it
hang? Is it epoll\_pwait?
pblaszczyk <notifications@github.com> schrieb am Di. 28. Feb. 2017 um 17:09:
… With 465c9e8
<465c9e8>
fen does not work anymore. Tests hang:
$ go test -v ./...
=== RUN TestEventString
--- PASS: TestEventString (0.00s)
=== RUN TestNotifyExample
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABG7ITnpDNCHhWTUIPsfaOIHXptF6IZTks5rhEahgaJpZM4MODN->
.
|
What is the operating system you are using? @pblaszczyk |
watcher_fen.go
Outdated
@@ -97,9 +98,9 @@ func (f *fen) Init() (err error) { | |||
} | |||
|
|||
func fi2fo(fi os.FileInfo, p string) FileObj { | |||
st, ok := fi.Sys().(*syscall.Stat_t) | |||
st, ok := fi.Sys().(*unix.Stat_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fi
is a regular os.FileInfo
from os.Stat
. As such fi.Sys()
returns standard *syscall.Stat_t
.
watcher_fen.go
Outdated
if !ok { | ||
panic(fmt.Sprintf("fen: type should be *syscall.Stat_t, %T instead", st)) | ||
panic(fmt.Sprintf("fen: type should be *unix.Stat_t, %T instead", st)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here should be syscall
instead of unix
.
If we are here already you could change st
to fi.Sys()
.
@harshavardhana I'm using OmniOS. |
@pblaszczyk can you try the latest push? |
Yes, reverting all changes to fen makes it work. |
yeah that's what i expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two little things more
watcher_readdcw.go
Outdated
@@ -12,6 +12,7 @@ import ( | |||
"sync" | |||
"sync/atomic" | |||
"syscall" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this empty line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
event_readdcw.go
Outdated
@@ -45,7 +45,7 @@ const ( | |||
) | |||
|
|||
// according to: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx | |||
// this flag should be declared in: http://golang.org/src/pkg/syscall/ztypes_windows.go | |||
// this flag should be declared in: http://golang.org/src/pkg/syscall.ztypes_windows.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a valid URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
S3 is down guys :-) so Travis not conclusive. |
7582aad
to
70daf29
Compare
Implement it with by calling epoll_pwait(). According to man epoll_pwait, calling epoll_pwait with sigmask of NULL is identical to epoll_wait. Bring the fixes from golang.org/x/sys/unix to support these transparently on arm64. This is needed to fix minio/mc#2047
Anything else pending on this @rjeczalik @pblaszczyk @ppknap ? |
@harshavardhana Nope, merged. Thanks for the PR! |
Thanks @harshavardhana 💯 |
Implement it with by calling epoll_pwait(). According to man epoll_pwait,
calling epoll_pwait with sigmask of NULL is identical to
epoll_wait.
Bring the fixes from golang.org/x/sys/unix to support these
transparently on arm64.
This is needed to fix minio/mc#2047