Created attachment 6956 [details] test code to trigger the problem glibc create stack space for per thread create by call pthread_create, but the stack space willnot be freed, and cause program exhaust all virtual address space then don't work anymore. I attach the test code to trigger the problem
the stack does not get freed or reused even if the delay in creating threads is increased to up to 10 seconds
Sorry for my mistake, because the thread created by pthread_create is joinable, and when a terminated joinable thread has been joined are the last of its resources released back to the system, so this is not a BUG.
.