bugThe nmh Mail Handling System - Bugs: bug #24004, (debbug 344182) mhstore uses lots...

 
 

bug #24004: (debbug 344182) mhstore uses lots of fds

Submitted by:  Peter Maydell <pm215>
Submitted on:  Tue 05 Aug 2008 07:41:30 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 11 Mar 2012 02:29:53 AM UTC, comment #1:

There were two fd leaks in mhparse.c:

1) In openQuoted(), the decoded contents file was opened twice in succession. The second open was added by a patch in March 2000.

2) openBase64(), openQuoted(), and open7Bit() could open the contents file, but it never would be closed. Added code to each to close the file if the function opened it.

Fixed for nmh 1.5.

David Levine <levine>
Project Member
Tue 05 Aug 2008 07:41:30 PM UTC, original submission:

Reproduce:

add this to your mh_profile temporarily:
mhstore-store-text/plain: | cat >>/tmp/zz9

then mkdir /tmp/zz && cd /tmp/zz
strace -o strace.log mhstore +bigfolder first-last

and note how big the fd numbers get in the strace.

The debian bug reporter thought this was an fd leak. Actually it's more of a design error -- mhstore works by first parsing all the messages it is to work on, which includes opening them all. Then it does the storage bit; finally in the free_content() function open FILE*s are closed.

I don't know what (if anything) we want to do about it but I wanted to save the results of this preliminary investigation.

Peter Maydell <pm215>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by levine (Posted a comment)
  • -unavailable- added by pm215 (Submitted the item)
  •  

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

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Mar 2012 02:29:53 AM UTClevineCategoryEnhancement=>Bug
      Open/ClosedOpen=>Closed
    Mon 29 Dec 2008 10:44:59 PM UTCpm215CategoryNone=>Enhancement

    Back to the top


    Powered by Savane 3.1-cleanup1