Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #7698] Weird, underspecified, BSD error

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Apr 30, 2012, 12:02 AM

Post #1 of 2 (87 views)
Permalink
[perl #7698] Weird, underspecified, BSD error

On Mon Sep 17 18:54:50 2001, don [at] resun 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 [at] pulsar: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.


---
via perlbug: queue: perl5 status: stalled
https://rt.perl.org:443/rt3/Ticket/Display.html?id=7698


nick at ccl4

May 1, 2012, 8:43 AM

Post #2 of 2 (80 views)
Permalink
Re: [perl #7698] Weird, underspecified, BSD error [In reply to]

On Mon, Apr 30, 2012 at 12:02:21AM -0700, Brian Fraser via RT wrote:
> On Mon Sep 17 18:54:50 2001, don [at] resun 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 37bd1396ea9d91e6
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 af8c498a3c5921fd
(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 88c07c3641c0fb59ded524dfdcea26f44c3acd38
Author: Jarkko Hietaniemi <jhi [at] iki>
Date: Mon Aug 2 12:43:16 1999 +0000

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

p4raw-id: //depot/cfgperl [at] 388


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 977289e453fafcc6c4f8f865674ef59a1dc2ee09
Author: Nicholas Clark <nick [at] ccl4>
AuthorDate: Sat Feb 9 22:31:29 2002 +0000
Commit: Jarkko Hietaniemi <jhi [at] iki>
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 [at] Bagpuss>

p4raw-id: //depot/perl [at] 1461


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

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.