[Bug gold/10708] New: "out of file descriptors and couldn't close any" -- probably fd leak

View: New views
6 Messages — Rating Filter:   Alert me  

[Bug gold/10708] New: "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

QtWebKit builds file with "normal" ld -- but trying to build it with gold fails,
resulting in

/usr/bin/ld: fatal error: out of file descriptors and couldn't close any

QtWebKit links 1623 object files plus 12 shared libraries. According to
/proc/sys/fs/file-max, it should be possible to have 370804 fds open

--
           Summary: "out of file descriptors and couldn't close any" --
                    probably fd leak
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: ian at airs dot com
        ReportedBy: bero at arklinux dot org
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10708] "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From bero at arklinux dot org  2009-09-30 09:18 -------
Actually this is not caused by a shortage of system FDs, so something else is
causing gold to believe it's out of FDs:

# cat /proc/sys/fs/file-nr
6496    1037       370804


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10708] "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ian at airs dot com  2009-09-30 13:20 -------
Can you confirm that this was with the development version of gold?  There were
some bugs in this area fixed back February.

Otherwise, as far as I can see, this can only happen if open returns -1 with
errno set to ENFILE or EMFILE.  Please check ulimit -n.

If this is repeatable, is there any chance that you can debug it a bit?

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10708] "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From bero at arklinux dot org  2009-09-30 13:43 -------
Yes, this is on a fairly current build:

$ ld --version
GNU gold (Linux/GNU Binutils 2.20.51.0.1.20090905) 1.9
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

ulimit -n is 1024, will try again after increasing it to 65536.

It is 100% reproducible, I can do a bit of debugging but don't have a lot of
time right now (insane day job schedule right now).

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10708] "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From bero at arklinux dot org  2009-10-01 08:31 -------
ulimit -n 65536 fixes it, but using > 1024 FDs still seems somewhat excessive

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10708] "out of file descriptors and couldn't close any" -- probably fd leak

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ian at airs dot com  2009-11-07 02:27 -------
I have tried to recreate this problem, but failed.  As far as I can tell, gold
will react correctly to a lack of file descriptors.  I will need more
information on what could be causing the issue for you.

gold will try to open as many file descriptors as it needs.  If you give it more
than 1024 input files, then it will open more than 1024 descriptors.  However,
if an open fails with ENFILE or EMFILE it will close some descriptors, and will
not try to open that many again.

The error you are getting is the error that gold gives if it runs out of file
descriptors but can not find any to close.  It's not reasonable that it would
need to keep 1024 descriptors open--unless perhaps you are running with a very
large number of threads.  Are you passing any --thread option to gold?

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=10708

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils