Bug 15320 - pthread_create exhaust program's virtual address space
Summary: pthread_create exhaust program's virtual address space
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-29 05:37 UTC by udknight
Modified: 2014-06-13 18:35 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
test code to trigger the problem (233 bytes, text/x-csrc)
2013-03-29 05:37 UTC, udknight
Details

Note You need to log in before you can comment on or make changes to this bug.
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
.