-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[lldb] lldb-server may crash in the child process monitor thread #101475
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
Comments
@llvm/issue-subscribers-lldb Author: Dmitry Vasilyev (slydiman)
Host::LaunchProcess() requires to SetMonitorProcessCallback. This callback is called from the child process monitor thread. We cannot control this thread anyway. GDBRemoteCommunicationServerPlatform::DebugserverProcessReaped() may cause a crash if this callback will be called from the child monitor thread after destroing the instance of GDBRemoteCommunicationServerPlatform.
llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp Lines 521 to 526 in 2d36550
And m_port_map requires an own mutex guard here. |
This was referenced Aug 1, 2024
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Aug 14, 2024
Listen to gdbserver-port, accept the connection and run `lldb-server gdbserver --fd` on all platforms. Added acceptor_gdb and gdb_thread to lldb-platform.cpp SharedSocket has been moved to ConnectionFileDescriptorPosix. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Aug 16, 2024
Listen to gdbserver-port, accept the connection and run `lldb-server gdbserver --fd` on all platforms. Added acceptor_gdb and gdb_thread to lldb-platform.cpp SharedSocket has been moved to ConnectionFileDescriptorPosix. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Aug 26, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Refactored Acceptor to listen on 2 ports in the main thread. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Aug 30, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Refactored Acceptor to listen on 2 ports in the main thread. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Aug 30, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Refactored Acceptor to listen on 2 ports in the main thread. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Sep 3, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Depends on llvm#106955. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Sep 3, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Sep 6, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Sep 6, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
slydiman
added a commit
to slydiman/llvm-project
that referenced
this issue
Sep 13, 2024
Listen to gdbserver-port, accept the connection and run lldb-server gdbserver --fd on all platforms. Parameters --min-gdbserver-port and --max-gdbserver-port are deprecated now. This is the part 2 of llvm#101283. Fixes llvm#97537, fixes llvm#101475.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Host::LaunchProcess() requires to SetMonitorProcessCallback. This callback is called from the child process monitor thread. We cannot control this thread anyway. GDBRemoteCommunicationServerPlatform::DebugserverProcessReaped() may cause a crash if this callback will be called from the child monitor thread after destroing the instance of GDBRemoteCommunicationServerPlatform.
llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
Lines 521 to 526 in 2d36550
And m_port_map requires an own mutex guard here.
The text was updated successfully, but these errors were encountered: