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:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


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:

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

Carl Fredrik Hammar <hammy>
Project Member


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

Attach Files:

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 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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.9