Closed dmage closed 9 years ago
Checks out. Thank you!
I reproduced this error with current development head after code I wrote caused a panic. Tried closing and restarting visual studio to no effect. Ah, interesting, deleting the generated EXE and re-running the daemon seems to have done it. Trying to file a good bug report so I explicity called panic in a controller and the daemon continued to operate as expected. Unreproduceable but still active bug. I've seen this a few times now so I'll keep an eye out for more information.
I have reproduced this bug after killing all processes, deleting my exe, logging out, and eventually restarting the computer. I can no longer make CompileDaemon, I just get the deadlock. And... its working again. I tried running CompileDaemon by itself, no other parameters, that worked, everything after that worked. Will continue to report back as I discover more.
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]: github.com/fsnotify/fsnotify.(*Watcher).Add(0xc00002e580, {0xc0005068b0?, 0x1?}) C:/Users/Me/go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/windows.go:81 +0x108 main.NotifyWatcher.add(...) C:/Users/Me/go/pkg/mod/github.com/githubnemo/!compile!daemon@v1.4.0/watcher.go:86 main.addFiles.func1({0xc0005068b0, 0xf}, {0x942960?, 0xc0002d3c00?}, {0x0, 0x0}) C:/Users/Me/go/pkg/mod/github.com/githubnemo/!compile!daemon@v1.4.0/watcher.go:182 +0x127 path/filepath.walk({0xc0005068b0, 0xf}, {0x942960, 0xc0002d3c00}, 0xc000491e40) C:/Program Files/Go/src/path/filepath/path.go:484 +0xba path/filepath.walk({0xc00001a7e0, 0xc}, {0x942960, 0xc0001237a0}, 0xc000491e40) C:/Program Files/Go/src/path/filepath/path.go:504 +0x26f path/filepath.walk({0xc00001a318, 0x4}, {0x942960, 0xc000122690}, 0xc000491e40) C:/Program Files/Go/src/path/filepath/path.go:504 +0x26f path/filepath.walk({0xc00001a0cb, 0x1}, {0x942960, 0xc0001225b0}, 0xc000491e40) C:/Program Files/Go/src/path/filepath/path.go:504 +0x26f path/filepath.Walk({0xc00001a0cb, 0x1}, 0xc000107e40) C:/Program Files/Go/src/path/filepath/path.go:571 +0x6c main.addFiles({0x9428e0, 0xc000056140}) C:/Users/Me/go/pkg/mod/github.com/githubnemo/!compile!daemon@v1.4.0/watcher.go:174 +0xe8 main.NotifyWatcher.AddFiles(...) C:/Users/Me/go/pkg/mod/github.com/githubnemo/!compile!daemon@v1.4.0/watcher.go:56 main.main() C:/Users/Me/go/pkg/mod/github.com/githubnemo/!compile!daemon@v1.4.0/daemon.go:422 +0x406
goroutine 6 [select, locked to thread]: github.com/fsnotify/fsnotify.(Watcher).sendEvent(0xc00002e580, {0xc00016ba50?, 0xc000061d24?}, 0xfff?) C:/Users/Me/go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/windows.go:522 +0xbc github.com/fsnotify/fsnotify.(Watcher).readEvents(0xc00002e580) C:/Users/Me/go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/windows.go:488 +0xa90 created by github.com/fsnotify/fsnotify.NewWatcher C:/Users/Me/go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/windows.go:46 +0x1d6
Steps to reproduce:
go run daemon.go process_posix.go -build="false" -command="pwd"
Example of panic after detected deadlock: