perl-Test-LeakTrace-0.16-1.fc27 fails to build on ppc64 because a test fails: xt/04_synopsis.t ...... ok # Using valgrind 3.13.0 located at /usr/bin/valgrind # Generating suppressions... # Suppressions for this perl stored in /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-f8a949ca13829ef9427e49411b853411.supp # Using suppressions from /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-f8a949ca13829ef9427e49411b853411.supp # Failed test 'UninitCondition' # at /usr/share/perl5/vendor_perl/Test/Valgrind/Session.pm line 598. # got: 2 # expected: 0 # # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [?:?] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [?:?] # leaktrace_runops (/builddir/build/BUILD/Test-LeakTrace-0.16/blib/arch/auto/Test/LeakTrace/LeakTrace.so) [LeakTrace.xs:184] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [?:?] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [?:?] # ? (/usr/bin/perl) [?:?] # generic_start_main.isra.0 (/usr/lib64/power8/libc-2.25.90.so) [?:?] # (below main) (/usr/lib64/power8/libc-2.25.90.so) [?:?] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [?:?] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [?:?] # leaktrace_runops (/builddir/build/BUILD/Test-LeakTrace-0.16/blib/arch/auto/Test/LeakTrace/LeakTrace.so) [LeakTrace.xs:184] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [?:?] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [?:?] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [?:?] # ? (/usr/bin/perl) [?:?] # generic_start_main.isra.0 (/usr/lib64/power8/libc-2.25.90.so) [?:?] # (below main) (/usr/lib64/power8/libc-2.25.90.so) [?:?] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [?:?] # Looks like your test exited with 1 just after 15. xt/05_valgrind.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/15 subtests Koschei reports first failure (on all platforms) with these build root changes: perl-Test-Simple 1:1.302085-2.fc27 > 1:1.302086-1.fc27 perl-Module-CoreList 1:5.20170531-3.fc27 > 1:5.20170621-1.fc27 glibc 2.25.90-6.fc27 > 2.25.90-12.fc27 valgrind 1:3.13.0-1.fc27 > 1:3.13.0-2.fc27 libcrypt-nss 2.25.90-6.fc27 > 2.25.90-12.fc27 perl-Encode 4:2.90-9.fc27 > 4:2.91-11.fc27 glibc-devel 2.25.90-6.fc27 > 2.25.90-12.fc27 glibc-all-langpacks 2.25.90-6.fc27 > 2.25.90-12.fc27 glibc-common 2.25.90-6.fc27 > 2.25.90-12.fc27 glibc-headers 2.25.90-6.fc27 > 2.25.90-12.fc27 libffi 3.1-10.fc26 > 3.1-11.fc27 nss-softokn-freebl 3.30.2-2.fc27 > 3.31.0-2.fc27 expat 2.2.0-2.fc26 > 2.2.1-1.fc27 kernel-headers 4.12.0-0.rc5.git2.1.... > 4.12.0-0.rc6.git3.1.... nss-util 3.30.2-3.fc27 > 3.31.0-2.fc27 libcurl 7.54.1-1.fc27 > 7.54.1-2.fc27 perl-HTTP-Message 6.11-5.fc27 > 6.13-1.fc27 curl 7.54.1-1.fc27 > 7.54.1-2.fc27 glib2 2.53.2-1.fc27 > 2.53.3-1.fc27 nspr 4.14.0-2.fc27 > 4.15.0-1.fc27 nss-softokn 3.30.2-2.fc27 > 3.31.0-2.fc27 And next build root change keeps ppc64 failing only: perl-devel 4:5.26.0-393.fc27 > 4:5.26.0-394.fc27 perl-libs 4:5.26.0-393.fc27 > 4:5.26.0-394.fc27 perl 4:5.26.0-393.fc27 > 4:5.26.0-394.fc27 perl-IO 1.38-393.fc27 > 1.38-394.fc27 libcrypt-nss 2.25.90-12.fc27 > 2.25.90-15.fc27 valgrind 1:3.13.0-2.fc27 > 1:3.13.0-3.fc27 glibc 2.25.90-12.fc27 > 2.25.90-15.fc27 perl-macros 4:5.26.0-393.fc27 > 4:5.26.0-394.fc27 glibc-devel 2.25.90-12.fc27 > 2.25.90-15.fc27 openssl-libs 1:1.1.0f-3.fc27 > 1:1.1.0f-4.fc27 perl-Errno 1.28-393.fc27 > 1.28-394.fc27 glibc-common 2.25.90-12.fc27 > 2.25.90-15.fc27 perl-Pod-Html 1.22.02-393.fc27 > 1.22.02-394.fc27 glibc-headers 2.25.90-12.fc27 > 2.25.90-15.fc27 glibc-all-langpacks 2.25.90-12.fc27 > 2.25.90-15.fc27 perl-Net-Ping 2.55-393.fc27 > 2.55-394.fc27 perl-IO-Zlib 1:1.10-393.fc27 > 1:1.10-394.fc27 rpm-build 4.13.0.1-23.fc27 > 4.13.0.1-24.fc27 perl-Locale-Maketext-Simple 1:0.21-393.fc27 > 1:0.21-394.fc27 rpm 4.13.0.1-23.fc27 > 4.13.0.1-24.fc27 rpm-libs 4.13.0.1-23.fc27 > 4.13.0.1-24.fc27 perl-Math-Complex 1.59-393.fc27 > 1.59-394.fc27 rpm-build-libs 4.13.0.1-23.fc27 > 4.13.0.1-24.fc27 rpm-plugin-selinux 4.13.0.1-23.fc27 > 4.13.0.1-24.fc27 This happens even with glibc-2.25.90-22.fc27. I suspect an undefined behavior (or missing a valgrind suppresion) in glibc's __dcigettext().
perl-Test-Valgrind also fails to build on ppc64, with the same issues:
perl-Test-Valgrind also fails to build on ppc64, with the same issues: https://koji.fedoraproject.org/koji/taskinfo?taskID=20494071 https://kojipkgs.fedoraproject.org//work/tasks/4075/20494075/build.log Mark, any thoughts on how to proceed with this?
It would be good to run the testcase by hand under valgrind with glibc-debuginfo installed so we get precise source code lines in the backtrace and using valgrind --track-origins=yes to see where exactly the issue comes from.
(In reply to Mark Wielaard from comment #3) > It would be good to run the testcase by hand under valgrind with > glibc-debuginfo installed so we get precise source code lines in the > backtrace and using valgrind --track-origins=yes to see where exactly the > issue comes from. Here we go: $ make test "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Valgrind.bs blib/arch/auto/Test/Valgrind/Valgrind.bs 644 PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'bl ib/arch')" t/*.t # Testing Test::Valgrind 1.19, Perl 5.026000, /usr/bin/perl t/00-load.t ................... ok # Using valgrind 3.13.0 located at /builddir/build/BUILD/Test-Valgrind-1.19/bin/valgrind # Generating suppressions... # Suppressions for this perl stored in /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-248e36fee3eae24de9070610cdef29ec.supp # Using suppressions from /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-248e36fee3eae24de9070610cdef29ec.supp # 1..1 # not ok 1 - dummy test in the child, should not interfere with the actual TAP stream # # # Failed test 'dummy test in the child, should not interfere with the actual TAP stream' # # at t/10-good.t line 30. # # Looks like you failed 1 test of 1. # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:701] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [dcgettext.c:47] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [_strerror.c:71] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [locale.c:2597] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [mg.c:925] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [mg.c:201] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [sv.c:4461] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:226] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [perl.c:2848] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [perl.c:5016] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [perl.c:610] # main (/usr/bin/perl) [perlmain.c:134] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:490] # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:701] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [dcgettext.c:47] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [_strerror.c:71] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [locale.c:2597] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [mg.c:925] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [mg.c:201] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [sv.c:4461] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:226] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [perl.c:2848] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [perl.c:5016] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [perl.c:610] # main (/usr/bin/perl) [perlmain.c:134] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:490] # Failed test 'UninitCondition' # at /builddir/build/BUILD/Test-Valgrind-1.19/blib/lib/Test/Valgrind/Session.pm line 598. # got: 2 # expected: 0 # Looks like your test exited with 1 just after 15. t/10-good.t ................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/15 subtests # Using valgrind 3.13.0 located at /builddir/build/BUILD/Test-Valgrind-1.19/bin/valgrind # Using suppressions from /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-248e36fee3eae24de9070610cdef29ec.supp # dummy run-time exception, should not cause the test to fail at t/12-good-run-exception.t line 20. # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:701] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [dcgettext.c:47] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [_strerror.c:71] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [locale.c:2597] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [mg.c:925] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [mg.c:201] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [sv.c:4461] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:226] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [perl.c:2848] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [perl.c:5016] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [perl.c:610] # main (/usr/bin/perl) [perlmain.c:134] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:490] # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:701] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [dcgettext.c:47] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [_strerror.c:71] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [locale.c:2597] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [mg.c:925] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [mg.c:201] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [sv.c:4461] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:226] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [perl.c:2848] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [perl.c:5016] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [perl.c:610] # main (/usr/bin/perl) [perlmain.c:134] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:490] # Conditional jump or move depends on uninitialised value(s) # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:701] # dcgettext (/usr/lib64/power8/libc-2.25.90.so) [dcgettext.c:47] # strerror_r (/usr/lib64/power8/libc-2.25.90.so) [_strerror.c:71] # Perl_my_strerror (/usr/lib64/libperl.so.5.26.0) [locale.c:2597] # Perl_magic_get (/usr/lib64/libperl.so.5.26.0) [mg.c:925] # Perl_mg_get (/usr/lib64/libperl.so.5.26.0) [mg.c:201] # Perl_sv_setsv_flags (/usr/lib64/libperl.so.5.26.0) [sv.c:4461] # Perl_pp_sassign (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:226] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # Perl_call_sv (/usr/lib64/libperl.so.5.26.0) [perl.c:2848] # Perl_call_list (/usr/lib64/libperl.so.5.26.0) [perl.c:5016] # perl_destruct (/usr/lib64/libperl.so.5.26.0) [perl.c:610] # main (/usr/bin/perl) [perlmain.c:134] # Uninitialised value was created by a stack allocation # __dcigettext (/usr/lib64/power8/libc-2.25.90.so) [dcigettext.c:490] # Failed test 'UninitCondition' # at /builddir/build/BUILD/Test-Valgrind-1.19/blib/lib/Test/Valgrind/Session.pm line 598. # got: 3 # expected: 0 # Looks like your test exited with 1 just after 15. t/12-good-run-exception.t ..... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/15 subtests # Using valgrind 3.13.0 located at /builddir/build/BUILD/Test-Valgrind-1.19/bin/valgrind # Using suppressions from /builddir/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.13.0-248e36fee3eae24de9070610cdef29ec.supp # # leaking some bytes! # The subsequent report was correctly caught: # 10,000 bytes in 1 blocks are still reachable in loss record 20 of 20 # malloc (/usr/lib64/valgrind/vgpreload_memcheck-ppc64be-linux.so) [vg_replace_malloc.c:299] # tv_leak (/builddir/build/BUILD/Test-Valgrind-1.19/blib/arch/auto/Test/Valgrind/Valgrind.so) [Valgrind.xs:34] # XS_Test__Valgrind_leak (/builddir/build/BUILD/Test-Valgrind-1.19/blib/arch/auto/Test/Valgrind/Valgrind.so) [Valgrind.xs:54] # Perl_pp_entersub (/usr/lib64/libperl.so.5.26.0) [pp_hot.c:4231] # Perl_runops_standard (/usr/lib64/libperl.so.5.26.0) [run.c:41] # S_run_body (/usr/lib64/libperl.so.5.26.0) [perl.c:2524] # perl_run (/usr/lib64/libperl.so.5.26.0) [perl.c:2447] # main (/usr/bin/perl) [perlmain.c:123] t/20-bad.t .................... ok # Using IO::Handle 1.36 # Using IO::Select 1.22 # Using IPC::Open3 1.20 t/30-skip.t ................... ok t/60-version.t ................ ok t/70-session.t ................ ok t/71-session-command.t ........ ok # The default suppression file contains 25 suppressions, of which 25 are not empty and 25 apply to perl t/80-suppressions.t ........... ok t/81-suppressions-demangle.t .. ok Test Summary Report ------------------- t/10-good.t (Wstat: 256 Tests: 15 Failed: 1) Failed test: 8 Non-zero exit status: 1 t/12-good-run-exception.t (Wstat: 256 Tests: 15 Failed: 1) Failed test: 8 Non-zero exit status: 1 Files=10, Tests=200, 35 wallclock secs ( 0.05 usr 0.01 sys + 34.00 cusr 0.34 csys = 34.40 CPU) Result: FAIL Failed 2/10 test programs. 2/200 subtests failed.
Thanks for that. This indicates that the issue is in glibc at intl/dcigettext.c around line 701 which is: /* If the current locale value is C (or POSIX) we don't load a domain. Return the MSGID. */ if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) break; And the undefined memory came from a stack allocation at the start of this function. Which is probably this alloca: single_locale = (char *) alloca (strlen (categoryvalue) + 1); (Which isn't really at the start of the function, but I assume that is where the compiler put it.) It doesn't really make sense that this only triggers on ppc64. So I expect some ppc64 specific instruction memory tracking is going wrong in valgrind/memcheck. As far as I can see single_locale[0] is at least always defined just above this test. As long as categoryvalue was well defined. There were two recent changes to this code, although I don't think either of them should have impacted this code path: commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc Author: Florian Weimer <fweimer> Date: Wed Jun 21 16:31:31 2017 +0200 DCIGETTEXT: Use getcwd, asprintf to construct absolute pathname commit 37e9dc814636915afb88d0779e5e897e90e7b8c0 Author: Florian Weimer <fweimer> Date: Mon Jun 19 14:44:33 2017 +0200 DCIGETTEXT: Do not make copy of localename Florian, I guess I should dig into the ppc64 code and see why memcheck is not accurately tracking this. But since you recently touched this code is there any possibility this code really be an undefined memory usage?
(In reply to Mark Wielaard from comment #5) > Florian, I guess I should dig into the ppc64 code and see why memcheck is > not accurately tracking this. But since you recently touched this code is > there any possibility this code really be an undefined memory usage? The changes are supposed to be no-ops in this regard. My first guess is that due to the strcmp changes for POWER, we now have a dependency on uninitialized bytes due to word-wise memory accesses, but this does not appear in strcmp itself for some reason, only in the caller which looks at the computed result difference.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
Still failing on ppc64: https://koji.fedoraproject.org/koji/taskinfo?taskID=24037045 https://kojipkgs.fedoraproject.org/work/tasks/7045/24037045/build.log
I suspect this is upstream bug https://bugs.kde.org/show_bug.cgi?id=386945
For the moment, I have disabled the optional valgrind test on ppc64 and ppc64le, which has allowed the package to build. I would of course like to re-enable this as soon as valgrind and glibc can sort out their differences on ppc.
(In reply to Paul Howarth from comment #10) > For the moment, I have disabled the optional valgrind test on ppc64 and > ppc64le, which has allowed the package to build. I would of course like to > re-enable this as soon as valgrind and glibc can sort out their differences > on ppc. Sorry this is taking so long. There is some progress on the upstream bug https://bugs.kde.org/show_bug.cgi?id=386945 (Bogus memcheck errors on ppc64(le) when using strcmp() with gcc-7), but it isn't complete yet (it might require a slight change in code generation on the gcc side too). Should we keep this bug open till the upstream bug is resolved and backported to valgrind, or do you like me to create a new bug for that?
I'm fine with keeping this one open myself.
perl-Test-LeakTrace-0.16-11.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2a232d58c7
Build on ppc64le now works on F30 and Rawhide, but still fails on F29 and presumably (haven't tested) F28. The upstream bug is closed but the fix doesn't seem to have made it into older Fedoras.
perl-Test-LeakTrace-0.16-11.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2a232d58c7
perl-Test-LeakTrace-0.16-11.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.