Giter Site home page Giter Site logo

Comments (9)

pajlada avatar pajlada commented on June 3, 2024 3

Also being tracked axboe/liburing#1113 - there's a kernel patch in there you can try out

from neovim.

y0rune avatar y0rune commented on June 3, 2024 1

As far as @pajlada found out the problem with libuv. According to libuv/libuv#4377. It can be a issue with kernel. Workaround is to disable export UV_USE_IO_URING=0.

from neovim.

ichernev avatar ichernev commented on June 3, 2024 1

@pajlada patch works!

For anybody trying to reproduce in arch linux:

pacman -S devtools # for pkgctl
# use your current linux version (or another...)
pkgctl repo clone --protocol=https --switch="6.8.2.arch2-1" linux
cd linux
# copy patch to fix-neovim.patch https://git.kernel.dk/cgit/linux/patch/?id=e5444baa42e545bb929ba56c497e7f3c73634099
# add fix-neovim.patch to source array in `PKGCONFIG`
# add -j16 to make all command to speed up build
# tweak pkgrel in PKGCONFIG to change the version
makepkg -s --skipchecksums --skippgpcheck
pacman -U *.tar.zst # install the new package

from neovim.

fredizzimo avatar fredizzimo commented on June 3, 2024 1

It can be repeated with just one instance as reported in the original post of this issue on some systems. And I original detected this when running the Neovim unit tests, which I don't think were suspending at all at that point.

But it's system dependent, I can't repeat it on this system for example, both with nearly the same sets of packages and updated to the Arch Linux latest. So, on some systems, it might only be repeatable with two instances.

The timing was quite unfortunate for the kernel, since the 6.8.3 kernel release came out the same day as the fix was made, so it didn't make it into that. There was also another 6.8.4 release just two hours ago, but it was just a very minor patch version, and does not include it either.

from neovim.

ichernev avatar ichernev commented on June 3, 2024

A workaround is to put map <c-z> :echo "NO"<CR> in the config.

from neovim.

fredizzimo avatar fredizzimo commented on June 3, 2024

I can repeat this as well.

And it looks like it might be related to this https://bbs.archlinux.org/viewtopic.php?pid=2161746, which might be a kernel bug, or a packaging bug in Arch Linux.

The symptoms are the same all terminals, including TTYs freeze, but the trigger is different.

from neovim.

zalegrala avatar zalegrala commented on June 3, 2024

I believe I am also experiencing this. The strangest part to me is that if I drop to a tty (CTRL+ALT+F3), attempting to login does not echo the characters. If I hit the power button on the machine then I see all the characters at the login prompt echo right away and the machine shuts down.

This also locks up other terminals. Alacritty being the primary terminal, if I open kitty, the shell rc is not completely loaded and I never see a prompt, making this quite difficult to troubleshoot.

This does not happen every time. I regularly Ctrl+z to suspend the nvim job, and so I might be able to suspend perhaps twenty times or so before I run into this, but it seems that only a reboot fixes it. I have seen this on two machines now, after recent updates for some xz patching.

from neovim.

pajlada avatar pajlada commented on June 3, 2024

@zalegrala My understanding is that it will happen if you have two Neovim instances suspended at the same time.

To mitigate the issue, you can:

  1. Set the UV_USE_IO_URING environment variable to 0. (e.g. set it in your .zshrc, or add an alias that launches nvim with that set alias nvim="UV_USE_IO_URING=0 nvim"
  2. You can run a patched kernel (@ichernev posted good instructions above if you're using Arch Linux)
  3. You can disable io_uring on your system entirely (sysctl kernel.io_uring_disabled=1, doesn't persist through reboots)

from neovim.

zalegrala avatar zalegrala commented on June 3, 2024

I've got the UV_USE_IO_URING=0 in my shell currently. I'll probably know by tomorrow if it seems stable. Thank you for the pointers. I am on arch, but if we think the new kernel will be out in the next week or so, then I'll probably wait to patch my local kernel if the environment variable keeps the issue from appearing.

from neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.