bugfindutils - Bugs: bug #47220, Assertion "fdleak.c:382:...

 
 

bug #47220: Assertion "fdleak.c:382: complain_about_leaky_fds" during find

Submitter:  Ross Burton <rossburton>
Submitted:  Mon 22 Feb 2016 12:53:34 PM UTC
   
 
Category:  xargs Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.5.19 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 05 May 2019 05:24:48 PM UTC, comment #5: 

If my understanding of the bug report at https://bugzilla.yoctoproject.org/show_bug.cgi?id=13311 is correct, this is an FD leak bug in yocto, not findutils.  Hence I will close this bug report as invalid. 

It's a valuable thing to report since it led to an improvement in findutils (the patch I mentioned) but since there is not a bug in ffindutils itself, I think closing this bug is the right thing to do.  Thanks for helping to improve findutils!

James Youngman <jay>
Group administrator
Sun 05 May 2019 05:20:57 PM UTC, comment #4: 

The patch Pavel mentioned is now applied in Git, it's 5699fb78d44a9f5064f98459178ee8e7fa159645

James Youngman <jay>
Group administrator
Fri 03 May 2019 05:15:02 PM UTC, comment #3: 

It would really be interesting to be able to reproduce.
It seems that there's either a leak in xargs, or a bug in the
detection whether there are leaks.  With the given information
so far, I think it's the latter, i.e., it reports false positive
information.

Do you see any chance to reproduce?
E.g. something similar to this:
  exec 99>x
  seq 10 | xargs echo

Regarding the patch: indeed, the leak detection should not be
active in the default binary.
Actually, it if turns out to be a bug, then maybe we should
remove the fdleak.c functionality at all from the xargs
executable, and rather have improved tests.

Have a nice day,
Berny

Bernhard Voelker <berny>
Group administrator
Tue 30 Apr 2019 11:50:15 AM UTC, comment #2: 

I consistently reproduce this with yocto when enable pseudo logging:
FAKEROOTENV_append = " PSEUDO_DEBUG=1 PSEUDO_DEBUG_FILE=<>/pseudolog/pseudo_dbg.log"

And I've tracked down this issue root cause to pseudo log file descriptor leak, reported in https://bugzilla.yoctoproject.org/show_bug.cgi?id=13311 with patch proposed.

It's worth noting that I expected to have fd leak check disabled when GNU_FINDUTILS_FD_LEAK_CHECK is not set. However, this EV only affect "find" tool, so I submitted patch to extend its usage for "xargs" as well in https://savannah.gnu.org/patch/?9799.

Pavel Modilaynen <pmod>
Thu 24 Mar 2016 07:06:59 AM UTC, comment #1: 

Could you provide an example command line which exhibits this problem (even if the problem does not occur every time)?

What does file descriptor 8 point to when this happens?   If you are using Linux you should be able to figure this out by running xargs under a debugger, and running "ls -l /proc/NN/fds" when the abort is reached.  Of course you will need to use the actual PID of the xargs process instead of NN.

Does this problem still occur with the current release (4.6.0, available from ftp.gnu.org)?

James Youngman <jay>
Group administrator
Mon 22 Feb 2016 12:53:34 PM UTC, original submission:  

With find 4.5.19 we're seeing this assertion relatively frequently:

| xargs: File descriptor 8 will leak; please report this as a bug, remembering to include a detailed description of the simplest way to reproduce this problem.
| xargs: ../../findutils-4.5.19/lib/fdleak.c:382: complain_about_leaky_fds: Assertion `no_leaks' failed.
| xargs: basename: terminated by signal 6

Sadly the reproducers are less than trivial.

Ross Burton <rossburton>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by berny (Posted a comment)
  • -email is unavailable- added by pmod (Posted a comment)
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by rossburton (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-05 jay CategoryNone xargs
        Item GroupNone Wrong result
        StatusNone Invalid
        Assigned toNone jay
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code