Project

General

Profile

Actions

Bug #754

closed

Build of illumos-gate fails with perl-5.10.0 as default perl

Added by Colin Ellis about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2011-02-26
Due date:
% Done:

100%

Estimated time:
Difficulty:
Tags:
Gerrit CR:

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

Has duplicate OpenIndiana Distribution - Bug #887: Update to perl 5.10.0 breaks illumos find_elfClosed2011-04-07

Actions
Actions #1

Updated by Rich Lowe about 10 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.

Actions #2

Updated by Rich Lowe about 10 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.

Actions #3

Updated by Rich Lowe about 10 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Resolved in r:13335 commit:a8b9fb2737b8

Actions

Also available in: Atom PDF