Open bruceg opened 1 year ago
Closing the loop with new findings I reported the vector issue that spawned this one: I've confirmed with co-workers that the issue occurs on both Mac and Linux in addition to WSL2 as the client OS (or when running Vector directly from Windows cmd.exe), so I don't think this is an OS-specific problem.
Describe the bug When using
vector top
in WSL2 with Windows Terminal, one of the first display cycles hangs in the kernel for almost two minutes. I have traced this down to the kernel stalling when opening/dev/tty
in thesize
function. This stall does not happen the first time(s) it is opened, only later in the process.Ref: https://github.com/vectordotdev/vector/issues/16465
To Reproduce Steps to reproduce the behavior:
vector
to enable the APIvector
running in one terminalvector top
in anotherExpected behavior The same almost instant startup that happens on Linux and MacOS.
OS WSL2 under Windows
Terminal/Console Windows Terminal
Would it make sense to store the opened file handle for
/dev/tty
in aOnceCell
and then reuse it for subsequent calls tosize
? If you agree with that path, I can work up a PR to make that happen.