bugThe GNU Hurd - Bugs: bug #30096, ext2fs leaks memory on multiple...

 
 

bug #30096: ext2fs leaks memory on multiple execs from same process

Submitter:  Carl Fredrik Hammar <hammy>
Submitted:  Wed 09 Jun 2010 02:15:13 PM UTC
   
 
Category:  Hurd Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 

This was fixed with glibc's 5d8eb435a8f2f2af2babe76a0e88a54b2668c3c7 and alike.

* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 10 Jun 2010 11:42:10 AM UTC, comment #2: 

Ports are leaked on execve(), most likely in the exec server.  If any
of these ports goes to ext2fs, this would explain this bug.  I have
attached a program which prints the number of leaks (7).


(file #20726)

Carl Fredrik Hammar <hammy>
Group Member
Thu 10 Jun 2010 09:05:56 AM UTC, comment #1: 

As suggested by antrik, the number of threads also explodes when you kill
the execing process.  Perhaps the increase in memory usage is because
of this.

Also, I did a quick check to see if Sergio's sync patches magically
fixes this, but they did not have any obvious effect on the outcome.

Carl Fredrik Hammar <hammy>
Group Member
Wed 09 Jun 2010 02:15:13 PM UTC, original submission:  

If you run a program which does nothing else than call exec() on its own
executable then ext2fs and gnumach slowly uses more and more memory.
At this point, gnumach grows quicker than ext2fs.  If only run for a
short while killing the execing process only results in some of this
memory being freed.  But if you let the process do 100 000 execs or so
before you kill it, then ext2fs memory usage explodes to 100's of megs,
and after that, consumes ~200 kb whenever setauth() is called or a setuid
binary is executed.

I have attached a program that execs itself and prints out how many
calls it has done every 100th call.  A convenient way to track memory
usage of gnumach and ext2fs, respectively, is:

while ps -u 2 3; do sleep 1; done


Carl Fredrik Hammar <hammy>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #20726:  exec-leak.c added by hammy (765B - text/x-csrc)
file #20710:  exec-spam.c added by hammy (430B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sthibaul (Updated the item)
  • -email is unavailable- added by hammy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-04 sthibaul StatusNone Fixed
        Open/ClosedOpen Closed
        Wiki-like text discussion box This was fixed with glibc's 5d8eb435a8f2f2af2babe76a0e88a54b2668c3c7 and alike.
    2010-06-10 hammy Attached File- Added exec-leak.c, #20726
    2010-06-09 hammy Attached File- Added exec-spam.c, #20710

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code