fzf: Fatal Error: Failed to open /dev/tty
I just installed this on my server via ssh and got this error when I pressed CTRL+R:
$(__fzf_history__)panic: Failed to open /dev/tty
goroutine 8 [running]:
github.com/junegunn/fzf/src/curses.Init(0xc82000e180, 0x470100)
/go/src/github.com/junegunn/fzf/src/curses/curses.go:261 +0xc9
github.com/junegunn/fzf/src.NewTerminal.func1()
/go/src/github.com/junegunn/fzf/src/terminal.go:233 +0x36
github.com/junegunn/fzf/src.(*Terminal).Loop(0xc820058b60)
/go/src/github.com/junegunn/fzf/src/terminal.go:744 +0x368
created by github.com/junegunn/fzf/src.Run
/go/src/github.com/junegunn/fzf/src/core.go:202 +0xe84
goroutine 1 [semacquire]:
sync.runtime_Syncsemacquire(0xc820018350)
/go1.5/src/runtime/sema.go:237 +0x201
sync.(*Cond).Wait(0xc820018340)
/go1.5/src/sync/cond.go:62 +0x9b
github.com/junegunn/fzf/src/util.(*EventBox).Wait(0xc82000e520, 0xc82004bef0)
/go/src/github.com/junegunn/fzf/src/util/eventbox.go:32 +0xb5
github.com/junegunn/fzf/src.Run(0xc82000c2c0)
/go/src/github.com/junegunn/fzf/src/core.go:275 +0xfb2
main.main()
/go/src/github.com/junegunn/fzf/src/fzf/main.go:6 +0x25
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/go1.5/src/runtime/asm_amd64.s:1696 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/go1.5/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/go1.5/src/os/signal/signal_unix.go:28 +0x37
goroutine 11 [runnable]:
github.com/junegunn/fzf/src.(*Terminal).Loop.func2(0xc82001c540, 0xc820058b60)
/go/src/github.com/junegunn/fzf/src/terminal.go:736
created by github.com/junegunn/fzf/src.(*Terminal).Loop
/go/src/github.com/junegunn/fzf/src/terminal.go:741 +0x330
goroutine 7 [semacquire]:
sync.runtime_Syncsemacquire(0xc820018390)
/go1.5/src/runtime/sema.go:237 +0x201
sync.(*Cond).Wait(0xc820018380)
/go1.5/src/sync/cond.go:62 +0x9b
github.com/junegunn/fzf/src/util.(*EventBox).Wait(0xc82000e580, 0xc820028f60)
/go/src/github.com/junegunn/fzf/src/util/eventbox.go:32 +0xb5
github.com/junegunn/fzf/src.(*Matcher).Loop(0xc8200127e0)
/go/src/github.com/junegunn/fzf/src/matcher.go:67 +0x93
created by github.com/junegunn/fzf/src.Run
/go/src/github.com/junegunn/fzf/src/core.go:197 +0xe18
goroutine 9 [runnable, locked to thread]:
runtime.gopark(0x622d40, 0xc82001c478, 0x5dd050, 0x9, 0x16, 0x3)
/go1.5/src/runtime/proc.go:185 +0x163
runtime.goparkunlock(0xc82001c478, 0x5dd050, 0x9, 0x16, 0x3)
/go1.5/src/runtime/proc.go:191 +0x54
runtime.chansend(0x55ee20, 0xc82001c420, 0xc82002970c, 0xc820029601, 0x453369, 0x2)
/go1.5/src/runtime/chan.go:197 +0x499
runtime.chansend1(0x55ee20, 0xc82001c420, 0xc82002970c)
/go1.5/src/runtime/chan.go:92 +0x43
runtime.ensureSigM.func1()
/go1.5/src/runtime/signal1_unix.go:238 +0x2a9
runtime.goexit()
/go1.5/src/runtime/asm_amd64.s:1696 +0x1
goroutine 10 [chan receive]:
github.com/junegunn/fzf/src.(*Terminal).Loop.func1(0xc82001c3c0, 0xc820058b60)
/go/src/github.com/junegunn/fzf/src/terminal.go:730 +0x36
created by github.com/junegunn/fzf/src.(*Terminal).Loop
/go/src/github.com/junegunn/fzf/src/terminal.go:732 +0x1e2
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 23 (11 by maintainers)
Commits related to this issue
- Implement ttyname() in case /dev/tty is not available Close #1266 Close #447 — committed to junegunn/fzf by junegunn 6 years ago
- Remove preview from fzf For some reason this was causing errors. > Failed to open /dev/tty I don't know why this started happening suddenly, but I don't have time to debug further. The following git... — committed to ethomas2/dotfiles by deleted user 5 years ago
For the users running into this after Ubuntu update, it’s a kernel regression. See https://github.com/junegunn/fzf/issues/1486