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

 
 

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

Submitted by:  Carl Fredrik Hammar <hammy>
Submitted on:  Wed 09 Jun 2010 02:15:13 PM UTC  
 
Category: HurdSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: OpenReproducibility: None
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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:

Carl Fredrik Hammar <hammy>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by hammy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Jun 2010 11:42:10 AM UTChammyAttached File-=>Added exec-leak.c, #20726
    Wed 09 Jun 2010 02:15:13 PM UTChammyAttached File-=>Added exec-spam.c, #20710

    Back to the top


    Powered by Savane 3.1-cleanup