Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lldb-server on Windows in platform mode does not reuse ports correctly #90923

Open
Awfa opened this issue May 3, 2024 · 1 comment
Open

lldb-server on Windows in platform mode does not reuse ports correctly #90923

Awfa opened this issue May 3, 2024 · 1 comment

Comments

@Awfa
Copy link
Contributor

Awfa commented May 3, 2024

On both Linux and Windows, when lldb-server is in platform mode, the first connection gets handed the portmap defined by --min-gdb-serverport and --max-gdb-serverport. Subsequent connections don't receive this portmap because it has been std::move'd for the fork'ed child process to handle.

#88845 will fix this for Linux, but on Windows, the problem will only be partially fixed by the PR.
After the PR lands, Window's lldb-server will be able to use the port map for multiple connections but will fail to reclaim ports as they are given out to each connection. After enough connections, there won't be any more ports for server to give out.

@llvmbot
Copy link
Collaborator

llvmbot commented May 3, 2024

@llvm/issue-subscribers-lldb

Author: Anthony Ha (Awfa)

On both Linux and Windows, when lldb-server is in platform mode, the first connection gets handed the portmap defined by `--min-gdb-serverport` and `--max-gdb-serverport`. Subsequent connections don't receive this portmap because it has been `std::move`'d for the fork'ed child process to handle.

#88845 will fix this for Linux, but on Windows, the problem will only be partially fixed by the PR.
After the PR lands, Window's lldb-server will be able to use the port map for multiple connections but will fail to reclaim ports as they are given out to each connection. After enough connections, there won't be any more ports for server to give out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants