Skip to content
New issue

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

Nushell locks the history file #502

Open
Gorian opened this issue Oct 26, 2022 · 0 comments
Open

Nushell locks the history file #502

Gorian opened this issue Oct 26, 2022 · 0 comments
Labels
A-History Area: History management bug Something isn't working P-high High Priority: Annoying bug, should be addressed with the next release

Comments

@Gorian
Copy link

Gorian commented Oct 26, 2022

Basic Info

Platform
Linux, Ubuntu 20.04

Terminal software
Windows Terminal

Nushell attempts to lock the history file. This means that nushell doesn't work when your home directory is mounted via a remote filesystem that doesn't support file locking, like NFSv3. I would think this could potentially cause issue with multiple instances of nushell via the same user as well.

Steps to reproduce

  1. Ensure your history file is on a non-locking filesystem, like NFSv3. Either by remotely mounting your home directory, or changing the file location
  2. run nushell. It will freeze while attempting to lock the file before exiting with an error.

strace

open("/home/net/$user/.config/nushell/history.txt", O_RDWR|O_CREAT|O_CLOEXEC, 0666) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
flock(5, LOCK_EX)                       = -1 EIO (Input/output error)
close(5)                                = 0
ioctl(1, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
write(2, "Error: ", 7Error: )                  = 7
write(2, "\n", 1
)                       = 1
write(2, "  \33[31m\303\227\33[0m I/O error (os erro"..., 36  × I/O error (os error 5)) = 36
write(2, "\n", 1
)                       = 1
write(2, "\n", 1
)                       = 1
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7f4376073000, 12288)           = 0
exit_group(1)                           = ?
+++ exited with 1 +++
@Gorian Gorian added the bug Something isn't working label Oct 26, 2022
@sholderbach sholderbach added A-History Area: History management P-high High Priority: Annoying bug, should be addressed with the next release labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-History Area: History management bug Something isn't working P-high High Priority: Annoying bug, should be addressed with the next release
Projects
None yet
Development

No branches or pull requests

2 participants