SliTaz SliTaz Forum

You are not logged in.

#1 2014-03-18 17:50:09

Mr Hyde
Member
Registered: 2014-03-18
Posts: 1

Valgrind fatal error on Slitaz

I've installed valgrind-3.9.0 on linux Slitaz-2.6.37 (32bit) booted on virtualbox but when i try to use it on a C program (any a.out file), i encounter this error:

==29012== Memcheck, a memory error detector

==29012== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Sewrd

==29012== Using Valgrnd-3.9.0 and LibVEX; rerun with -h for copyright info

==29012== Command: a.out

==29012==

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.so.2

valgrind: was not found whilst processing

valgrind: symbols from the object with soname: ld-linux.so.2

valgrind:

valgrind: Possible fixes: (1, short term): install glibc's debuginfo

valgrind: package on this machine. (2, long 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 standards

valgrind: calling conventions for this platform. The package you need

valgrind: to intall for fix (1) is called

valgrind:

valgrind:   On Debian, Ubuntu:         libc6-dbg

valgrind:   On SuSe, openSuSe, Fedora, RHEL:   glibc-debuginfo

I'm fairly new to Linux and Valgrind but it seems that i need a specific package. This error does not report after which name the package is labeled on my distro (Slitaz). Slitaz does not have the apt-get command nor it's in my intensions to install it (if possible).

I tried to use, with superuser privileges, the command "tazpkg get-install " with any possible combination of libc6-dbg and glibc... I' ve already searched for a solution on the web without any result. Thanks for your time and attention

Offline

#2 2014-06-23 18:50:04

masskonfuzion
Member
Registered: 2014-06-23
Posts: 7

Re: Valgrind fatal error on Slitaz

Hey Mr. Hyde,

I ran into the exact same issue that you did.  I also saw your post at Stack Exchange.  Any luck finding a solution?

I tried to take matters into my own hands, and I royally hosed my system trying to build glibc-2.19 from source (as described here:  http://forum.slitaz.org/topic/broken-slitaz-40-bootinit-caused-by-faulty-glibc-or-coreutils-kernel-2637-cooking).

But I'm curious to find out what you've learned.

Offline

#3 2014-06-24 16:51:33

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: Valgrind fatal error on Slitaz

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.

tux@slitaz:~$ file /lib/ld-2.14.1.so

/lib/ld-2.14.1.so: ELF 32-bit LSB  shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

tux@slitaz:~$

Offline

#4 2014-06-27 05:56:33

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: Valgrind fatal error on Slitaz

ship a non-stripped ld.so (or whatever the dynamic linker .so is called)

ld-2.14.1.so - not stripped

http://goo.gl/5XujLi

tux@slitaz:~$ ls -l /lib/ld*

-rwxr-xr-x    1 root     root        682804 Jun 25 11:18 /lib/ld-2.14.1.so

-rwxr-xr-x    1 root     root        134308 Jun 25 11:17 /lib/ld-2.14.1.so-orig

lrwxrwxrwx    1 root     root            12 Jun 25 10:55 /lib/ld-linux.so.2 -> ld-2.14.1.so

tux@slitaz:~$ file /lib/ld-2.14.1.so

/lib/ld-2.14.1.so: ELF 32-bit LSB  shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

tux@slitaz:~$ valgrind --leak-check=full ./test.a

==2218== Memcheck, a memory error detector

==2218== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.

==2218== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info

==2218== Command: ./test.a

==2218==

==2218==

==2218== HEAP SUMMARY:

==2218==     in use at exit: 0 bytes in 0 blocks

==2218==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated

==2218==

==2218== All heap blocks were freed -- no leaks are possible

==2218==

==2218== For counts of detected and suppressed errors, rerun with: -v

==2218== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 6)

Offline

#5 2014-06-27 06:33:56

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: Valgrind fatal error on Slitaz

7. README_PACKAGERS

http://valgrind.org/docs/manual/dist.readme-packagers.html

-- Do not ship your Linux distro with a completely stripped /lib/ld.so. At least leave the debugging symbol names on -- line number info isn't necessary.

-- Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so in the installation tree.

-- Don't strip symbols from lib/valgrind/* in the installation tree.

-- Please test the final installation works by running it on something huge.

Offline

#6 2014-12-20 07:11:25

new_u
Member
Registered: 2014-03-30
Posts: 93

Re: Valgrind fatal error on Slitaz

I've run into the same problem. I downloaded ld-2.14.1.so from alanyih and changed ld-linux.so.2 so that it pointed to the new library...and my system stopped booting.

ld-linux.so.2 originally pointed to ld-2.13.so.  I thought I could replace that with a 2.14 library but seems not....

Any advice? Should I (somehow) try recompiling ld-2.13.so with debug info?

Offline

#7 2014-12-20 16:32:56

alanyih
Administrator
Registered: 2011-04-02
Posts: 532

Re: Valgrind fatal error on Slitaz

@new_u

Sorry!

You are right.

slitaz-2.6.37 should be use ld-2.13.so

Please try docker ( boot2docker.iso )

SliTaz Docker support

http://forum.slitaz.org/topic/slitaz-docker-support#post-35008

Offline

#8 2014-12-20 18:56:31

new_u
Member
Registered: 2014-03-30
Posts: 93

Re: Valgrind fatal error on Slitaz

Thank for the reply alanyih! I'm not sure how docker is related to the stripped ld issue though?

Offline

#9 2014-12-21 07:30:15

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Valgrind fatal error on Slitaz

wget http://people.slitaz.org/~mojo/stuff/ld-2.13.so

md5sum  glibc/install/lib/ld-2.13.so

273e4a455606fa9265e6dacc3d0ea6b1  glibc/install/lib/ld-2.13.so

file glibc/install/lib/ld-2.13.so

glibc/install/lib/ld-2.13.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

Offline

#10 2014-12-21 08:02:30

new_u
Member
Registered: 2014-03-30
Posts: 93

Re: Valgrind fatal error on Slitaz

Thanks Mojo!!! Much appreciated smile

Offline

#11 2014-12-21 08:28:32

new_u
Member
Registered: 2014-03-30
Posts: 93

Re: Valgrind fatal error on Slitaz

Well...I thought this time it would work but if I use the new library Slitaz doesn't boot.

I renamed the original library to ld-2.13.so__ and copied the new library to /lib. That should be it?

(the hash of my downloaded file is OK)

Offline

#12 2014-12-21 11:19:00

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Valgrind fatal error on Slitaz

Slitaz-4.0 full install

Rename existing ld-2.13.so to ld-2.13.so~

wget http://people.slitaz.org/~mojo/stuff/ld-2.13.so

ls -l /lib/ld-2.13.so <=verify permissions 755 root:root

ls -l /lib/ld-linux.so.2 <=verify symlink to /lib/ld-2.13.so

ldconfig <=updates cache

Boots OK.

Offline

#13 2014-12-21 20:11:29

new_u
Member
Registered: 2014-03-30
Posts: 93

Re: Valgrind fatal error on Slitaz

Thanks again Mojo! I feel so stupid. The permissions and owner/group were wrong. NOW valgrind works smile

(Maybe ld-2.14 also works on Slitaz 4.0)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]