Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open /etc/ARRAY(0x....) #2

Open
eserte opened this issue Dec 31, 2018 · 14 comments
Open

Can't open /etc/ARRAY(0x....) #2

eserte opened this issue Dec 31, 2018 · 14 comments

Comments

@eserte
Copy link

eserte commented Dec 31, 2018

On some linux systems the test suite fails:

...
UNAME: Linux debian9 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

Can't open /etc/ARRAY(0x56029d395ca8): No such file or directory at /home/cpansand/.cpan/build/2018123108/Sys-Info-Driver-Linux-0.7905-bDKD6x/blib/lib/Sys/Info/Driver/Linux/OS.pm line 204.
# Looks like your test exited with 2 just after 23.
t/03-basic.t ............. 
Dubious, test returned 2 (wstat 512, 0x200)
All 23 subtests passed 
Can't open /etc/ARRAY(0x561edda84fd0): No such file or directory at t/04-distribution.t line 10.
t/04-distribution.t ...... skipped: (no reason given)
...
@maikelsteneker
Copy link

This was a problem for me on a 32-bit Debian 7 system.

@dsheroh
Copy link

dsheroh commented Feb 18, 2019

Also getting this problem on

$ uname -a
Linux hostname 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u2 (2018-02-21) x86_64 GNU/Linux

with

$ perl -v
This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux-gnu-thread-multi

Looking at the test results matrix, this seems to be a very widespread problem, with the current release showing failures for over 2/3 of test systems. (99 PASS / 273 FAIL at the time of this posting)

@nigelhorne
Copy link

Any update? I'm wondering if this module is still supported.

@nigelhorne
Copy link

FWIW, it works on this:

Linux pi2 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux

@vinc17fr
Copy link

vinc17fr commented Oct 7, 2019

I have the same issue under Debian/unstable, x86_64, before and after the upgrade to perl 5.30.

@vinc17fr
Copy link

vinc17fr commented Oct 7, 2019

The error comes from Sys/Info/Driver/Linux/OS/Distribution.pm, sub _probe_version, when executing $self->_get_file_info.

@vinc17fr
Copy link

vinc17fr commented Oct 8, 2019

The problem is with

 local $self->{release_file} = $slot->{release}
    if $slot->{release};

as under Debian at least, $slot->{release} contains an array reference, not a file name. At least under Debian, this code could be ignored because the files from the array do not have the expected format.

@vinc17fr
Copy link

vinc17fr commented Oct 8, 2019

And this broken code has been introduced by changeset edc04a1 ("New centos workaround").

@nigelhorne
Copy link

@vinc17fr - could you put in a pull request pls?

@vinc17fr
Copy link

vinc17fr commented Oct 8, 2019

OK, I see where the real problem is: the Debian configuration information is obsolete. I'll update it. The consequence is that Debian versions earlier than Debian 6.8 will no longer be supported without a /etc/os-release file. But that's 4 versions earlier than the current stable and there's an easy workaround for them anyway, so that I don't think that this is an issue.

@vinc17fr
Copy link

vinc17fr commented Oct 8, 2019

I can see that some other distributions have a similar issue: several "release" files. But either they now provide a /etc/os-release file like what Debian did 7 years ago, and they could be dropped (I think), or one of them could be dropped (e.g. corresponding to very old versions of the distribution), or the _probe_version code could be changed to do a loop (but I can't test).

For Debian, /etc/debian_version contains the minor release, not present in /etc/os-release, so I need a closer look to see whether it may be useful...

vinc17fr added a commit to vinc17fr/CPAN-Sys-Info-Driver-Linux that referenced this issue Oct 8, 2019
Also removed the obsolete debian_version and debian_release lines,
as Distribution.pm no longer supports multiple release files and
they made the tests fail (fixes issue burak#2 for Debian).
@vinc17fr
Copy link

vinc17fr commented Oct 8, 2019

Note: This pull request fixes the test failure for Debian. The example in the Sys::Info::Driver::Linux::OS::Distribution man page does not work, but that's a separate issue, and I could check that there was the same issue even with an older version of the module.

@depesz
Copy link

depesz commented Oct 27, 2022

Hi. So it's failing, still (or maybe it's a new thing) on new debian:

=$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bookworm/sid
Release:        testing
Codename:       bookworm

=$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

=$ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ........... ok
t/00-report-prereqs.t .... #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.62
#
# === Build Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.62
#
# === Test Requires ===
#
#     Module              Want     Have
#     ------------------- ---- --------
#     ExtUtils::MakeMaker  any     7.62
#     File::Spec           any     3.80
#     IO::Handle           any     1.46
#     IPC::Open3           any     1.21
#     Test::More           any 1.302183
#     Test::Sys::Info     0.20     0.23
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module             Want   Have
#     ---------------- ------ ------
#     Config::General     any   2.65
#     Sys::Info::Base  0.7801 0.7807
#     Unix::Processors    any  2.046
#
t/00-report-prereqs.t .... ok
t/03-basic.t ............. UNAME: Linux orange 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux

t/03-basic.t ............. 1/? Can't open /etc/ARRAY(0x555ddf5bed38): No such file or directory at /home/depesz/.cpanm/work/1666876753.136068/Sys-Info-Driver-Linux-0.7905/blib/lib/Sys/Info/Driver/Linux/OS.pm line 204.
# Looks like your test exited with 2 just after 23.
t/03-basic.t ............. Dubious, test returned 2 (wstat 512, 0x200)
All 23 subtests passed
t/04-distribution.t ...... Can't open /etc/ARRAY(0x561cff082f58): No such file or directory at t/04-distribution.t line 10.
t/04-distribution.t ...... skipped: (no reason given)
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/release-distmeta.t ..... skipped: these tests are for release candidate testing

Test Summary Report
-------------------
t/03-basic.t           (Wstat: 512 Tests: 23 Failed: 0)
  Non-zero exit status: 2
t/04-distribution.t    (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
Files=7, Tests=31,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.27 cusr  0.04 csys =  0.32 CPU)
Result: FAIL
Failed 2/7 test programs. 0/31 subtests failed.
make: *** [Makefile:865: test_dynamic] Error 255

@dkechag
Copy link

dkechag commented Aug 28, 2023

This pr: #7 should be the minimal fix for this crash, but not sure if the author is following, as this seems like a longtime issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants