This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/19511] New: 8MB memory leak in pthread_create in case of failure when non-root user changes priority


https://sourceware.org/bugzilla/show_bug.cgi?id=19511

            Bug ID: 19511
           Summary: 8MB memory leak in pthread_create in case of failure
                    when non-root user changes priority
           Product: glibc
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: yut616 at sohu dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 8914
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8914&action=edit
pthread_test.c sample code

1. description
For non-root user, when changes priority of thread, pthread_create will fail,
and there is 8MB stack memory leak;
For root user, there is no such issue;

2. sample code
pthread_test.c
gcc pthread_test.c -lpthread

use SHOW_VMSIZE, ReadProcStatusAndGetFieldAsSizeT to show the VmSize usage at
run time;

3. log
non_root.log:
When run it with non-root user, VmSize will keep increasing
(you could run it several times to check the result, or you could change the
loop to 10000 to check it)
root.log:
When run it with root user, VmSize is stable

4. tested glibc
glibc 2.21, 2.22

5. environment
$ uname -a
3.19.0-43-generic #49-Ubuntu SMP Sun Dec 27 19:43:07 UTC 2015 x86_64 x86_64
x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 15.04

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]