Valgrind command valgrind /bin/true shows error

Bug #1556765 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Undecided
Unassigned
Valgrind
Fix Released
Medium
valgrind (Ubuntu)
Fix Released
Undecided
Skipper Bug Screeners

Bug Description

Problem Description
=============================
Linux s83lp18 4.4.0-8-generic #23-Ubuntu SMP Wed Feb 24 20:46:00 UTC 2016 s390x s390x s390x GNU/Linux
root@s83lp18:~#

testing valgrind &sbin/true
see the following output
oot@s83lp18:~# valgrind -v /bin/true
==17675== Memcheck, a memory error detector
==17675== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==17675== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==17675== Command: /bin/true
==17675==
--17675-- Valgrind options:
--17675-- -v
--17675-- Contents of /proc/version:
--17675-- Linux version 4.4.0-8-generic (buildd@z13-012) (gcc version 5.3.1 20160222 (Ubuntu 5.3.1-9ubuntu3) ) #23-Ubuntu SMP Wed Feb 24 20:46:00 UTC 2016
--17675--
--17675-- Arch and hwcaps: S390X, BigEndian, s390x-ldisp-eimm-gie-dfp-fgx-stfle-etf2-etf3-stckf-fpext-lsc-pfpo
--17675-- Page sizes: currently 4096, max supported 4096
--17675-- Valgrind library directory: /usr/lib/valgrind
--17675-- Reading syms from /bin/true
--17675-- object doesn't have a symbol table
--17675-- Reading syms from /lib/s390x-linux-gnu/ld-2.21.so
--17675-- Considering /lib/s390x-linux-gnu/ld-2.21.so ..
--17675-- .. CRC mismatch (computed 99d02d14 wanted 6c51b780)
--17675-- Considering /usr/lib/debug/lib/s390x-linux-gnu/ld-2.21.so ..
--17675-- .. CRC is valid
--17675-- Reading syms from /usr/lib/valgrind/memcheck-s390x-linux
--17675-- Considering /usr/lib/valgrind/memcheck-s390x-linux ..
--17675-- .. CRC mismatch (computed 3155372b wanted dc3e5eba)
--17675-- object doesn't have a symbol table
--17675-- object doesn't have a dynamic symbol table
--17675-- Scheduler: using generic scheduler lock implementation.
--17675-- Reading suppressions file: /usr/lib/valgrind/default.supp
==17675== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-17675-by-root-on-???
==17675== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-17675-by-root-on-???
==17675== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-17675-by-root-on-???
==17675==
==17675== TO CONTROL THIS PROCESS USING vgdb (which you probably
==17675== don't want to do, unless you know exactly what you're doing,
==17675== or are doing some strange experiment):
==17675== /usr/lib/valgrind/../../bin/vgdb --pid=17675 ...command...
==17675==
==17675== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==17675== /path/to/gdb /bin/true
==17675== and then give GDB the following command
==17675== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=17675
==17675== --pid is optional if only one valgrind process is running
==17675==
--17675-- REDIR: 0x401cbf0 (ld64.so.1:index) redirected to 0x80005cca2 (???)
--17675-- Reading syms from /usr/lib/valgrind/vgpreload_core-s390x-linux.so
--17675-- Considering /usr/lib/valgrind/vgpreload_core-s390x-linux.so ..
--17675-- .. CRC mismatch (computed a1d0e18d wanted dbd7ebd0)
--17675-- object doesn't have a symbol table
--17675-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-s390x-linux.so
--17675-- Considering /usr/lib/valgrind/vgpreload_memcheck-s390x-linux.so ..
--17675-- .. CRC mismatch (computed 7d9de5b1 wanted eb7591b6)
--17675-- object doesn't have a symbol table
--17675-- Reading syms from /lib/s390x-linux-gnu/libc-2.21.so
--17675-- Considering /lib/s390x-linux-gnu/libc-2.21.so ..
--17675-- .. CRC mismatch (computed 231040c9 wanted f909c225)
--17675-- Considering /usr/lib/debug/lib/s390x-linux-gnu/libc-2.21.so ..
--17675-- .. CRC is valid
--17675-- REDIR: 0x48ed788 (libc.so.6:memcpy) redirected to 0x4830760 (_vgnU_ifunc_wrapper)
==17675== Invalid read of size 8
==17675== at 0x483670A: ??? (in /usr/lib/valgrind/vgpreload_memcheck-s390x-linux.so)
==17675== by 0x40125A9: call_init.part.0 (dl-init.c:72)
==17675== by 0x401279B: call_init (dl-init.c:104)
==17675== by 0x401279B: _dl_init (dl-init.c:87)
==17675== by 0x400106B: ??? (in /lib/s390x-linux-gnu/ld-2.21.so)
==17675== Address 0xfff0003a0 is on thread 1's stack
==17675== 56 bytes below stack pointer
==17675==
--17675-- REDIR: 0x48e2ed8 (libc.so.6:rindex) redirected to 0x4839d08 (rindex)
--17675-- REDIR: 0x48de1c0 (libc.so.6:free) redirected to 0x4837ee0 (free)
==17675==
==17675== HEAP SUMMARY:
==17675== in use at exit: 0 bytes in 0 blocks
==17675== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==17675==
==17675== All heap blocks were freed -- no leaks are possible
==17675==
==17675== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==17675==
==17675== 1 errors in context 1 of 1:
==17675== Invalid read of size 8
==17675== at 0x483670A: ??? (in /usr/lib/valgrind/vgpreload_memcheck-s390x-linux.so)
==17675== by 0x40125A9: call_init.part.0 (dl-init.c:72)
==17675== by 0x401279B: call_init (dl-init.c:104)
==17675== by 0x401279B: _dl_init (dl-init.c:87)
==17675== by 0x400106B: ??? (in /lib/s390x-linux-gnu/ld-2.21.so)
==17675== Address 0xfff0003a0 is on thread 1's stack
==17675== 56 bytes below stack pointer

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-138802 severity-high targetmilestone-inin1604
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1556765/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
vaishnavi (vaishnavi)
affects: ubuntu → valgrind (Ubuntu)
Revision history for this message
In , Arnez (arnez) wrote :

