Bug 885474 - make bails with *** INTERNAL: readdir: Bad file descriptor
make bails with *** INTERNAL: readdir: Bad file descriptor
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: make (Show other bugs)
21
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Patsy Franklin
Fedora Extras Quality Assurance
:
Depends On: 1017084
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-09 12:30 EST by Andrew Schultz
Modified: 2015-02-03 13:59 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-03 13:59:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Schultz 2012-12-09 12:30:48 EST
Description of problem:
with fairly simple Makefiles, make will bail with

*** INTERNAL: readdir: Bad file descriptor

Version-Release number of selected component (if applicable):
make-3.82-13.fc17.x86_64

How reproducible:
every time

Steps to Reproduce:
1. create two Makefiles,
Makefile:
-----------
default:
        make -f Makefile2
-----------

Makefile2:
-----------
vpath %.c    /home/andrew/

foo:
-----------

2. invoke make
# make -j 2

Actual results:
===========
make -f Makefile2
make[1]: Entering directory `/build/andrew/test'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[1]: *** INTERNAL: readdir: Bad file descriptor
.  Stop.
make[1]: Makefile2: Field 'stem' not cached: Makefile2

make[1]: Leaving directory `/build/andrew/test'
make: *** [default] Error 2
===========

Expected results:
===========
make -f Makefile2
make[1]: Entering directory `/build/andrew/test'
make[1]: Nothing to be done for `foo'.
make[1]: Leaving directory `/build/andrew/test'
===========

Additional info:
the path on the vpath line must exist, but need not have anything interesting in it.  This problem can be avoided by omitting "-j 2".  This bug can be encountered building ffmpeg
http://forums.gentoo.org/viewtopic-t-918138-start-0.html
Comment 1 Fedora End Of Life 2013-07-03 22:42:38 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Andrew Schultz 2013-07-03 22:59:39 EDT
still an issue with Fedora 18 (make 3.82-14)
Comment 3 Philip Prindeville 2013-08-30 19:24:51 EDT
I'm seeing this also while building Openwrt from trunk.
Comment 4 Samuel Sieb 2013-09-01 12:49:39 EDT
You're trying to compile in an NFS mounted directory, right? The problem is that it can't use flock on its lock files. You can see this by using strace, that's how I discovered it. I had to move the openwrt tree to a local filesystem to be able to compile.
Comment 5 Samuel Sieb 2013-09-01 16:00:18 EDT
Sorry, should have double-checked before posting...  My issue was slightly different.
Comment 6 Petr Machata 2013-09-02 05:58:38 EDT
Got this reproduced locally on a Fedora 15 box and RHEL 7 alpha box, in both cases also with upstream make.  Doesn't seem to be Fedora-specific per se (though could of course be a patch that Red Hat carries in runtime or kernel across all these versions).  Reproduces fine on a local filesystem.
Comment 7 Petr Machata 2013-09-03 10:13:42 EDT
This depends on what the "internal" make (the one launched from Makefile) is.  Normally this would be $(MAKE) to use whatever "outer" make is used, but then it doesn't reproduce.  Make 3.81 is not impacted, 3.82 and current master are.
Comment 8 Petr Machata 2013-09-03 11:00:43 EDT
This is not right:

18706 16:46:43.945567 opendir("/home/petr" <unfinished ...>
18706 16:46:43.945713 SYS_open("/home/petr", 591872, 0172204710) = 4
18706 16:46:43.945785 SYS_brk(0)                                 = 0x1e9d000
18706 16:46:43.945824 SYS_brk(0x1ec5000)                         = 0x1ec5000
18706 16:46:43.945870 <... opendir resumed> )                    = { 4 }
[...]
18706 16:46:44.347777 close(4 <unfinished ...>
18706 16:46:44.347882 SYS_close(4)                               = 0
18706 16:46:44.347927 <... close resumed> )                      = 0
[...]
18706 16:46:45.718922 readdir({ 4 } <unfinished ...>
18706 16:46:45.719037 SYS_getdents(4, 0x161f008, 32768)          = -9
18706 16:46:45.719103 <... readdir resumed> )                    = 0
Comment 9 Petr Machata 2013-09-03 13:47:31 EDT
Upstream submission:
  https://savannah.gnu.org/bugs/index.php?39934
Comment 10 Fedora Admin XMLRPC Client 2013-09-04 21:11:25 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 11 Fedora End Of Life 2013-12-21 04:49:11 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Andrew Schultz 2013-12-21 09:01:04 EST
This certainly affects F19's make (3.82-18).  This was fixed upstream in make 4.0.
Comment 13 Fedora End Of Life 2015-01-09 12:31:19 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 14 Andrew Schultz 2015-02-03 13:59:38 EST
make 4.0 shipped for Fedora 21 and the bug is fixed there now

Note You need to log in before you can comment on or make changes to this bug.