Opened 15 years ago

Closed 15 years ago

Last modified 10 years ago

#22959 closed defect (fixed)

Too many open files error while doing a mass forced upgrade

Reported by: snowflake (Dave Evans) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.8.2
Component: base Version: 1.8.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have 641 ports installed.

I deleted all the inactive ports.

I then ran a command to force upgrade them all with the +universal variant:

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

After a few hours of compilation an error occurred:

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

I increased the ulimit(1) open files limit for the process from 256 to 10000 and ran the upgrade command again. While it was running I monitored the open files for the tclsh process using lsof:

I noticed that there were a lot of instances of

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

open.

I counted them with:

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

and there were 272 instances of this file open.

I think there is an open file leak in port.

Change History (3)

comment:1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Keywords: force upgrade removed
Milestone: MacPorts 1.8.2
Resolution: fixed
Status: newclosed

Fixed in trunk in r61770, merged to branch in r61771.

comment:3 Changed 10 years ago by lagrave+bugs+macosforge.org@…

This happened to me just now when running the restore_ports.tcl script to reinstall my ports after some other problems.

Note: See TracTickets for help on using tickets.