Open bradfeehan opened 3 months ago
It's a bug in the OS. See https://github.com/romkatv/gitstatus/issues?q=%22Linux+spin%22, or https://github.com/romkatv/gitstatus/issues/386.
Ah, thank you so much for tracking those down. Yes, I'm a user of Isospin, Shopify's internal OS used for our development environments.
It's not public, but since it seems to be an issue with FIFO pipes, maybe you could suggest a simple reproduction of what gitstatusd/powerlevel is doing with FIFOs? I haven't used them before.
I wonder if it's because the /tmp
filesystem is mounted as nodev
?
$ mount
...
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)
...
Though I can create one:
$ mkfifo /tmp/foo
$ ls -al /tmp/foo
prw-rw-r-- 1 spin spin 0 Apr 9 13:36 /tmp/foo|
And it seems that writing and reading works:
$ echo lol >> foo & # this blocks waiting for a read
[1] 293438
$ jobs
[1] + running echo lol >> foo
$ cat foo
lol
[1] + 293438 done echo lol >> foo
this bug happens on new shells, but when I interrupt (Ctrl+C), then run exec zsh
most of the time everything works fine.
I wonder if it's because the
/tmp
filesystem is mounted asnodev
?
This should not matter: fifos aren't devices.
Perhaps you can reproduce the problem by replacing the content of your .zshrc
with the test code you posted above (the one that creates a fifo) and spawning shells. If that does not help, you can try doing what gitstatus does: opening the fifo for reading with exec </tmp/fifo
and for writing with sysopen -w -o cloexec -u fd /tmp/fifo
. You'll need to run zmodload zsh/system
beforehand to make sysopen
available. Try opening the fifo for reading and writing in a different order.
You can also dump the stack of the two processes when they hang and send them to the OS people.
Thanks for a great shell setup with powerlevel10k and gitstatusd 👏
I've used it successfully on my Mac for ages, but starting to use my dotfiles on Linux machines, my shell hangs indefinitely sometimes when opening a new shell. If I press Ctrl+C to interrupt it, I get this error:
Seems that it was waiting for
mkfifo
, or more so, the act of writing to the pipe is blocking. Any tips for further troubleshooting?