Something like this may be seen with a binary compiled for zEC12 (or higher):
  vex s390->IR: unimplemented insn: EC12 2021 1E59
This is because Valgrind currently doesn't implement the RISBGN instruction.

Note that RISBGN has the same effect as RISBG, except that it doesn't set the condition code.

Reproducible: Always

Revision history for this message
In , Arnez (arnez) wrote :

Created attachment 98188
Support RISBGN

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package valgrind - 1:3.11.0-1ubuntu3

---------------
valgrind (1:3.11.0-1ubuntu3) xenial; urgency=medium

  * Fixes for s390x, LP: #1563420:
    - 15_s390x-HWCAP-mask.patch: Suppress advertising features
      in HWCAP that are unsupported by valgrind.
    - 16_s390x_popcnt-insn.patch: Add support for popcnt instruction.
    - 17_s390x-splitout-socketcalls.patch: Support individual socket
      syscalls, which were split out from socketcall in Linux 4.3.
  * 18_s390x-support-RISBGN-insn.patch: Fix issue with binaries
    compiled for zEC12 or higher, such as Ubuntu's dynamic loader.
    LP: #1556765.
  * Add smoke test for autopkgtest.

 -- dann frazier <email address hidden> Fri, 01 Apr 2016 19:16:07 +0000

Changed in valgrind (Ubuntu):
status: New → Fix Released
Changed in valgrind:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Arnez (arnez) wrote :

(In reply to Andreas Arnez from comment #1)
> Created attachment 98188 [details]
> Support RISBGN

Is this OK?

Revision history for this message
In , Christian Borntraeger (borntraeger) wrote :

tested and reviewed.
applied as 3216:15852

bugproxy (bugproxy)
tags: added: targetmilestone-inin16041
removed: targetmilestone-inin1604
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-04-20 09:02 EDT-------
The issue reported in this bug is that Valgrind always diagnoses an invalid read below the stack pointer, even for a program that basically does nothing (like /bin/true). That read operation is actually performed by Valgrind itself at initialization time. This is a real bug in the Valgrind binary, but it is caused by a miscompile due to a GCC bug. That bug must be fixed first, and Valgrind must then be rebuilt in order for this bug to be fixed.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@arnez this bug report is about missing / unknown instructions in valgrind package on ubuntu, which has been fixed. Please open a new bug report and mirror it across for the gcc+valgrind miscompile.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-04-20 11:07 EDT-------
> @arnez this bug report is about missing / unknown instructions in valgrind
> package on ubuntu, which has been fixed. Please open a new bug report and
> mirror it across for the gcc+valgrind miscompile.

Hm, that seems like a misunderstanding to me. When talking about "missing/unknown instructions in valgrind", maybe you refer to LP: #1563420 ("valgrind: Backport Valgrind patches for s390 to Ubuntu 16.04") and maybe LP: #1569391 (popcnt (B9E1) support incomplete)? Or are there any other Valgrind fixes that I'm not aware of?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@arnez not sure now.

So this bug report is now closed. Please do not reopen it. It should be closed on the bugzilla / your side too.

The fact that valgrind is mis-compiled is now https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1572613 which has tasks for gcc (x2 versions) and valgrind, across two series - 16.10 and 16.04.1 => 6 tasks / uploads in total.

Regards,

Dimitri.

dann frazier (dannf)
Changed in ubuntu-z-systems:
status: New → Fix Released
Changed in valgrind:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.