cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.75k stars 176 forks source link

Error encountered when calling ioctl #331

Closed alxchk closed 1 year ago

alxchk commented 1 year ago

I have strange issue with mcfly in root/bash (zsh/user works fine). The crash happens when item selected and tab pressed (i.e. when completion should be passed to the terminal). I can't see this at screen (because terminal cleared) however can from strace:


fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0
fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=2}) = 0
fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
ioctl(0, TIOCSTI, "s")                  = -1 EIO (Input/output error)
write(2, "thread '", 8)                 = 8
write(2, "main", 4)                     = 4
write(2, "' panicked at '", 15)         = 15
write(2, "Error encountered when calling ioctl", 36) = 36
write(2, "', ", 3)                      = 3
write(2, "src/fake_typer.rs", 17)       = 17
write(2, ":", 1)                        = 1
write(2, "14", 2)                       = 2
write(2, ":", 1)                        = 1
write(2, "13", 2)                       = 2
write(2, "\n", 1)                       = 1
getcwd("/root", 512)                    = 6
write(2, "stack backtrace:\n", 17)      = 17
futex(0x7ff8d7ec4070, FUTEX_WAKE_PRIVATE, 2147483647) = 0
readlink("/proc/self/exe", "/usr/bin/mcfly", 256) = 14
openat(AT_FDCWD, "/usr/bin/mcfly", O_RDONLY|O_CLOEXEC) = 4```
cantino commented 1 year ago

Perhaps related to https://github.com/cantino/mcfly/issues/212?

alxchk commented 1 year ago

Yes, looks like it