Too many open files

2009-12-20 Thread David Evans

I deleted all my inactive ports. I then ran this command:

script bigbuild.log sudo port -pdk upgrade --force installed  +universal

in an effort to build all my ports universal.  The -k option was used to
keep the builds in case I had to run the command again.

After a few hours of compilation, ports started failing with too many
open files
errors.

Eg:

./libtool: cannot make pipe for command substitution: Too many open files

I tried the command again with the same result except that it  was much
quicker
due to the already built ports.

Viewing the memory usage with Activity Monitor showed only a few MB of free
memory.  Whether this is the cause I do not know.  The virtual memory
used by
tclsh was around 550 MB and was slowly increasing.

System:
iMac Intel  Core 2 Duo, 2GB ram.
Snow Leopard 10.6.2
Xcode 3.2.1 (1613)
Port 1.8.1

I need universal libraries in an effort to build Gnome, although at the
moment
this is stymied by xulrunner-devel failing to build.  I have 641 ports
installed.
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Too many open files

2009-12-20 Thread David Evans
I upped the max number of open files using ulimit from
256 to 1 and ran my massive build again.

While the build was running I monitored the files opened
by tclsh8.5 using

sudo lsof | grep -i tcl | grep receipts | wc -l

There were 272 instances of

/opt/local/var/macports/receipts/file_map.db

open.  I think we have a file open leak.

___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Too many open files

2009-12-20 Thread Ryan Schmidt

On Dec 20, 2009, at 07:41, David Evans wrote:

 I upped the max number of open files using ulimit from
 256 to 1 and ran my massive build again.
 
 While the build was running I monitored the files opened
 by tclsh8.5 using
 
 sudo lsof | grep -i tcl | grep receipts | wc -l
 
 There were 272 instances of
 
 /opt/local/var/macports/receipts/file_map.db
 
 open.  I think we have a file open leak.

I have seen the too many open files problem myself when having MacPorts 
install a lot of ports at once. Thanks for finding out which file is the 
problem. Could you please file an issue in the issue tracker with your findings?


___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Too many open files

2009-12-20 Thread Joshua Root
On 2009-12-20 23:04 , David Evans wrote:
 
 I deleted all my inactive ports. I then ran this command:
 
 script bigbuild.log sudo port -pdk upgrade --force installed  +universal
 
 in an effort to build all my ports universal.  The -k option was used to
 keep the builds in case I had to run the command again.

While running out of fds is obviously bad, why are you using --force and
not --enforce-variants?

- Josh
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Too many open files

2009-12-20 Thread David Evans
Ryan Schmidt wrote:
 On Dec 20, 2009, at 07:41, David Evans wrote:

   
 I upped the max number of open files using ulimit from
 256 to 1 and ran my massive build again.

 While the build was running I monitored the files opened
 by tclsh8.5 using

 sudo lsof | grep -i tcl | grep receipts | wc -l

 There were 272 instances of

 /opt/local/var/macports/receipts/file_map.db

 open.  I think we have a file open leak.
 

 I have seen the too many open files problem myself when having MacPorts 
 install a lot of ports at once. Thanks for finding out which file is the 
 problem. Could you please file an issue in the issue tracker with your 
 findings?



   
Now filed as ticket #22959

___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: Too many open files

2009-12-20 Thread David Evans
Joshua Root wrote:

 While running out of fds is obviously bad, why are you using --force and
 not --enforce-variants?


   
Probably because I had not realised the option existed.
Now that I've read the man page again it's there hidden in
plain sight.

___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users