develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #118055] miniperl fails with SIGBUS on sparc (usethreads+use64bitint)

Thread Previous | Thread Next
From:
Peter Martini
Date:
May 21, 2013 00:45
Subject:
Re: [perl #118055] miniperl fails with SIGBUS on sparc (usethreads+use64bitint)
Message ID:
CAFyW6MTHxid3E4h1hg4i80zZPwD2GofnKU94YG-L-zWXxNq3tQ@mail.gmail.com
On Sun, May 19, 2013 at 3:50 PM, Niko Tyni <perlbug-followup@perl.org> wrote:
> # New Ticket Created by  Niko Tyni
> # Please include the string:  [perl #118055]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118055 >
>
>
> This is a bug report for perl from Niko Tyni <ntyni@debian.org>,
> generated with the help of perlbug 1.39 running under perl 5.18.0.
>
>
> -----------------------------------------------------------------
> [ Sorry about the timing, it took a week for our sparc build server to get
>   round to building 5.18.0-RC1, and we got the result just hours after
>   the 5.18.0 release. ]
>
>
> 5.18.0 build fails on sparc with -Dusethreads -Duse64bitint.
> miniperl gets a SIGBUS with just about any non-trivial program.
>
>   ./miniperl -w -Ilib -MExporter -e '<?>' || /usr/bin/make minitest
>   ./miniperl -Ilib make_patchnum.pl
>   make[1]: *** [lib/Config_git.pl] Bus error

Interesting - I don't get the same result when building with those
args on Solaris 10/gcc:

-bash-3.2$ gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-bash-3.2$ uname -a
SunOS sunsmoke 5.10 Generic_147440-01 sun4v sparc SUNW,Sun-Fire-T1000

I'm rebuilding fresh now to see if I can get it to choke, and will
send the full -V output and test results when I'm done.

>
> An example backtrace:
>   Starting program: /home/ntyni/perl/miniperl -e s/a/b/
>   [Thread debugging using libthread_db enabled]
>   Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".
>
>   Program received signal SIGBUS, Bus error.
>   0x0002ffcc in Perl_newPMOP (my_perl=0x26e008, type=33, flags=0) at op.c:4458
>   4458        pmop->op_pmoffset = av_len(PL_regex_padav);
>   (gdb) bt
>   #0  0x0002ffcc in Perl_newPMOP (my_perl=0x26e008, type=33, flags=0) at op.c:4458
>   #1  0x0008c56c in S_scan_subst (my_perl=0x26e008, start=0x28c8f1 "/a/b/\n") at toke.c:9650
>   #2  0x0008421c in Perl_yylex (my_perl=0x26e008) at toke.c:8353
>   #3  0x000957e8 in Perl_yyparse (my_perl=0x26e008, gramtype=258) at perly.c:341
>   #4  0x00018294 in S_parse_body (my_perl=0x26e008, env=0x0, xsinit=0x4cfa4 <xs_init>) at perl.c:2309
>   #5  0x00016d94 in perl_parse (my_perl=0x26e008, xsinit=0x4cfa4 <xs_init>, argc=3, argv=0xffffdd04,
>       env=0x0) at perl.c:1626
>   #6  0x0004ce68 in main (argc=3, argv=0xffffdd04, env=0xffffdd14) at miniperlmain.c:111
>
> This is also
>  http://bugs.debian.org/708792
> and a full build log is at
>  https://buildd.debian.org/status/fetch.php?pkg=perl&arch=sparc&ver=5.18.0~rc1-1&stamp=1368891868
>
> Perlbugging this with a non-threaded build. All the tests pass with that.
> The actual Configure arguments used for testing were
>
>  ./Configure -Doptimize="-g -O0" -des -Dusethreads -Duse64bitint
>
> and both -Dusethreads -Duse64bitint are needed to trigger it.
>
> Seen with gcc 4.4, 4.6 and 4.8, at both -O0 and -O2.
> Also tried -DDEBUGGING with no visible difference.
>
> Bisecting says the first bad commit is
>
> commit 8be227ab5eaa23f2d21fd15f70190e494496dcbe
> Author: Father Chrysostomos <sprout@cpan.org>
> Date:   Sat Jun 23 09:54:31 2012 -0700
>
>     CV-based slab allocation for ops
>
> -----------------------------------------------------------------
> ---
> Flags:
>     category=core
>     severity=high
> ---
> Site configuration information for perl 5.18.0:
>
> Configured by ntyni at Sun May 19 16:39:10 UTC 2013.
>
> Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
>   Commit id: a9acda3b5f74585852a57b51b724804ac586cb0b
>   Platform:
>     osname=linux, osvers=2.6.32-5-sparc64-smp, archname=sparc-linux-64int
>     uname='linux smetana 2.6.32-5-sparc64-smp #1 smp mon feb 25 02:19:08 utc 2013 sparc gnulinux '
>     config_args='-Doptimize=-g -O0 -des -Duse64bitint'
>     hint=recommended, useposix=true, d_sigaction=define
>     useithreads=undef, usemultiplicity=undef
>     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
>     use64bitint=define, use64bitall=undef, uselongdouble=undef
>     usemymalloc=n, bincompat5005=undef
>   Compiler:
>     cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>     optimize='-g -O0',
>     cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
>     ccversion='', gccversion='4.6.3', gccosandvers=''
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
>     ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
>     alignbytes=8, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
>     libpth=/usr/local/lib /lib/sparc-linux-gnu /lib/../lib /usr/lib/sparc-linux-gnu /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64
>     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
>     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
>     libc=, so=so, useshrplib=false, libperl=libperl.a
>     gnulibc_version='2.13'
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
>     cccdlflags=' -fPIC', lddlflags='-shared -g -O0 -L/usr/local/lib -fstack-protector'
>
> Locally applied patches:
>
>
> ---
> @INC for perl 5.18.0:
>     lib
>     /usr/local/lib/perl5/site_perl/5.18.0/sparc-linux-64int
>     /usr/local/lib/perl5/site_perl/5.18.0
>     /usr/local/lib/perl5/5.18.0/sparc-linux-64int
>     /usr/local/lib/perl5/5.18.0
>     .
>
> ---
> Environment for perl 5.18.0:
>     HOME=/home/ntyni
>     LANG=en_US.UTF-8
>     LANGUAGE (unset)
>     LC_CTYPE=fi_FI.UTF-8
>     LD_LIBRARY_PATH (unset)
>     LOGDIR (unset)
>     PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
>     PERL_BADLANG (unset)
>     SHELL=/bin/zsh
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About