This code has 100% repro for connection lost with lldb that prevents debugging e.g. a game that uses popen to invoke shader compilation in real time.
Tested on ubuntu 6.8.0-45-generic with lldb 17.0.6 and lldb 18.1.3
#include <memory>
#include <thread>
#include <vector>
void thread_func() {
for(auto i = 0; i < 100; ++i) {
auto pipe = popen("7z", "r");
pclose(pipe);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
int main() {
std::vector<std::thread> threads;
for(auto i = 0; i < 10; ++i) {
threads.emplace_back(std::thread(thread_func));
}
for(auto &thread : threads) {
thread.join();
}
return 0;
}
This code has 100% repro for connection lost with lldb that prevents debugging e.g. a game that uses popen to invoke shader compilation in real time.
Tested on ubuntu 6.8.0-45-generic with lldb 17.0.6 and lldb 18.1.3
```c++
#include <memory>
#include <thread>
#include <vector>
void thread_func() {
for(auto i = 0; i < 100; ++i) {
auto pipe = popen("7z", "r");
pclose(pipe);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
int main() {
std::vector<std::thread> threads;
for(auto i = 0; i < 10; ++i) {
threads.emplace_back(std::thread(thread_func));
}
for(auto &thread : threads) {
thread.join();
}
return 0;
}
```
[lldb.log](https://github.com/user-attachments/files/17477143/lldb.log)
This code has 100% repro for connection lost with lldb that prevents debugging e.g. a game that uses popen to invoke shader compilation in real time. Tested on ubuntu 6.8.0-45-generic with lldb 17.0.6 and lldb 18.1.3
lldb.log