Randomly, my nvim
will hang.
Generally, it seems to happen in command mode.
The latest one has hung with:
:set paste! paste?
On the status line. I have map <F2> :set paste! paste?<CR>
and I just pressed F2.
But this is just one example: it happens seemingly randomly, sometimes on cursor movement.
When hung, there is always a 100% CPU usage by the process.
This doesn't tell me too much:
% sudo strace -fs200 -p 18878 |& uniq
strace: Process 18878 attached with 2 threads
strace: [ Process PID=18878 runs in x32 mode. ]
[pid 18894] epoll_pwait(15, strace: [ Process PID=18878 runs in 64 bit mode. ]
<unfinished ...>
[pid 18878] epoll_pwait(9, [], 1024, 0, NULL, 8) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_FREE) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_DONTNEED) = 0
[pid 18878] epoll_pwait(9, [], 1024, 0, NULL, 8) = 0
[pid 18878] madvise(0x7f54d7400000, 16781312, MADV_FREE) = 0
[pid 18878] epoll_pwait(9, [], 1024, 0, NULL, 8) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_FREE) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_DONTNEED) = 0
[pid 18878] epoll_pwait(9, [], 1024, 0, NULL, 8) = 0
[pid 18878] madvise(0x7f54d7400000, 16781312, MADV_FREE) = 0
[pid 18878] epoll_pwait(9, [], 1024, 0, NULL, 8) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_FREE) = 0
[pid 18878] madvise(0x7f54d8401000, 33562624, MADV_DONTNEED) = 0
[... <repeats>]
I checked out fd 9 in /proc/$PID/fd
, and it was: 9 -> 'anon_inode:[eventpoll]'
.
Is there a way I can have nvim dump stack?
How can I debug what is causing neovim to hang when it won't respond to any key presses?
I'd prefer to avoid needing to bisect through all my plugins to find out what's causing it. The random element means not knowing if I've waited long to declare a particular set of plugins "good".
nnoremap <F2> :set paste!<CR>
Does it hang too? – user6408 Oct 25 '18 at 13:43