Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On 27.09.2016 21:51, Niko Tyni wrote: > Anyway, I'm attaching a workaround patch that just lowers the optimization > of op.c. I've verified that the test suite passes with this. > We'll include this in the next perl upload unless somebody objects. I agree that including the patch is a better approach for now. We need a working up-to-date perl on the buildds. Helge
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On Sun, Sep 25, 2016 at 03:30:45PM -0400, John David Anglin wrote: > On 2016-09-25, at 4:09 AM, Niko Tyni wrote: > > > - building with gcc-5 or at -O0 makes it go away > > - I've bisected with gcc #pragmas that disabling optimization for just > > Perl_custom_op_register() in op.c makes it go away > > - I haven't managed to find which specific optimization causes it > > Attached is the diff in assembly output for Perl_custom_op_register compiled > with gcc-5 and gcc-6, > respectively. This is with 5.22.2 which I happened to have handy. > > The differences are just label changes and I don't see any functional > difference in the assembly. That's a bit weird. Presumably then the relevant difference in generated code between gcc versions is somewhere else, and the optimized version of Perl_custom_op_register() only breaks with the gcc 6 generated code. Anyway, I'm attaching a workaround patch that just lowers the optimization of op.c. I've verified that the test suite passes with this. We'll include this in the next perl upload unless somebody objects. -- Niko Tyni nt...@debian.org >From 0950188fc6a08ecb3b924fc4973c3907ecfdbdf7 Mon Sep 17 00:00:00 2001 From: Niko TyniDate: Sun, 25 Sep 2016 09:59:22 +0200 Subject: [PATCH] Temporarily lower the optimization of op.c on hppa due to gcc-6 problems This fixes a crash in ext/XS-APItest/t/customop.t It's currently unclear if the problem is with the code or the gcc-6 optimizer. Bug-Debian: https://bugs.debian.org/838613 --- cflags.SH | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cflags.SH b/cflags.SH index a50044e..ba4ac89 100755 --- a/cflags.SH +++ b/cflags.SH @@ -495,6 +495,12 @@ for file do # or customize here case "$file" in +op) : work around http://bugs.debian.org/838613 +case $archname in +hppa-*) +optimize="$optimize -O0";; +esac;; + regcomp) : work around http://bugs.debian.org/754054 case $archname in mips-*|mipsel-*) -- 2.9.3
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On 2016-09-25, at 4:09 AM, Niko Tyni wrote: > - building with gcc-5 or at -O0 makes it go away > - I've bisected with gcc #pragmas that disabling optimization for just > Perl_custom_op_register() in op.c makes it go away > - I haven't managed to find which specific optimization causes it Attached is the diff in assembly output for Perl_custom_op_register compiled with gcc-5 and gcc-6, respectively. This is with 5.22.2 which I happened to have handy. The differences are just label changes and I don't see any functional difference in the assembly. Dave -- John David Anglin dave.ang...@bell.net --- op.s-5-op_reg 2016-09-25 15:09:24.274823706 -0400 +++ op.s-6-op_reg 2016-09-25 15:06:37.273864748 -0400 @@ -7,7 +7,7 @@ .PROC .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=7 .ENTRY -.LVL1221: +.LVL1222: stw %r2,-20(%r30) .loc 1 14168 0 ldi 0,%r23 @@ -21,7 +21,7 @@ copy %r24,%r6 .loc 1 14168 0 copy %r25,%r24 -.LVL1222: +.LVL1223: .loc 1 14162 0 stw %r4,-116(%r30) stw %r3,-112(%r30) @@ -32,23 +32,23 @@ .loc 1 14168 0 bl Perl_newSViv,%r2 copy %r26,%r3 -.LVL1223: +.LVL1224: copy %r3,%r26 bl Perl_sv_2mortal,%r2 copy %r28,%r25 -.LVL1224: +.LVL1225: .loc 1 14170 0 ldw 2024(%r3),%r4 -.LVL1225: - comib,= 0,%r4,.L2023 +.LVL1226: + comib,= 0,%r4,.L2026 copy %r28,%r7 -.L2021: +.L2024: .loc 1 14173 0 ldi 0,%r23 copy %r6,%r24 bl Perl_newSViv,%r2 copy %r3,%r26 -.LVL1226: +.LVL1227: stw %r0,-68(%r30) ldi 4,%r19 stw %r28,-64(%r30) @@ -60,44 +60,44 @@ copy %r3,%r26 bl Perl_hv_common,%r2 stw %r0,-52(%r30) -.LVL1227: - comib,= 0,%r28,.L2024 +.LVL1228: + comib,= 0,%r28,.L2027 ldw -148(%r30),%r2 .loc 1 14175 0 ldw -124(%r30),%r6 -.LVL1228: +.LVL1229: ldw -120(%r30),%r5 ldw -116(%r30),%r4 ldw -112(%r30),%r3 -.LVL1229: .LVL1230: +.LVL1231: bv %r0(%r2) ldwm -128(%r30),%r7 -.LVL1231: -.L2023: -.LBB2498: +.LVL1232: +.L2026: +.LBB2505: .loc 1 14171 0 ldi 12,%r25 bl Perl_newSV_type,%r2 copy %r3,%r26 -.LVL1232: -.LBE2498: +.LVL1233: +.LBE2505: stw %r28,2024(%r3) - b .L2021 + b .L2024 copy %r28,%r4 -.LVL1233: -.L2024: -.LBB2499: -.LBB2500: +.LVL1234: +.L2027: +.LBB2506: +.LBB2507: .loc 1 14174 0 ldil LR'.LC61,%r25 ldw 4(%r6),%r24 ldo RR'.LC61(%r25),%r25 bl Perl_croak,%r2 copy %r3,%r26 -.LVL1234: -.LBE2500: -.LBE2499: +.LVL1235: +.LBE2507: +.LBE2506: nop .EXIT .PROCEND
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On 2016-09-25, at 4:09 AM, Niko Tyni wrote: > On Fri, Sep 23, 2016 at 07:44:13AM -0400, John David Anglin wrote: >> On 2016-09-23, at 2:24 AM, Niko Tyni wrote: >>> On Thu, Sep 22, 2016 at 08:49:42PM -0400, John David Anglin wrote: > Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl fails to build from source. For example, see: https://buildd.debian.org/status/fetch.php?pkg=perl=hppa=5.22.2-5=1474392510 >>> >>> There are earlier cases of this on experimental buildds. The oldest I >>> see is 5.22.1-6. It looks like this regressed with gcc 6. > > I got hppa shell access from Helge, some results: > > - building with gcc-5 or at -O0 makes it go away > - I've bisected with gcc #pragmas that disabling optimization for just > Perl_custom_op_register() in op.c makes it go away > - I haven't managed to find which specific optimization causes it Thanks, that's a huge step in narrowing the problem. If the routine isn't too large, maybe I can spot problem. Of course, most optimization bugs are in the core gcc code. > > If nothing else, we can set the optimization level for op.c to -O0 in > cflags.SH on hppa. Of course even better if somebody can find a more > targeted deoptimization and/or the underlying reason (whether a code > bug or a gcc optimizer one.) I don't intend to work much on that myself. > > As the Perl 5.24 transition is currently ongoing in unstable, I don't > think we want to do a perl upload for the sake of a non-release arch > before the transition is over. At the same time, I expect missing the > 500+ transition binNMUs from the release team is inconvenient for the > hppa porters. Yes. > > Maybe you could manually upload a DEB_BUILD_OPTIONS=noopt build of 5.24 > for now, unless you have a separate hppa-specific package repository > where a sourceful fix could go? The perl 5.24 transition is almost done except for a few packages. I will try the above this afternoon. we don't have separate repository. Dave -- John David Anglin dave.ang...@bell.net
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On Fri, Sep 23, 2016 at 07:44:13AM -0400, John David Anglin wrote: > On 2016-09-23, at 2:24 AM, Niko Tyni wrote: > > On Thu, Sep 22, 2016 at 08:49:42PM -0400, John David Anglin wrote: > >> Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl > >> fails to build from source. For example, see: > >> https://buildd.debian.org/status/fetch.php?pkg=perl=hppa=5.22.2-5=1474392510 > > > > There are earlier cases of this on experimental buildds. The oldest I > > see is 5.22.1-6. It looks like this regressed with gcc 6. I got hppa shell access from Helge, some results: - building with gcc-5 or at -O0 makes it go away - I've bisected with gcc #pragmas that disabling optimization for just Perl_custom_op_register() in op.c makes it go away - I haven't managed to find which specific optimization causes it If nothing else, we can set the optimization level for op.c to -O0 in cflags.SH on hppa. Of course even better if somebody can find a more targeted deoptimization and/or the underlying reason (whether a code bug or a gcc optimizer one.) I don't intend to work much on that myself. As the Perl 5.24 transition is currently ongoing in unstable, I don't think we want to do a perl upload for the sake of a non-release arch before the transition is over. At the same time, I expect missing the 500+ transition binNMUs from the release team is inconvenient for the hppa porters. Maybe you could manually upload a DEB_BUILD_OPTIONS=noopt build of 5.24 for now, unless you have a separate hppa-specific package repository where a sourceful fix could go? -- Niko Tyni nt...@debian.org
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On 2016-09-23, at 2:24 AM, Niko Tyni wrote: > On Thu, Sep 22, 2016 at 08:49:42PM -0400, John David Anglin wrote: >> Package: perl >> Version: 5.22.2-3 >> Severity: normal >> >> Dear Maintainer, >> >> Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl >> fails to build from source. For example, see: >> https://buildd.debian.org/status/fetch.php?pkg=perl=hppa=5.22.2-5=1474392510 > > There are earlier cases of this on experimental buildds. The oldest I > see is 5.22.1-6. It looks like this regressed with gcc 6. I'm checking with Helge. Currently, sibaris is being moved and not available. > > Are there hppa porter boxes available? Can't do much without. > You might want to test if it still builds with gcc5, and possibly > play with different optimization levels. I did a test build outside buildd and will try to get more info. > -- > Niko Tyni nt...@debian.org Dave -- John David Anglin dave.ang...@bell.net
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
> Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl I do see in the kernel dmesg that perl tries to jump into nirvana (type=6 means ITLB fault): [55974.502498] do_page_fault() command='perl' type=6 address=0xbe400403 in attributes.so[f87c3000+3000] [55974.503017] vm_start = 0x001d7000, vm_end = 0x0039c000 gdb output isn't helpful either: process 8125 is executing new program: /build/perl/perl-5.22.2/perl .././ext/XS-APItest/t/customop.t .. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/hppa-linux-gnu/libthread_db.so.1". Thread 2.1 "perl" received signal SIGSEGV, Segmentation fault. 0xbe400400 in ?? () (gdb) bt #0 0xbe400400 in ?? () #1 0x0004203c in Perl_rpeep (my_perl=0x1d7008, o=0x37d8d0) at op.c:14015 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Niko wrote: > Are there hppa porter boxes available? Can't do much without. We don't have debian porter boxes, but if you send me your public ssh key and preferred login name via email to "del...@gmx.de", then I can provide you with access to one of the debian buildds. Helge
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
On Thu, Sep 22, 2016 at 08:49:42PM -0400, John David Anglin wrote: > Package: perl > Version: 5.22.2-3 > Severity: normal > > Dear Maintainer, > > Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl > fails to build from source. For example, see: > https://buildd.debian.org/status/fetch.php?pkg=perl=hppa=5.22.2-5=1474392510 There are earlier cases of this on experimental buildds. The oldest I see is 5.22.1-6. It looks like this regressed with gcc 6. Are there hppa porter boxes available? Can't do much without. You might want to test if it still builds with gcc5, and possibly play with different optimization levels. -- Niko Tyni nt...@debian.org
Bug#838613: perl: FTBFS on hppa - ext/XS-APItest/t/customop FAILED
Package: perl Version: 5.22.2-3 Severity: normal Dear Maintainer, Since 5.22.2-4, the ext/XS-APItest/t/customop test fails on hppa and perl fails to build from source. For example, see: https://buildd.debian.org/status/fetch.php?pkg=perl=hppa=5.22.2-5=1474392510 Regards, Dave Anglin -- System Information: Debian Release: stretch/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable') Architecture: hppa (parisc64) Kernel: Linux 4.7.4+ (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages perl depends on: ii dpkg 1.18.10 ii libperl5.225.22.2-3 ii perl-base 5.22.2-3 ii perl-modules-5.22 5.22.2-5 Versions of packages perl recommends: ii netbase 5.3 ii rename 0.20-4 Versions of packages perl suggests: ii libterm-readline-gnu-perl 1.34-1 ii make 4.1-9 ii perl-doc 5.22.2-5 -- no debconf information