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

Weird, underspecified, BSD error #4420

Closed
p5pRT opened this issue Sep 18, 2001 · 6 comments
Closed

Weird, underspecified, BSD error #4420

p5pRT opened this issue Sep 18, 2001 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 18, 2001

Migrated from rt.perl.org#7698 (status was 'resolved')

Searchable as RT7698$

@p5pRT
Copy link
Author

p5pRT commented Sep 18, 2001

From don@resun.com

I'm trying to run down a problem where a perl script is invoking
a separate program, and is trying to interface via the stdio
package.

At this point, I'm not providing a test case, since I believe that
one of the standard test cases may be relevant.

The test case is included in pragma/warnings as test case #303
(pp_hot.c). There is a note on the test that it fails on some BSD*
systems, however, the same test also appears to be included in perl
v5.004.04 and does not fail (at least under BSD v1.4.2).

In other words, when using a higher version level of perl v5.6.1,
the test fails, but when using perl v5.004.04, the test passes.

Since it's two different versions of perl, running on the same OS,
I'd suspect that something changed in perl that has caused the
problem.

The program in question functions perfectly when using perl
v5.004.04 under NetBSD v1.4.2. It is failing when using perl v5.6.1
under NetBSD 1.5.2. (The problem that I fixed by using perl
v5.004.04 under NetBSD v1.4.2 has reappeared since I reinstalled
perl when I upgraded NetBSD to v1.5.2. I can't simply use the perl
v5.004.04 code file, as the code file formats changed to ELF from
a.out when the OS was changed, and also, the location of the
libraries is different (libraries are under a different mount
point.)

Ultimately, it would be nice to see perl v5.6.1 fixed so that it
would correctly execute the program, and so that I wouldn't have to
play games, trying to run two different version of perl at the same
time (as I did under NetBSD v1.4.2).

I'm willing to try and provide more information and/or run tests to
try and determine what the problem is.

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.6.1:

Configured by don at Sun Sep 16 15:31:28 PDT 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=netbsd, osvers=1.5.2, archname=i386-netbsd
    uname='netbsd pulsar.resun.com 1.5.2 netbsd 1.5.2 (resun) #0: mon sep 10 04:07:43 pdt 2001 don@pulsar.resun.com:usrsrcsysarchi386compileresun i386 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/pkg/include',
    optimize='-O2 -g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/pkg/include'
    ccversion='', gccversion='egcs-2.91.66 19990314 (egcs-1.1.2 release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib -L/usr/pkg/lib'
    libpth=/usr/local/lib /usr/pkg/lib /usr/lib
    libs=-lm -lc -lposix -lcrypt -lutil
    perllibs=-lm -lc -lposix -lcrypt -lutil
    libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-R/lib '
    cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared  -L/usr/local/lib -L/usr/pkg/lib'

Locally applied patches:
    


@INC for perl v5.6.1:
    /usr/local/lib/perl5/5.6.1/i386-netbsd
    /usr/local/lib/perl5/5.6.1
    /usr/local/lib/perl5/site_perl/5.6.1/i386-netbsd
    /usr/local/lib/perl5/site_perl/5.6.1
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.6.1:
    HOME=/home/resun/don
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/resun/don/bin:/usr/local/sbin:/usr/local/bin:/usr/pkg/bin:/usr/pkg/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/games:/usr/X11R6/bin
    PERL_BADLANG (unset)
    SHELL=/usr/pkg/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Nov 8, 2005

@smpeters - Status changed from 'open' to 'stalled'

@p5pRT
Copy link
Author

p5pRT commented Apr 30, 2012

From @Hugmeir

On Mon Sep 17 18​:54​:50 2001, don@​resun.com wrote​:

-----------------------------------------------------------------
[Please enter your report here]
I'm trying to run down a problem where a perl script is invoking
a separate program, and is trying to interface via the stdio
package.

At this point, I'm not providing a test case, since I believe that
one of the standard test cases may be relevant.

The test case is included in pragma/warnings as test case #303
(pp_hot.c). There is a note on the test that it fails on some BSD*
systems, however, the same test also appears to be included in perl
v5.004.04 and does not fail (at least under BSD v1.4.2).

In other words, when using a higher version level of perl v5.6.1,
the test fails, but when using perl v5.004.04, the test passes.

Since it's two different versions of perl, running on the same OS,
I'd suspect that something changed in perl that has caused the
problem.

The program in question functions perfectly when using perl
v5.004.04 under NetBSD v1.4.2. It is failing when using perl v5.6.1
under NetBSD 1.5.2. (The problem that I fixed by using perl
v5.004.04 under NetBSD v1.4.2 has reappeared since I reinstalled
perl when I upgraded NetBSD to v1.5.2. I can't simply use the perl
v5.004.04 code file, as the code file formats changed to ELF from
a.out when the OS was changed, and also, the location of the
libraries is different (libraries are under a different mount
point.)

Ultimately, it would be nice to see perl v5.6.1 fixed so that it
would correctly execute the program, and so that I wouldn't have to
play games, trying to run two different version of perl at the same
time (as I did under NetBSD v1.4.2).

I'm willing to try and provide more information and/or run tests to
try and determine what the problem is.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=medium
---
Site configuration information for perl v5.6.1​:

Configured by don at Sun Sep 16 15​:31​:28 PDT 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1)
configuration​:
Platform​:
osname=netbsd, osvers=1.5.2, archname=i386-netbsd
uname='netbsd pulsar.resun.com 1.5.2 netbsd 1.5.2 (resun) #0​: mon
sep 10 04​:07​:43 pdt 2001
don@​pulsar.resun.com​:usrsrcsysarchi386compileresun i386 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler​:
cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing
-I/usr/pkg/include',
optimize='-O2 -g',
cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/pkg/include'
ccversion='', gccversion='egcs-2.91.66 19990314 (egcs-1.1.2
release)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=y, prototype=define
Linker and Libraries​:
ld='cc', ldflags =' -L/usr/local/lib -L/usr/pkg/lib'
libpth=/usr/local/lib /usr/pkg/lib /usr/lib
libs=-lm -lc -lposix -lcrypt -lutil
perllibs=-lm -lc -lposix -lcrypt -lutil
libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-R/lib '
cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared
-L/usr/local/lib -L/usr/pkg/lib'

Locally applied patches​:

---
@​INC for perl v5.6.1​:
/usr/local/lib/perl5/5.6.1/i386-netbsd
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i386-netbsd
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.

---
Environment for perl v5.6.1​:
HOME=/home/resun/don
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)

PATH=/home/resun/don/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/pkg/bin​:/usr/pkg/sbin​:/sbin​:/usr/sbin​:/bin​:/usr/bin​:/etc​:/usr/games​:/usr/X11R6/bin

PERL\_BADLANG \(unset\)
SHELL=/usr/pkg/bin/tcsh

Since neither NetBSD 1.5.2 nor Perl 5.6 are supported, and newer Perls
install cleanly on NetBSD 5, I vote to close this.

@p5pRT
Copy link
Author

p5pRT commented Apr 30, 2012

The RT System itself - Status changed from 'stalled' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 30, 2012

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Apr 30, 2012
@p5pRT
Copy link
Author

p5pRT commented May 1, 2012

From @nwc10

On Mon, Apr 30, 2012 at 12​:02​:21AM -0700, Brian Fraser via RT wrote​:

On Mon Sep 17 18​:54​:50 2001, don@​resun.com wrote​:

-----------------------------------------------------------------
[Please enter your report here]
I'm trying to run down a problem where a perl script is invoking
a separate program, and is trying to interface via the stdio
package.

At this point, I'm not providing a test case, since I believe that
one of the standard test cases may be relevant.

The test case is included in pragma/warnings as test case #303
(pp_hot.c). There is a note on the test that it fails on some BSD*
systems, however, the same test also appears to be included in perl
v5.004.04 and does not fail (at least under BSD v1.4.2).

I believe that the test referenced here is the commented out read in
t/pragma/warn/pp_hot

########
# pp_hot.c [pp_print]
use warnings 'io' ;
print STDIN "anc";
print <STDOUT>;
print <STDERR>;
open(FOO, ">&STDOUT") and print <FOO>;
print getc(STDERR);
print getc(FOO);
####################################################################
# The next test is known to fail on some systems (Linux+old glibc, #
# old *BSDs, and NeXT, among others. #
# We skip it for now (on the grounds that it is "just" a warning). #
####################################################################
#read(FOO,$_,1);
no warnings 'io' ;
print STDIN "anc";
EXPECT
Filehandle main​::STDIN opened only for input at - line 3.
Filehandle main​::STDOUT opened only for output at - line 4.
Filehandle main​::STDERR opened only for output at - line 5.
Filehandle main​::FOO opened only for output at - line 6.
Filehandle main​::STDERR opened only for output at - line 7.
Filehandle main​::FOO opened only for output at - line 8.

The test for read was commented out in commit 37bd139
It tests this​:

./perl -we 'open FOO, ">/dev/null"; $SIG{__WARN__} = sub {die @​_}; read FOO,$FOO, 1'

In other words, when using a higher version level of perl v5.6.1,
the test fails, but when using perl v5.004.04, the test passes.

Since it's two different versions of perl, running on the same OS,
I'd suspect that something changed in perl that has caused the
problem.

The program in question functions perfectly when using perl
v5.004.04 under NetBSD v1.4.2. It is failing when using perl v5.6.1
under NetBSD 1.5.2. (The problem that I fixed by using perl
v5.004.04 under NetBSD v1.4.2 has reappeared since I reinstalled
perl when I upgraded NetBSD to v1.5.2. I can't simply use the perl
v5.004.04 code file, as the code file formats changed to ELF from
a.out when the OS was changed, and also, the location of the
libraries is different (libraries are under a different mount
point.)

However, that construction didn't warn at all until commit af8c498
(Jul 1999), so post 5.004_04, so this can't be the same thing. The above
code doesn't warn on 5.005 or 5.004_04. Moreover, the test t/praga/warnings.t
only has 18 subtests in 5.004_04, so it isn't testing the same thing as
5.6.1 (or later), meaning that the pass on 5.004_04 unfortunately isn't
telling us much.

Also, the original commit that mentions failures on *BSD too is this​:

commit 88c07c3
Author​: Jarkko Hietaniemi <jhi@​iki.fi>
Date​: Mon Aug 2 12​:43​:16 1999 +0000

  Mention that also *BSD systems with glibc are known to stumble.

  p4raw-id​: //depot/cfgperl@​3886

so it seems to be a glibc thing, not a general cross-platform weakness.

The commented-out read warning test was removed by this commit​:

commit 977289e
Author​: Nicholas Clark <nick@​ccl4.org>
AuthorDate​: Sat Feb 9 22​:31​:29 2002 +0000
Commit​: Jarkko Hietaniemi <jhi@​iki.fi>
CommitDate​: Sat Feb 9 21​:42​:26 2002 +0000

  Re​: FreeBSD hangs when reading from dup'd STDOUT/ERR w/o perlio
  Message-ID​: <20020209223129.GH410@​Bagpuss.unfortu.net>
 
  p4raw-id​: //depot/perl@​14614

I don't think that that was intentional. I don't think that we're testing
that warning any more, and I guess that we should re-instate that test.

Ultimately, it would be nice to see perl v5.6.1 fixed so that it
would correctly execute the program, and so that I wouldn't have to
play games, trying to run two different version of perl at the same
time (as I did under NetBSD v1.4.2).

I'm willing to try and provide more information and/or run tests to
try and determine what the problem is.

It's unfortunate that we didn't take up this offer at the time.
But we always seem to have more bug reports coming in than volunteers
willing and able to act on them.

Since neither NetBSD 1.5.2 nor Perl 5.6 are supported, and newer Perls
install cleanly on NetBSD 5, I vote to close this.

I've tried on everything old that I have access to, and I can't replicate
the read warning failure. Not even on the FreeBSD 4.6 machine that hadn't
been booted for 54 months.

Nicholas Clark

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

No branches or pull requests

1 participant