We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code reproduces this.
// test.go package main import ( "github.com/hpcloud/tail" "io/ioutil" ) func main() { ioutil.WriteFile("test.log", []byte("hoge\n"), 0644) t, _ := tail.TailFile("test.log", tail.Config{}) t.Stop() }
> go run test.go fatal error: all goroutines are asleep - deadlock! goroutine 1 [chan receive]: github.com/hpcloud/tail/vendor/gopkg.in/tomb%2ev1.(*Tomb).Wait(0xc82007a078, 0x0, 0x0) /Users/skaji/src/github.com/hpcloud/tail/vendor/gopkg.in/tomb.v1/tomb.go:113 +0x58 github.com/hpcloud/tail.(*Tail).Stop(0xc82007a000, 0x0, 0x0) /Users/skaji/src/github.com/hpcloud/tail/tail.go:164 +0x5f main.main() /Users/skaji/test.go:12 +0xee goroutine 5 [chan send]: github.com/hpcloud/tail.(*Tail).sendLine(0xc82007a000, 0xc82000a420, 0x4, 0x0) /Users/skaji/src/github.com/hpcloud/tail/tail.go:418 +0x23a github.com/hpcloud/tail.(*Tail).tailFileSync(0xc82007a000) /Users/skaji/src/github.com/hpcloud/tail/tail.go:272 +0x686 created by github.com/hpcloud/tail.TailFile /Users/skaji/src/github.com/hpcloud/tail/tail.go:133 +0x421 exit status 2
The text was updated successfully, but these errors were encountered:
Fix deadlock when stopping on non-empty file/buffer
7f7d37f
At the same time also fix some lint issues (deadcode and comments). Fixes hpcloud/tail#93
Fix deadlock when stopping on non-empty file/buffer (#7)
b6839f5
Successfully merging a pull request may close this issue.
The following code reproduces this.
The text was updated successfully, but these errors were encountered: