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

exp/inotify: Read hangs, AddWatch, RemoveWatch fail on recreated directories #2483

Closed
ugorji opened this issue Nov 18, 2011 · 13 comments
Closed

Comments

@ugorji
Copy link
Contributor

ugorji commented Nov 18, 2011

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
- If I am watching a directory, and delete it, and recreate it, 
  and watch it again, any events after that are hosed:
  - the event.Name is incomplete, with the path stripped out e.g. 
    instead of /home/myname/a/b/c/d.txt, I get /d.txt
    instead of /home/myname/a/b/c/, I get ""
  - RemoveWatch fails with message: invalid argument
  - Close() doesn't really close. Most times, the reader goroutine hangs.

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Ubuntu Linux 2.6.38-12-generic #51-Ubuntu SMP 32-bit GNU/Linux

Which revision are you using?  (hg identify)
6abf04c86097+ tip


Please provide any additional information below.
@ugorji
Copy link
Contributor Author

ugorji commented Nov 21, 2011

Comment 1:

Fix up for review at: http://golang.org/cl/5418045/

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 2:

Labels changed: added priority-later, removed priority-medium.

@rsc
Copy link
Contributor

rsc commented Jan 29, 2012

Comment 3:

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 4:

Labels changed: added go1.1maybe.

@mb0
Copy link

mb0 commented Sep 26, 2012

Comment 5:

simple 5 line fix that removes the watch whenever inotify removes the watch (sends the
IN_IGNORED event).
http://golang.org/cl/6553059/

@robpike
Copy link
Contributor

robpike commented Mar 7, 2013

Comment 6:

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 7:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 8:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: added repo-exp.

@ianlancetaylor
Copy link
Contributor

Comment 10:

Labels changed: added release-go1.4, removed priority-later, release-none.

@nathany
Copy link
Contributor

nathany commented Sep 11, 2014

Comment 11:

Ken-ichirou MATSUAWA opened a pull request for this issue in fsnotify.
https://github.com/go-fsnotify/fsnotify/pull/39

@rsc
Copy link
Contributor

rsc commented Sep 15, 2014

Comment 12:

Not in release, no release tag needed.

Labels changed: added release-none, removed release-go1.4.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed the release-none label Apr 10, 2015
@rsc
Copy link
Contributor

rsc commented Apr 14, 2015

fsnotify has been removed from exp

@rsc rsc closed this as completed Apr 14, 2015
mpolden added a commit to mpolden/unp that referenced this issue Jul 21, 2015
Replace the deprecated golang.org/x/exp/inotify dependency with
github.com/rjeczalik/notify.

This solves the issue with rewatching of deleted directories:
golang/go#2483, which was never fixed in exp.

The notify package also provides recursive watching which replaces the
existing custom code.
@golang golang locked and limited conversation to collaborators Jun 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants