You are not logged in.

#1 2010-06-23 22:02:40

big_gie
Member
Registered: 2005-01-19
Posts: 637

Valgrind and (stripped) glibc

I often use valgrind, but since probably an upgrade it does not work anymore. It gives:

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind: 
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
valgrind: 
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.
valgrind: 
valgrind:  Cannot continue -- exiting now.  Sorry.

Should glibc not be stripped? Anybody else having this issue?

Thanx

Offline

#2 2010-06-23 22:04:21

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Valgrind and (stripped) glibc

try glibc from testing


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-06-23 22:06:36

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Valgrind and (stripped) glibc

Thanx it worked. wink

Offline

#4 2010-07-20 14:08:31

ahoros
Member
Registered: 2010-07-20
Posts: 5

Re: Valgrind and (stripped) glibc

Hi,
I have startup problem

valgrind fails to start:

[borg@aton174 ~]$ valgrind ls


top shows 100% CPU usage:
1389 borg      20   0 14152  320  188 R 99.2  0.1   3:11.07 memcheck-x86-li                                                                                                                                                                 


although version is displayed:
[borg@aton174 ~]$ valgrind --version
valgrind-3.5.0


I have glibc v.:
warning: glibc-2.12-4 is up to date -- reinstalling


Can it be a console problem?

Or the fact I recently upgraded valgrind (& ArchLinux)



I tried reinstalling:
warning: valgrind-3.5.0-6 is up to date -- reinstalling

but it did not help

It seems a bit random because once or twice I was able to start it ok .....

Thanx

Last edited by ahoros (2010-07-20 14:09:16)

Offline

#5 2010-07-20 14:15:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Valgrind and (stripped) glibc

High cpu usage is expected.
It runs fine here

[karol@black ~]$ valgrind ls
==5143== Memcheck, a memory error detector
==5143== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==5143== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==5143== Command: ls
==5143== 
1067615_1257312576.jpg    2v14uug.jpg     attic     fx5i5w.jpg    manyurls      ppd3~          ssc
140ki34.jpg        2vulzir.jpg     backup  jacqkl.jpg    music         qiv-ratings      test
14eaoex.jpg        5106571.jpg     docs     l1           pics         qqq          torrents
2jfkv35.jpg        678whf.jpg     f1     l1~           playlist.txt  rtorrent.mailme  tts.en
2reiko3.jpg        6mon.medium.png  f1~     luatex-cache  ppd3         sp38zn0.jpg      tts.pl
==5143== 
==5143== HEAP SUMMARY:
==5143==     in use at exit: 17,225 bytes in 41 blocks
==5143==   total heap usage: 73 allocs, 32 frees, 52,261 bytes allocated
==5143== 
==5143== LEAK SUMMARY:
==5143==    definitely lost: 0 bytes in 0 blocks
==5143==    indirectly lost: 0 bytes in 0 blocks
==5143==      possibly lost: 0 bytes in 0 blocks
==5143==    still reachable: 17,225 bytes in 41 blocks
==5143==         suppressed: 0 bytes in 0 blocks
==5143== Rerun with --leak-check=full to see details of leaked memory
==5143== 
==5143== For counts of detected and suppressed errors, rerun with: -v
==5143== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 8)

Offline

#6 2010-07-20 14:34:41

ahoros
Member
Registered: 2010-07-20
Posts: 5

Re: Valgrind and (stripped) glibc

wow! that was quick.

Well valgrind is heavy on resources, I know

but in my case it NEVER starts e.g. this screenshot you have printed never shows up - and the 99% CPU usage continues without end


I am at a loss - don't know what to check ?

Last edited by ahoros (2010-07-20 14:38:50)

Offline

#7 2010-07-20 14:38:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Valgrind and (stripped) glibc

What apps weer you checking with it? Maybe if you have tons of files in that directory it will take longer.

Offline

#8 2010-07-20 14:40:26

ahoros
Member
Registered: 2010-07-20
Posts: 5

Re: Valgrind and (stripped) glibc

well - my application is heavy -- but pls note that I am trying to test with something small like:
ls

valgrind is unable to start anything at all

Offline

#9 2010-07-20 14:45:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Valgrind and (stripped) glibc

How many files are there in you directory?

[karol@black ~]$ ls | wc -l
35

I'm using the current glibc and I've just installed valgrind - it just works.
I'm running 32-bit.

Offline

#10 2010-07-20 14:48:48

ahoros
Member
Registered: 2010-07-20
Posts: 5

Re: Valgrind and (stripped) glibc

to clarify nothing -  not even the initial welcome message : ==5143== Memcheck, a memory error detector ==5143== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==5143== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info  -- is displayed



OK that is strange  - on another machine with ArchLinux it starts fine


I have few machines that boot from LAN (from another ArchLinux host machine)
and I used pacman on the host (for both the remote boot and the host itself)
pacman -Su --root /tftpboot/diskless/ --dbpath /tftpboot/diskless/var/lib/pacman valgrind

And on the host machine valgrind works fine
but valgrind fails to on any  of the LAN booting machines (sharing the same kernel and root directory - with individual /home's)

Offline

#11 2010-07-20 14:52:54

ahoros
Member
Registered: 2010-07-20
Posts: 5

Re: Valgrind and (stripped) glibc

hmmm - there is one other  difference between the machines:
I use different login


so I checked and I was able to run valgrind on the said machines as root (!)
but not as the default user 'borg'

Is there something in the environmental variables that need to be set  or changed?


==> does valgrind need root access in archlinux distribution setup?

Last edited by ahoros (2010-07-20 14:55:15)

Offline

#12 2010-07-20 14:53:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Valgrind and (stripped) glibc

> but valgrind fails to on any  of the LAN booting machines (sharing the same kernel and root directory - with individual /home's)
OK, now we're getting somewhere.
But I'm staying here - I don't have the knowledge needed to troubleshoot your case.

Offline

#13 2011-05-12 12:23:03

Vexorum
Member
Registered: 2011-05-12
Posts: 1

Re: Valgrind and (stripped) glibc

Hi guys,

I found this discussion by looking for a similar problem. I've hobby-programmed a simple application and wish to check it for memory leaks using valgrind. Like so:

valgrind --leak-check=full ./server

The application prints logging statements to the terminal. After valgrind's normal start-up lines, 3 lines are printed rightaway, then there is a delay, then a couple more are printed before it freezes. Once again memcheck-x86-li is taking 100% CPU.

The application is a server that does some thread-creating, socket-opening, listening, accepting and of course sending and receiving. It has a matching client counterpart that I also ran through valgrind and it shows the same behavior.

When I run these two programs without valgrind, they open, connect to one another, exchange messages and exit normally within a second. They are not heavy applications.

What is even more peculiar is that I've ran earlier version of them through valgrind hundreds of times without any issues. The code is in C++ and hasn't changed dramatically. (I've refactored out some pointers for references and fixed a couple of memory leaks.)

The version is: valgrind-3.5.0-Debian

What can be done?

Offline

#14 2011-05-12 13:44:53

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Valgrind and (stripped) glibc

Vexorum wrote:

The version is: valgrind-3.5.0-Debian

What can be done?

Ask for help on the Debian forums. Arch currently uses valgrind 3.6.1, and we don't support other distros here.

Offline

Board footer

Powered by FluxBB