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
Panic on Mac OS X when debugging #212
Comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I have been able to work around the panic by making the following modification in kqueue.go:
|
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@glyn https://github.com/windmilleng/fsnotify the branch have done |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
+1 I have added some code to avoid this issue on my local machine kquene.go func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) {
n, err := unix.Kevent(kq, nil, events, timeout)
if err != nil {
return nil, err
}
+ if len(events) < n {
+ n = 0
+ }
return events[0:n], nil
} |
I tried to reproduce this on FreeBSD, but wasn't able to. I used the CLI I added in #463 where I replaced the chan at the end with:
Then I ran
And created events in another terminal (not sure this is needed):
Things seem to work when I keep continue-ing and I see the events, so either my steps are wrong, it appears only on macOS and not FreeBSD, or it was a bug in delve that has since been fixed. The problem is that I don't know what the best fix is: if The return value of |
I'll close this now assuming this is no longer an issue; please comment if it still is with steps to reproduce and we can open, investigate, and fix. |
Before reporting an issue, please ensure you are using the latest release of fsnotify.
Which operating system (GOOS) and version are you using?
OS:
ProductName: Mac OS X
ProductVersion: 10.12.5
BuildVersion: 16F73
Go:
go version go1.8.3 darwin/amd64
Delve:
Delve Debugger
Version: 1.0.0-rc.1
Build:
IDE:
Visual Studio Code
Ver 1.14.1 (1.14.1)
2648980a697a4c8fb5777dcfb2ab110cec8a2f58
2017-07-13T19:05:02.227Z
Please describe the issue that occurred.
When execution continues after stop at breakpoint then panic raised at kqueue.go -> read(kq int, events []unix.Kevent_t, timeout *unix.Timespec)
Are you able to reproduce the issue? Please provide steps to reproduce and a code sample if possible.
I added log in this function
and it prints
The text was updated successfully, but these errors were encountered: