Bug #1203

/usr/sbin/psrinfo broken in oi151

Added by Thomas Mieslinger almost 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2011-07-12
Priority:High Due date:
Assignee:Julian Wiesener % Done:

100%

Category:Internationalisation
Target version:oi_151
Difficulty:Medium Tags:perl, locale

Description

cat /etc/release
OpenIndiana Development oi_151 X86 (powered by illumos)
Copyright 2011 Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
Assembled 28 April 2011

uname -a
SunOS oi151 5.11 oi_151 i86pc i386 i86pc Solaris

$ psrinfo -v
Feature bundle "5.0.0" is not supported by Perl 5.10.0 at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4
BEGIN failed--compilation aborted.
Compilation failed in require at /usr/perl5/5.10.0/lib/Carp.pm line 14.
Compilation failed in require at /usr/perl5/5.10.0/lib/feature.pm line 206.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
Compilation failed in require at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
Compilation failed in require at /usr/sbin/psrinfo line 34.
BEGIN failed--compilation aborted at /usr/sbin/psrinfo line 34.

Also the programs:
reject, projmod, projdel, projadd, print-service, ntptrace, lpmove, lpadmin, etrn, cups-genppdupdate, auditrecord, accept

show an error like this.


Related issues

blocked by illumos gate - Bug #1232: setlocale switch to C is broken Resolved 2011-07-20

History

Updated by Albert Lee almost 3 years ago

  • Status changed from New to Feedback

Can't reproduce this. _/usr/perl5/5.10.0/lib/AutoLoader.pm) should have use 5.006_001;.

Are you running a completely up to date system? Make sure opensolaris.org is non-sticky and run pkg image-update.

Updated by Julian Wiesener almost 3 years ago

i can also confirm, that psrinfo is doing fine with perl-510 (pkg://openindiana.org/runtime/,5.11-0.151:20110523T145928Z). please run:

pkg verify perl-510

Updated by Julian Wiesener almost 3 years ago

  • Assignee set to Julian Wiesener

Updated by Thomas Mieslinger almost 3 years ago

You could reproduce it by downloading and running the iso oi-dev-151-x86-20110608-1.iso.

I will go ahead will try to fix the proplems with the hints you have posted. Thanks.

Updated by Thomas Mieslinger almost 3 years ago

If I do a

ls /usr/perl5/

I only see
5.10.0
bin
man
pod
site_perl
vendor_perl

So my Autoloader has also the line "use 5.006_001;" but there is nothing to load?!

I'll now do the proposed image update, which will take long because of the the slow internet connection....

Updated by Thomas Mieslinger almost 3 years ago

pkg image-update succeded, psrinfo and friends still broken.

pkg install pkg://runtime/perl-510/*
- no change

pkg install pkg:/library/perl-5/*
- no change

Please install yourself a fresh oi151 from the live dvd and tell me what you did to fix this problem.

Thanks.

Updated by Dean Calver almost 3 years ago

Just tested this on a 151 install

uname -a
SunOS groucho 5.11 oi_151 i86pc i386 i86xpv Solaris
Installed from
oi-dev-151-text-x86-20110526-1.iso

Its running on i386 Xen PV DomU

And its working fine for me, reports all processors correctly
Status of virtual processor 0 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:10.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 2 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 3 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 4 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 5 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 6 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 7 as of: 07/14/2011 09:48:52
on-line since 07/14/2011 07:07:11.
The i386 processor operates at 3067 MHz,
and has an i387 compatible floating point processor.

Updated by Jeffrey Baitis almost 3 years ago

I upgraded my installation from OI_148 and cannot reproduce this problem.

Updated by Thomas Mieslinger almost 3 years ago

Please try the following:

LANG=de_DE.UTF-8 psrinfo

You should now be able to see the problem on your console.

If I use LANG=en_US.UTF-8 psrinfo just works. Maybe you could give me a hint which packages need to be installed to fix this problem.

Thanks Thomas

Updated by Julian Wiesener almost 3 years ago

  • Category set to Internationalisation
  • Target version set to oi_151_stable
  • Tags changed from needs-triage to perl, locale

here it goes...

$ LC_ALL=de_DE.UTF-8 psrinfo
Feature bundle "5.0.0" is not supported by Perl 5.10.0 at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4
BEGIN failed--compilation aborted.
Compilation failed in require at /usr/perl5/5.10.0/lib/Carp.pm line 14.
Compilation failed in require at /usr/perl5/5.10.0/lib/feature.pm line 206.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
Compilation failed in require at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
Compilation failed in require at /usr/sbin/psrinfo line 34.
BEGIN failed--compilation aborted at /usr/sbin/psrinfo line 34.

$ LC_ALL=en_GB.UTF-8 psrinfo
0 on-line since 06/29/2011 09:47:37
1 on-line since 06/29/2011 09:47:42

$ LC_ALL=fr_FR.UTF-8 psrinfo
Feature bundle "5.0.0" is not supported by Perl 5.10.0 at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4
BEGIN failed--compilation aborted.
Compilation failed in require at /usr/perl5/5.10.0/lib/Carp.pm line 14.
Compilation failed in require at /usr/perl5/5.10.0/lib/feature.pm line 206.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/AutoLoader.pm line 4.
Compilation failed in require at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
BEGIN failed--compilation aborted at /usr/perl5/5.10.0/lib/i86pc-solaris-64int/POSIX.pm line 9.
Compilation failed in require at /usr/sbin/psrinfo line 34.
BEGIN failed--compilation aborted at /usr/sbin/psrinfo line 34.

Updated by Julian Wiesener almost 3 years ago

Problem seems to appear in /usr/perl5/5.10.0/lib/Exporter.pm

$ cat perltest.pl
#!/usr/bin/perl -w

use Exporter;

$ LC_ALL=de_DE.UTF-8 ./perltest.pl
Version string '5,006' contains invalid data; ignoring: ',006' at /usr/perl5/5.10.0/lib/Exporter.pm line 3.
Version string '5,006' contains invalid data; ignoring: ',006' at /usr/perl5/5.10.0/lib/Exporter.pm line 3.
Version string '5,009005' contains invalid data; ignoring: ',009005' at /usr/perl5/5.10.0/lib/Exporter.pm line 3.
Use of uninitialized value $Exporter::ExportLevel in caller at /usr/perl5/5.10.0/lib/Exporter.pm line 32.
Feature bundle "5.0.0" is not supported by Perl 5.10.0 at /usr/perl5/5.10.0/lib/Exporter.pm line 3
BEGIN failed--compilation aborted.
Compilation failed in require at ./perltest.pl line 3.
BEGIN failed--compilation aborted at ./perltest.pl line 3.

Updated by Julian Wiesener almost 3 years ago

  • Priority changed from Normal to High

Problem are number punctation. It makes

require 5.006;

to

require 5,006;

if the locale expect , as separator.

Updated by Julian Wiesener almost 3 years ago

  • Target version changed from oi_151_stable to oi_151

Updated by Julian Wiesener almost 3 years ago

i also did a test with ruby, seems to be no problem there, however, perl also only complains with -w.

$ LC_ALL=en_US.UTF-8 perl -we 'require 5.006;'

$ LC_ALL=de_DE.UTF-8 perl -we 'require 5.006;'
Version string '5,006' contains invalid data; ignoring: ',006' at -e line 1.

Updated by Julian Wiesener almost 3 years ago

first line in /usr/lib/locale/de_DE.UTF-8/LC_NUMERIC/LCL_DATA is the "source" of the , if changed to a ., the problem disappears and of course the locale is broken then.

Workarround for Users:

unset LC_ALL
LANG=de_DE.UTF-8
LC_NUMERIC=en_US.UTF-8
export LANG LC_NUMERIC

works as expected:

$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME="de_DE.UTF-8"
LC_COLLATE=C
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=
$ /usr/sbin/psrinfo
0 on-line since 06/29/2011 09:47:37
1 on-line since 06/29/2011 09:47:42

Updated by Julian Wiesener almost 3 years ago

  • % Done changed from 0 to 50

problem appears to be in util.c, it allows to use USE_LOCALE_NUMERIC CPP makro to temporary disable the locale, i'll give it a try.

Updated by Julian Wiesener almost 3 years ago

  • Status changed from Feedback to In Progress

Updated by Julian Wiesener almost 3 years ago

root source found, the bug is not in perl, its in Illumos locales, you can't do setlocale(LC_NUMERIC, "C");

https://www.illumos.org/issues/1232

Updated by Alasdair Lumsden over 2 years ago

  • Status changed from In Progress to Feedback

Andrzej has built the latest illumos which includes a fix:

http://hg.openindiana.org/illumos-gate/rev/a4e1558c0599

This was pushed to /dev-il on Monday 24th July 2011.

Setting to Feedback, if the original reporter could test with "system/library 0.5.11,5.11-0.151:20110724T021930Z" from /dev-il, that would be great.

Updated by Thomas Mieslinger over 2 years ago

Hi,

I've updated to system/library 0.5.11,5.11-0.151:20110724T021930Z and psrinfo and friends now work as expected.

Thanks.

Thomas

Updated by Julian Wiesener over 2 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 50 to 100

Also available in: Atom PDF