{"action":"created","issue":{"url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/99","labels_url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/99/comments","events_url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/99/events","html_url":"https://github.com/go-fsnotify/fsnotify/issues/99","id":112612821,"number":99,"title":"Date race","user":{"login":"djui","id":99752,"avatar_url":"https://avatars.githubusercontent.com/u/99752?v=3","gravatar_id":"","url":"https://api.github.com/users/djui","html_url":"https://github.com/djui","followers_url":"https://api.github.com/users/djui/followers","following_url":"https://api.github.com/users/djui/following{/other_user}","gists_url":"https://api.github.com/users/djui/gists{/gist_id}","starred_url":"https://api.github.com/users/djui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djui/subscriptions","organizations_url":"https://api.github.com/users/djui/orgs","repos_url":"https://api.github.com/users/djui/repos","events_url":"https://api.github.com/users/djui/events{/privacy}","received_events_url":"https://api.github.com/users/djui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-21T15:16:48Z","updated_at":"2015-10-21T18:26:35Z","closed_at":null,"body":"While race testing some of my code I got the following. Seems like watcher are being close although they have been already removed...\r\n\r\n```\r\nWARNING: DATA RACE\r\nWrite by goroutine 101:\r\n  runtime.mapdelete()\r\n      /usr/local/Cellar/go/1.5.1/libexec/src/runtime/hashmap.go:511 +0x0\r\n  ./vendor/gopkg.in/fsnotify%2ev1.(*Watcher).Remove()\r\n      ./vendor/gopkg.in/fsnotify.v1/kqueue.go:119 +0x4ed\r\n  ./vendor/gopkg.in/fsnotify%2ev1.(*Watcher).readEvents()\r\n      ./vendor/gopkg.in/fsnotify.v1/kqueue.go:291 +0x878\r\n\r\nPrevious read by goroutine 189:\r\n  runtime.mapiternext()\r\n      /usr/local/Cellar/go/1.5.1/libexec/src/runtime/hashmap.go:621 +0x0\r\n  ./vendor/gopkg.in/fsnotify%2ev1.(*Watcher).Close()\r\n      ./vendor/gopkg.in/fsnotify.v1/kqueue.go:80 +0x233\r\n  ./vendor/gopkg.in/fsnotify%2ev1.(*Watcher).Close-fm()\r\n      ./foo/foo.go:157 +0x3b\r\n  ..LogCloseError()\r\n      ./log_close_error.go:9 +0x48\r\n  ./foo.(*fooReader).monitor.func1()\r\n      ./foo/foo.go:178 +0x512\r\n\r\nGoroutine 101 (running) created at:\r\n  ./vendor/gopkg.in/fsnotify%2ev1.NewWatcher()\r\n      ./vendor/gopkg.in/fsnotify.v1/kqueue.go:61 +0x443\r\n  ./foo.(*fooReader).monitor()\r\n      ./foo/foo.go:146 +0x58\r\n  ./foo.New()\r\n      ./foo/foo.go:48 +0x31b\r\n  ./foo_test.TestClosing()\r\n      ./foo/foo_test.go:118 +0x3e2\r\n  testing.tRunner()\r\n      /usr/local/Cellar/go/1.5.1/libexec/src/testing/testing.go:456 +0xdc\r\n\r\nGoroutine 189 (running) created at:\r\n  ./foo.(*fooReader).monitor()\r\n      ./foo/foo.go:181 +0x228\r\n  ./foo.New()\r\n      ./foo/foo.go:48 +0x31b\r\n  ./foo_test.TestClosing()\r\n      ./foo/foo_test.go:118 +0x3e2\r\n  testing.tRunner()\r\n      /usr/local/Cellar/go/1.5.1/libexec/src/testing/testing.go:456 +0xdc\r\n==================\r\nFound 1 data race(s)\r\n```"},"comment":{"url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/comments/149985376","html_url":"https://github.com/go-fsnotify/fsnotify/issues/99#issuecomment-149985376","issue_url":"https://api.github.com/repos/go-fsnotify/fsnotify/issues/99","id":149985376,"user":{"login":"nathany","id":4566,"avatar_url":"https://avatars.githubusercontent.com/u/4566?v=3","gravatar_id":"","url":"https://api.github.com/users/nathany","html_url":"https://github.com/nathany","followers_url":"https://api.github.com/users/nathany/followers","following_url":"https://api.github.com/users/nathany/following{/other_user}","gists_url":"https://api.github.com/users/nathany/gists{/gist_id}","starred_url":"https://api.github.com/users/nathany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathany/subscriptions","organizations_url":"https://api.github.com/users/nathany/orgs","repos_url":"https://api.github.com/users/nathany/repos","events_url":"https://api.github.com/users/nathany/events{/privacy}","received_events_url":"https://api.github.com/users/nathany/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T18:26:35Z","updated_at":"2015-10-21T18:26:35Z","body":"yikes. What OS did you encounter this on?\n\nIf possible, can you provide a small code sample that reproduces the issue?"}}