valgrind is generating warnings on /lib/ld-2.3.5.so

Bug #2958 reported by João Pinto
18
Affects Status Importance Assigned to Milestone
Valgrind
Invalid
Undecided
Unassigned
valgrind (Ubuntu)
Fix Released
High
Sebastian Dröge

Bug Description

Valgrind is generating a lot of warnings on /lib/ld-2.3.5.so which makes it hardly usable with the --db-attach=yes option.

See output:
lamego@lamego-ubuntu:/$ /usr/bin/valgrind /bin/ls
==26261== Memcheck, a memory error detector.
==26261== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==26261== Using LibVEX rev 1367, a library for dynamic binary translation.
==26261== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==26261== Using valgrind-3.0.1, a dynamic binary instrumentation framework.
==26261== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==26261== For more details, rerun with: -v
==26261==
==26261== Conditional jump or move depends on uninitialised value(s)
==26261== at 0x1B8F4C7D: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8EA24D: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8E483C: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8EF105: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8E4908: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8E72F0: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8F254A: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8E4CE6: (within /lib/ld-2.3.5.so)
==26261== by 0x1B8E4796: (within /lib/ld-2.3.5.so)
....

Revision history for this message
João Pinto (joaopinto) wrote :

Tested with the upstream valgrind-3.0.1 with the same result...

Revision history for this message
Trent Lloyd (lathiat) wrote :

I think this is caused by this valgrind version being out of sync with our glibc version, as it has an internal list of things to ignore.

Revision history for this message
João Pinto (joaopinto) wrote :

Any plans to update it ? It its not done by someone else I will eventually look on how to complete the ignore list, I use valgrind a lot....

Revision history for this message
Ohad Lutzky (lutzky) wrote :

How is this still unconfirmed?

Revision history for this message
João Pinto (joaopinto) wrote : Error supression fixes

I believe this should be applied on the other independent files. I have applied to the default because I am sure it is reading this one and the included patch did work for the warnings I was able to detect...

Sebastian Dröge (slomo)
Changed in valgrind:
status: Unconfirmed → Confirmed
Revision history for this message
Sebastian Dröge (slomo) wrote :

I'll take care of getting this fixed... thanks for reporting

Changed in valgrind:
assignee: nobody → slomo
Revision history for this message
Sebastian Dröge (slomo) wrote : valgrind_3.1.0-2.1ubuntu1.debdiff

This should be the correct fix for the problem... only waiting for someone to confirm that this fix is correct

Revision history for this message
João Pinto (joaopinto) wrote :

That is a partial fix, it will not catch other warnings relating to dlopen (I have experimentd this with my own application wich uses dlopen for the modules load).
They are very similar to other suppressions already listed for debian (dl_open*), the exact match for both cases was obtained from the warnings I got with ubuntu dapper...

+{
+ Ubuntu_dlopen
+ Memcheck:Cond
+ obj:/lib/ld-2.3.6.so
+ obj:/lib/ld-2.3.6.so
+ obj:/lib/tls/i686/cmov/libc-2.3.6.so
+ obj:/lib/ld-2.3.6.so
+ fun:_dl_open
+ obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+ obj:/lib/ld-2.3.6.so
+ obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+ fun:dlopen
+}
+
+{
+ Ubuntu_dlopen_2
+ Memcheck:Cond
+ obj:/lib/ld-2.3.6.so
+ obj:/lib/tls/i686/cmov/libc-2.3.6.so
+ obj:/lib/ld-2.3.6.so
+ fun:_dl_open
+ obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+ obj:/lib/ld-2.3.6.so
+ obj:/lib/tls/i686/cmov/libdl-2.3.6.so
+ fun:dlopen
+}
+

Revision history for this message
Sebastian Dröge (slomo) wrote :

ok, uploaded my approach after talking with jbailey. please reopen this bug when you really still have this problems and we can talk about your suppression rules again :)
Or do you have a testcase somewhere?

Changed in valgrind:
status: Confirmed → Fix Released
Revision history for this message
Jeff Bailey (jbailey) wrote :

Sebastian's patch updates from the current 2.3.5 to 2.3.6 exceptions. This much is at least obviously correct. What problems does your patch solve that the others don't?

I'd be inclined to upload Sebastian's minimal fix and then try any failing tests you have.

Tks,
Jeff Bailey

Revision history for this message
João Pinto (joaopinto) wrote :

Hi,
I have a test case, please note that my patch did include the fix for it.

Test case with my application
To retrieve you will need subversion.
To compile you will need libmysql dev.
cd /tmp
Proceed as follows:

svn checkout http://opensvn.csie.org/ptservices3
cd ptservices3
./configure --prefix=/tmp/ircsvs
make
make install
valgrind src/ircsvs

You should get the dlopen conditional warnings I have reported.

Thanks

Revision history for this message
João Pinto (joaopinto) wrote :

This bug can be closed since it got a partial fix.
I have addressed remaining problem on bug #39491.

Revision history for this message
João Pinto (joaopinto) wrote :

This was fixed already.

Changed in valgrind:
status: New → Invalid
Revision history for this message
popinet (popinet) wrote : This bug needs to be reopened for Gutsy

The suppression list needs to be updated for the current Gutsy /lib/ld-2.6.1.so. Currently the default suppressions lists seem to stop at glibc-2.5:

% ls /usr/lib/valgrind/*.supp

/usr/lib/valgrind/debian-libc6-dbg.supp /usr/lib/valgrind/glibc-2.4.supp
/usr/lib/valgrind/debian.supp /usr/lib/valgrind/glibc-2.5.supp
/usr/lib/valgrind/default.supp /usr/lib/valgrind/python.supp
/usr/lib/valgrind/glibc-2.2.supp /usr/lib/valgrind/xfree-3.supp
/usr/lib/valgrind/glibc-2.3.supp /usr/lib/valgrind/xfree-4.supp

So I still get valgrind warnings from /lib/ld-2.6.1.so.

% valgrind --version
valgrind-3.2.3-Debian

Ubuntu 7.10 current

cheers

Stephane

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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