vim-notes icon indicating copy to clipboard operation
vim-notes copied to clipboard

SearchNotes hangs up in WSL2

Open attilastrba opened this issue 5 years ago • 1 comments

Hi guys, I have a fresh install of the Notes plugin under Windows10 WSL2 and I have a strange problem. When I try to search in my .txt notes it hangs. By debugging with strace I get the following never ending loop

select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout) select(1, [0], [], [0], {tv_sec=0, tv_usec=0}) = 0 (Timeout)

Does anybody have an idea? Thank you very much

attilastrba avatar Jan 12 '21 21:01 attilastrba

I believe those are socket debug statements. I think it's just reporting that it's listening to the socket for a connection. I'm not sure what your search problem is, but those indicate it's waiting for some network connection I believe.

If you strace any process with a network stack, you probably will see something like that. You might want to make sure strace is following all your forks/threads. Not sure about doing that on windows. ie, I think if you expand your strace to look at the process and ALL it's sub processes, you'll see more. If you are using Cygwin, there's some flags to do this. Here's one of them:

-f, --trace-children trace child processes (toggle - default true)

Also, you might want to filter OUT those entries.

eg.,

strace | grep -v select

Good luck!

Pete

msphinct avatar Jan 12 '21 22:01 msphinct