Bug #754
closedBuild of illumos-gate fails with perl-5.10.0 as default perl
100%
Description
I have a build machine, running illumos-gate and with perl-5.10.0 set as the default perl.
I ran the nightly build, with max_jobs=1 but get the following repeated error in the build log:
closedir() attempted on invalid dirhandle DIR at /export/builds/illumos/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/find_elf line 303.
All code compilation steps complete successfully, and I can recover the build by going to usr/src/pkg and doing a 'make install'. I verified these manually-built packages by installing with onu and they work fine.
From irc discussion of this issue:
03:08:37 AM) richlowe: c_ellis: the opendir stuff is not at all related to packaging.
(03:08:56 AM) richlowe: c_ellis: find_elf is run as part of the "Checking ELF Runtime Attributes" bit of the build (as seen from nightly.log)
(03:09:21 AM) richlowe: c_ellis: we suspect that perl may be busted.
I downloaded the source for perl-5.10.0, performed a default configure, make, and make test, and this completes without error.
Not sure where to proceed with this one. I'll keep the build tree in case I can assist with testing.
Related issues
Updated by Rich Lowe about 12 years ago
- Category set to tools - gate/build tools
- Assignee set to Rich Lowe
I was wrong, this isn't an issue with perl, it's a subtle (well, not really now we know what it is) issue with the script.
Updated by Rich Lowe about 12 years ago
The problem is that perl IO handles are implicitly global, so when we recurse we clobber DIR, and end up closing it while it's already closed (as we ascend).
The reason it worked in 5.8.4 is, in fact, that 5.8.4 just didn't warn or error in this case:
http://perldoc.perl.org/perl593delta.html#readdir%28%29/closedir%28%29/etc.-attempted-on-invalid-dirhandle
The fix is to use perl's IO::Dir which uses IO::Handle objects, which being regular objects can be scoped.
Updated by Rich Lowe about 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Resolved in r:13335 commit:a8b9fb2737b8