FFe: update valgrind to 2.5.0 to fix many errors with glibc 2.10 on x86_64

Bug #423485 reported by Brandon Mitchell
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
valgrind (Ubuntu)
Fix Released
Undecided
Kees Cook
Karmic
Fix Released
Undecided
Kees Cook

Bug Description

Binary package hint: valgrind

Steps to reproduce:
1. Install libc6 >= 2.10
2. valgrind /bin/echo hello

Problem was also reported here:
http://article.gmane.org/gmane.linux.mandriva.bugs/119221

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

$ apt-cache policy valgrind
valgrind:
  Installed: 1:3.4.1-1ubuntu1
  Candidate: 1:3.4.1-1ubuntu1
  Version table:
 *** 1:3.4.1-1ubuntu1 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy libc6
libc6:
  Installed: 2.10.1-0ubuntu8
  Candidate: 2.10.1-0ubuntu8
  Version table:
 *** 2.10.1-0ubuntu8 0
        100 /var/lib/dpkg/status
     2.9-4ubuntu6 0
        500 http://us.archive.ubuntu.com jaunty/main Packages

Related branches

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

This bug was fixed in the package valgrind - 1:3.4.1-1ubuntu2

---------------
valgrind (1:3.4.1-1ubuntu2) karmic; urgency=low

  * Rebuild to include suppressions for libc6 2.10.x (LP: #423485).

 -- Colin Watson <email address hidden> Fri, 04 Sep 2009 15:12:18 +0100

Changed in valgrind (Ubuntu):
status: New → Fix Released
Colin Watson (cjwatson)
Changed in valgrind (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: Fix Released → New
status: New → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This doesn't seem to be fixed in 1:3.4.1-1ubuntu2. /usr/lib/valgrind/default.supp appears to have suppressions in it:
# Errors to suppress by default with glibc 2.10.x

but the following on amd64 on Karmic is very noisy:
$ valgrind /bin/echo hello

Changed in valgrind (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 423485] Re: Valgrind needs to be recompiled for glibc 2.10

i386 works fine; I don't have an amd64 to hand right now. Could somebody
investigate?

Revision history for this message
Brandon Mitchell (bmitch3020-web) wrote : Re: Valgrind needs to be recompiled for glibc 2.10

Thank you Colin. This is working well on my i386 system.

Revision history for this message
Kees Cook (kees) wrote :

Also confirming it's broken on amd64 for me:
==26252== ERROR SUMMARY: 5434 errors from 299 contexts (suppressed: 1156 from 2)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I can say that just the added suppressions was not enough. Upstream seems to have settled on a strlen redirection in r10689 that may fix this. From svn:
r10689 | sewardj | 2009-08-02 07:21:31 -0500 (Sun, 02 Aug 2009) | 14 lines

Reinstating a heavily modified version of r10402. This is to do
with #190429.

This patch (originally from Jakub Jelinek) makes the redir of strlen
in ld.so on amd64-linux ld.so mandatory, but only for glibc 2.10 and
above. For glibc-2.2 (our earliest supported version) to glibc-2.9
it is still optional.

Also, makes more verbose, the message that is printed if a mandatory
ld.so redirection on Linux cannot be set up.

Is believed to fix #190429.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I ran out of time to look at r10689 closely. I can say that it does not apply cleanly to our version of valgrind. I won't have time to look at this until next week, so if anyone else wants to grab it, go for it.

Changed in valgrind (Ubuntu):
status: Confirmed → Triaged
summary: - Valgrind needs to be recompiled for glibc 2.10
+ many errors with glibc 2.10 on x86_64
Revision history for this message
Martin Olsson (mnemo) wrote : Re: many errors with glibc 2.10 on x86_64

It would be incredibly useful to have this fixed for the "beta to final" bugfixing phase.

Revision history for this message
Michael Kuhn (suraia) wrote :

Just FYI: Upgrading to Debian's 3.5.0-1 package (+ Ubuntu patches) and installing libc6-dbg fixes this problem.

Revision history for this message
Martin Olsson (mnemo) wrote :

I applied "valgrind-3.4.1-x86_64-ldso-strlen.patch" ( http://bugsfiles.kde.org/attachment.cgi?id=33034 ) to the karmic's valgrind and the errors went away. However, if I uninstall libc6-dbgsym valgrind becomes totally broken (because it fails to find strlen in ld.so), basically just what Nicholas Nethercote explained in the upstream bug: http://bugs.kde.org/show_bug.cgi?id=190429

So this patch is not good for Ubuntu as-is (I wonder if that bug also happens in Fedora 11 because they seem to carry exactly that patch, maybe they have libc6-dbg listed as an explicit dependency of their valgrind package or something though?).

It seems that valgrind devs recommend not stripping ld.so or adding libc6-dbg as a dependency of the valgrind package. For details see the file README_PACKAGERS inside the valgrind package.

Revision history for this message
Martin Olsson (mnemo) wrote :

I also tried the upstream patch that Julian Seward added to valgrind svn as r10689. Hunk #11 in this patch fails to apply but it's an irrelevant "coding style" change for darwin/mac code anyway so I think it can be ignored. The problem though is that the upstream patch also gives me the error "Fatal error at startup: a function redirection which is mandatory for this platform-tool combination cannot be set up" so this patch is also not good enough to be applied as-is.

On Jaunty I can run "valgrind true" with zero errors even if I have libc6-dbg uninstalled.

Kees Cook (kees)
Changed in valgrind (Ubuntu Karmic):
assignee: Colin Watson (cjwatson) → Kees Cook (kees)
milestone: none → ubuntu-9.10
summary: - many errors with glibc 2.10 on x86_64
+ FFe: update valgrind to 2.5.0 to fix many errors with glibc 2.10 on
+ x86_64
Revision history for this message
Kees Cook (kees) wrote :

It looks like 3.5.0 with libc-dbg as a dep fixes everything. I would like to propose a FFe to get this merged, since as-is it is a regression against jaunty, and the changes are limited to a single binary package.

Revision history for this message
Steve Langasek (vorlon) wrote :

FFe granted.

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

This bug was fixed in the package valgrind - 1:3.5.0-2ubuntu1

---------------
valgrind (1:3.5.0-2ubuntu1) karmic; urgency=low

  * Merge from debian unstable, remaining changes:
    - Refresh 91_build_with_fno_stack_protector.dpatch.
    - Add lpia to Architecture.
  * Move libc6-dbg to Recommends (LP: #423485).

valgrind (1:3.5.0-2) unstable; urgency=low

  * debian/control:
    - Added libc6-dev-i386 to build-dependencies on amd64.
      May reopen #507752 but closes: #548067.

valgrind (1:3.5.0-1) unstable; urgency=low

  * New upstream version. (Closes: #545700)
  * debian/patches/02_version:
    - Updated to fit this new version (Thanks to Andreas Beckmann)
  * debian/patches/01_pcm-ioctl.patch:
    - Updated
  * debian/patches/01_more-vg-n-threads.dpatch:
    - Added to increas VG_N_THREADS to 500. (Closes: #514133)
  * debian/docs:
    - ACKNOWLEDGEMENTS file is gone
  * debian/watch:
    - Added (Again, thanks to Andreas Beckmann)
  * debian/control:
    - Removed Uploaders field (Closes: #519380, #540834)
  * debian/valgrind.bash:
    - Provides a first bash completion script for valgrind. (Closes: #539137)
      Thanks to Jerome Reybert
  * debian/debian.supp:
    - Updated to fit Debian's libc6 2.10.x

 -- Kees Cook <email address hidden> Fri, 02 Oct 2009 15:51:36 -0700

Changed in valgrind (Ubuntu Karmic):
status: Triaged → Fix Released
Revision history for this message
Martin Olsson (mnemo) wrote :

Thanks Kees, I really appreciate this fix! Karmic is going to be sweet.

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.