Bug 15320

Summary: pthread_create exhaust program's virtual address space
Product: glibc Reporter: udknight <udknight>
Component: nptlAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal CC: drepper.fsp, siddhesh, udknight
Priority: P2 Flags: fweimer: security-
Version: 2.15   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: test code to trigger the problem

Description udknight 2013-03-29 05:37:19 UTC
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
Comment 1 udknight 2013-03-29 05:42:05 UTC
the stack does not get freed or reused even if the delay in creating threads is increased to up to 10 seconds
Comment 2 udknight 2013-03-29 08:47:13 UTC
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.
Comment 3 Andreas Schwab 2013-03-29 09:13:04 UTC
.