Skip to content

Fixed behavior of doSelect on EINTR #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LongHairedHacker
Copy link

I've been using this library for quite some time now and recently after upgrading all of my projects to go 1.14 I noticed that its gpio watcher would panic from time to time in fdSelect in watcher.go line 122.

After some investigation I found that the syscall.Select in doSelect terminates with EINTR.
I have no clue as to why that did not happen before, but possibly the upgrade to go 1.14 or other changes in my environment associated with it caused it.

Anyway, if I remember correctly it should be safe to retry a select after it terminated with EINTR,
so I modified doSelect accordingly.

@LongHairedHacker
Copy link
Author

LongHairedHacker commented Apr 7, 2020

This pull request on the upstream repo fixes the same issue in a different way: brian-armstrong#16
It also suggests that this problem might indeed be related to runtime changes in go.1.14.

//Edit: I should have done some basic research: https://golang.org/doc/go1.14#runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant