32bit app on 64bit os generates lots of system related output

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

32bit app on 64bit os generates lots of system related output

Beaman, Thomas

Hi,

 

I have 64bit and 32bit apps running on my 64bit ppc64 linux 4.1 OS

 

uname -a

Linux  4.1.30-rt34-yocto2.2.1_standard+ #1 SMP PREEMPT Wed Jul 5 04:17:14 EDT 2017 ppc64 GNU/Linux

 

When I run valgrind on a 64bit app it appears to work ok.

 

 

When I switch to running valgrind on a 32bit app I get lots of system related messages (ld-2.24.so, libc-2.24.so, pthread-2.24.so … etc) like these

# export VALGRIND_LIB=/usr/lib/valgrind

 

==14722== Use of uninitialised value of size 4

==14722==    at 0x4004A98: ??? (in /lib/ld-2.24.so)

 

==14722== Use of uninitialised value of size 4

==14722==    at 0xFA2F78C: clock_gettime (in /lib/libc-2.24.so)

 

==14722== Use of uninitialised value of size 4

==14722==    at 0xFEC2A18: ??? (in /lib/libpthread-2.24.so)

 

 

I saw this on valgrind 3.12.0 and upgraded to 3.13.0 and see the same thing.

# valgrind --version

valgrind-3.13.0

 

I have both 64bit and 32bit versions installed

# ls /usr/lib64/valgrind/mem*

/usr/lib64/valgrind/memcheck-ppc64be-linux

 

# ls /usr/lib/valgrind/mem*

/usr/lib/valgrind/memcheck-ppc32-linux

 

As a test I have tried just installing 32bit valgrind and I get the same results.

 

What am I missing to get my 32bit app not to print 100’s of these messages ? What other useful info can I provide ?

 

Thanks,

Tom

 

 

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

Fred Smith-6

Wild guess: Build yourself a 32-bit Valgrind to use for this purpose.

 

Fred Smith

Senior Programmer/Analyst

Computrition, Inc.

175 Middlesex Turnpike

Suite 3C

Bedford, MA

 

From: Beaman, Thomas [mailto:[hidden email]]
Sent: Monday, July 10, 2017 03:25 PM
To: [hidden email]
Subject: [Valgrind-users] 32bit app on 64bit os generates lots of system related output

 

Hi,

 

I have 64bit and 32bit apps running on my 64bit ppc64 linux 4.1 OS

 

uname -a

Linux  4.1.30-rt34-yocto2.2.1_standard+ #1 SMP PREEMPT Wed Jul 5 04:17:14 EDT 2017 ppc64 GNU/Linux

 

When I run valgrind on a 64bit app it appears to work ok.

 

 

When I switch to running valgrind on a 32bit app I get lots of system related messages (ld-2.24.so, libc-2.24.so, pthread-2.24.so … etc) like these

# export VALGRIND_LIB=/usr/lib/valgrind

 

==14722== Use of uninitialised value of size 4

==14722==    at 0x4004A98: ??? (in /lib/ld-2.24.so)

 

==14722== Use of uninitialised value of size 4

==14722==    at 0xFA2F78C: clock_gettime (in /lib/libc-2.24.so)

 

==14722== Use of uninitialised value of size 4

==14722==    at 0xFEC2A18: ??? (in /lib/libpthread-2.24.so)

 

 

I saw this on valgrind 3.12.0 and upgraded to 3.13.0 and see the same thing.

# valgrind --version

valgrind-3.13.0

 

I have both 64bit and 32bit versions installed

# ls /usr/lib64/valgrind/mem*

/usr/lib64/valgrind/memcheck-ppc64be-linux

 

# ls /usr/lib/valgrind/mem*

/usr/lib/valgrind/memcheck-ppc32-linux

 

As a test I have tried just installing 32bit valgrind and I get the same results.

 

What am I missing to get my 32bit app not to print 100’s of these messages ? What other useful info can I provide ?

 

Thanks,

Tom

 

 

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

John Reiser
In reply to this post by Beaman, Thomas
> When I run valgrind on a 64bit app it appears to work ok.
>
> When I switch to running valgrind on a 32bit app I get lots of system related messages (ld-2.24.so, libc-2.24.so, pthread-2.24.so … etc) like these
   [[snip]]
> As a test I have tried just installing 32bit valgrind and I get the same results.
>
> What am I missing to get my 32bit app not to print 100’s of these messages ? What other useful info can I provide ?

1) Check the default suppressions file; something like /usr/lib*/valgrind/default.supp
("strace -o strace.out -e trace=file valgrind /bin/date" to find the exact names).
Make sure it has suppressions for ld-2.24 like on x86_64, such as:
{
    dl-hack3-cond-1
    Memcheck:Cond
    obj:*/lib*/ld-2.24*.so*
    obj:*/lib*/ld-2.24*.so*
    obj:*/lib*/ld-2.24*.so*
}

2) Run with "--trace-origins=yes" to get better clues to what memcheck was thinking,
or where the problem actually started.

3) Install the debuginfo packages for glibc and other system libraries
in order to get more information in tracebacks.  You get line numbers
and source code (!!) to help you understand what's happening.

4) Run under vgdb:  valgrind --vgdb-error=0 --trace-origins=yes /bin/date
and have another terminal window available.  This may seem cumbersome at first,
but you get exquisite control and visibility to what is going on.  Hint:
after initialization, then the first "unscripted" command is:
     (gdb) continue
which can be abbreviated "c".

5) Either under vdbg or plain gdb, examine the instruction stream
that surrounds the pc of the fault:
     (gdb) x/15i $pc-10*4
Try to identify what's going on.

6) There may be only a dozen or so locations (tracebacks) that cause most
of the problems, so generate (and use) suppressions for them.
"valgrind --gen-suppressions=yes ..." and so on.

--

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

John Reiser
In reply to this post by Fred Smith-6
> Wild guess: Build yourself a 32-bit Valgrind to use for this purpose.

The original poster claims to have tried that:
>> As a test I have tried just installing 32bit valgrind and I get the same results.

--

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

John Reiser
In reply to this post by John Reiser
> 2) Run with "--trace-origins=yes" to get better clues to what memcheck was thinking,
> or where the problem actually started.

s/trace-origins/track-origins/
Sorry.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

John Reiser
In reply to this post by John Reiser
> ... What other useful info can I provide ?

7) Find or construct the smallest program which triggers an unwanted complaint.
Identify it (such as /bin/date, /bin/who, /bin/ls, etc.), or post its source code, here.
Somebody else might be able to reproduce your experience, or figure out what the problem is.

--

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 32bit app on 64bit os generates lots of system related output

Beaman, Thomas
In reply to this post by John Reiser
Hi John,

Thank you for all the useful advice.

My first test was to just run on a simple 32bit hello world file, and it generated the same type of warnings.

I had previously checked the 64bit and 32bit default.supp files existed and were identical. But from your ideas, I did notice that the errors I am getting did not fall under any of the rules in the default.supp file.  Another source on suppression files (https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto )   lead me to do this.

valgrind --gen-suppressions=all --log-file=min.log

and running this file through the grindmerge script, I was able to add a number of new rules. This allowed my helloworld file to run without warnings, and now I will go back to testing with my application.

Thank you for all your help on this,
Tom


>> When I run valgrind on a 64bit app it appears to work ok.
>>
>> When I switch to running valgrind on a 32bit app I get lots of system
>> related messages (ld-2.24.so, libc-2.24.so, pthread-2.24.so ... etc)
>> like these
>   [[snip]]
>> As a test I have tried just installing 32bit valgrind and I get the same results.
>>
>> What am I missing to get my 32bit app not to print 100's of these messages ? What other useful info can I provide ?

> 1) Check the default suppressions file; something like /usr/lib*/valgrind/default.supp ("strace -o strace.out -e trace=file valgrind /bin/date" to find the exact names).
> Make sure it has suppressions for ld-2.24 like on x86_64, such as:
> {
>    dl-hack3-cond-1
>    Memcheck:Cond
>    obj:*/lib*/ld-2.24*.so*
>    obj:*/lib*/ld-2.24*.so*
>    obj:*/lib*/ld-2.24*.so*
> }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Loading...