Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-25 Thread Matthias Apitz

I was lucky and catched the situation again and could attach a GDB to the
running process. It's a bit complicated because the software is a
running server with ~10 children which server altogether a web application via 
tomcat
and you do not know when you fire up a search in the browser, which
process will serve this. Anyway, here it is:


==17753== Conditional jump or move depends on uninitialised value(s)
==17753==at 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215)
==17753==by 0x8B8069C: SRVCatSearchMedia (SRVCatSearchMedia.c:579)
==17753==by 0x74D3683: SlnpRunModule (SLNPInterpreter.c:567)
==17753==by 0x74D31C7: SlnpInterpreter (SLNPInterpreter.c:287)
==17753==by 0x414543: SlnpMainLoop (OPServer.c:874)
==17753==by 0x413ED3: OPServer (OPServer.c:258)
==17753==by 0x413792: main (OPDaemon.c:407)
==17753==  Uninitialised value was created by a stack allocation
==17753==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
==17753==
srap22dxr1:/home/sisis/guru # gdb /opt/lib/sisis/opserver/bin/OPServer 17753
...
(gdb) info line *0x8B43AF0
No line number information available for address 0x8b43af0 


I did an 'objdump -S /home/sisis/guru/libcopz39.so > libcopz39.so' of the 
shared lib and the first
function in this is CatAdmCatClass(); setting a bt there shows:

(gdb) br CatAdmCatClass
Breakpoint 8 at 0x8b44ea9: file CATAdmCat.c, line 133.
(gdb) list CatAdmCatClass
127 static int   AdmCatSetBool(CatAdmCatValue, CatJaNein);
128 static int   AdmCatSetString(CatAdmCatValue, char *);
129 static int   AdmCatSetInt(CatAdmCatValue, int);
130
131 t_adm_cat *CatAdmCatClass()
132 {
133  return _adm_cat;
134 }
135
136 void CatAdmCatInitFlag(CatBool is_set)
(gdb) info line *0x8b44ea9
Line 133 of "CATAdmCat.c" starts at address 0x8b44ea9  and 
ends at 0x8b44eb0 .

i.e. the addr shown by valgrind 0x8B43AF0 has really no code in 
/home/sisis/guru/libcopz39.so.

Also a hex dump underpins this:

(gdb) x/2000x 0x8B43AF0
0x8b43af0 : 0x6c7225ff  0xea680025  
0xe900  0xf140
0x8b43b00 :  0x6c6a25ff  0xeb680025  
0xe900  0xf130
0x8b43b10 :   0x6c6225ff  0xec680025  
0xe900  0xf120
0x8b43b20 :0x6c5a25ff  0xed680025  
0xe900  0xf110
0x8b43b30 :  0x6c5225ff  0xee680025  0xe900  
0xf100
0x8b43b40 : 0x6c4a25ff  0xef680025  
0xe900  0xf0f0
0x8b43b50 :0x6c4225ff  0xf0680025  
0xe900  0xf0e0
0x8b43b60 :  0x6c3a25ff  0xf1680025  
0xe900  0xf0d0
0x8b43b70 :   0x6c3225ff  0xf2680025  0xe900  
0xf0c0
0x8b43b80 :0x6c2a25ff  0xf3680025  
0xe900  0xf0b0
0x8b43b90 :0x6c2225ff  0xf4680025  
0xe900  0xf0a0
0x8b43ba0 :0x6c1a25ff  0xf5680025  0xe900  
0xf090
0x8b43bb0 :  0x6c1225ff  0xf6680025  
0xe900  0xf080
0x8b43bc0 :  0x6c0a25ff  
0xf7680025  0xe900  0xf070
0x8b43bd0 :0x6c0225ff  0xf8680025  0xe900  
0xf060
0x8b43be0 : 0x6bfa25ff  0xf9680025  0xe900  
0xf050
0x8b43bf0 :   0x6bf225ff  0xfa680025  0xe900  
0xf040
0x8b43c00 :   0x6bea25ff  0xfb680025  
0xe900  0xf030
0x8b43c10 :  0x6be225ff  0xfc680025  
0xe900  0xf020
0x8b43c20 :0x6bda25ff  0xfd680025  0xe900  
0xf010
0x8b43c30 : 0x6bd225ff  0xfe680025  0xe900  
0xf000
0x8b43c40 : 0x6bca25ff  0xff680025  
0xe900  0xeff0
0x8b43c50 :0x6bc225ff  0x00680025  
0xe901  0xefe0
0x8b43c60 :0x6bba25ff  0x01680025  
0xe901  0xefd0
0x8b43c70 : 0x6bb225ff  0x02680025  0xe901  
0xefc0

...
0x8b44d60 :  0x633a25ff  0x11680025  0xe902  
0xded0
0x8b44d70 :  0x633225ff  0x12680025  
0xe902  0xdec0
0x8b44d80 : 0x632a25ff  0x13680025  0xe902  
0xdeb0
0x8b44d90 : 0x632225ff  0x14680025  
0xe902  0xdea0
0x8b44da0 :   0x631a25ff  0x15680025  
0xe902  0xde90
0x8b44db0 <__gmon_start__@plt>: 0x512225ff  0x90660025  0x521225ff  
0x90660025
0x8b44dc0 :   0x60058d48  0x480025a6  
0xa6523d8d  0x48550025
0x8b44dd0 :0x8948f829  0xf88348e5  
0x5d02770e  0x058b48c3
0x8b44de0 :0x0025503c  0x74c08548  
0xe0ff5df2  0x00401f0f
0x8b44df0 : 0x29058d48  0x480025a6  0xa6223d8d  
0x48550025
0x8b44e00 :  0x8948f829  0xf8c148e5  
0xc2894803  0x3feac148
0x8b44e10 :  0x48d00148  0x0275f8d1  
0x8b48c35d  0x25517f15
0x8b44e20 :  0xd2854800  0x485df274  
0xe2ffc689  0x00401f0f
0x8b44e30 <__do_global_dtors_aux>:  0xa5e93d80  0x7525  
0x3d834827 

Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-23 Thread Philippe Waroquiers
On Fri, 2019-03-22 at 10:21 +0100, Matthias Apitz wrote:
> El día Thursday, March 21, 2019 a las 10:44:54PM +0100, Philippe Waroquiers 
> escribió:
> 
> > On Thu, 2019-03-21 at 20:00 +0100, Matthias Apitz wrote:
> > > Hello,
> > > 
> > > Why are only the '???' marks printed for the localtion of the stack
> > > allocation? This is with 3.18.0 on Linux x64:
> > 
> > 3.18.0 ?
> > Last release is 3.14.
> 
> Yep. Sorry, this was a typo. I have 3.14.0, compiled by my own on SuSE
> Linux SLES 12.
> 
> > > ==24390== Conditional jump or move depends on uninitialised value(s)
> > > ==24390==at 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215)
> > > ==24390==by 0x8B8069C: SRVCatSearchMedia (SRVCatSearchMedia.c:579)
> > > ==24390==by 0x74D3683: SlnpRunModule (SLNPInterpreter.c:567)
> > > ==24390==by 0x74D31C7: SlnpInterpreter (SLNPInterpreter.c:287)
> > > ==24390==by 0x414543: SlnpMainLoop (OPServer.c:874)
> > > ==24390==by 0x413ED3: OPServer (OPServer.c:258)
> > > ==24390==by 0x413792: main (OPDaemon.c:407)
> > > ==24390==  Uninitialised value was created by a stack allocation
> > > ==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
> > > ==24390==
> > > 
> > > /home/sisis/guru # file libcopz39.so
> > > libcopz39.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
> > > dynamically linked, 
> > > BuildID[sha1]=eb1d460ebb565dedfe48bf5f534d2c097d9ca59c, with debug_info, 
> > > not stripped
> > > 
> > > The *.o files in the shared lib have been compiled with 'gcc -m64 -g ...'
> > 
> > Can you check what file/line nr corresponds to 0x8B43AF0,
> > using another tool (gdb, or whatever) ?
> 
> I have to check how to convert he addr 0x8B43AF0 into a line:

What I am typically doing is the following:
   valgrind --vgdb-error=1 

(assuming that is the first reported error).
Then valgrind will stop and wait for GDB to connect.
Then do the following:
gdb
target remote | vgdb  
info line *0x8B43AF0

When you do that when attached to the running executable, that will
guarantee that the shared lib address translation is done using
the address at which it is currently loaded.

If GDB equally tells that there is no source/line nr, then I guess
that is the best valgrind can do.

Philippe



___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-22 Thread John Reiser

==24390==  Uninitialised value was created by a stack allocation
==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
==24390==



Can you check what file/line nr corresponds to 0x8B43AF0,
using another tool (gdb, or whatever) ?



Looks like this is near to 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215), 
may be in
the same source file.


0x8B43AF0 (identified by valgrind) is somewhat far from
0x8B5DC3A (identified by the poster)
=
  0x1a14a  d9fference

Use:
   (gdb) info shared
Example:
   $ gdb /bin/date
   (gdb) b main
   (gdb) run
   Breakpoint 1, main (argc=0x1, argv=0x7fffd4b8) at ../src/date.c:348
   (gdb) info shared
FromTo  Syms Read   Shared Object Library
0x77dd6f60  0x77df5080  Yes /lib64/ld-linux-x86-64.so.2
0x77a383a0  0x77b7f11f  Yes /lib64/libc.so.6
   (gdb) quit


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-22 Thread Matthias Apitz
El día Thursday, March 21, 2019 a las 10:44:54PM +0100, Philippe Waroquiers 
escribió:

> On Thu, 2019-03-21 at 20:00 +0100, Matthias Apitz wrote:
> > Hello,
> > 
> > Why are only the '???' marks printed for the localtion of the stack
> > allocation? This is with 3.18.0 on Linux x64:
> 3.18.0 ?
> Last release is 3.14.

Yep. Sorry, this was a typo. I have 3.14.0, compiled by my own on SuSE
Linux SLES 12.

> > ==24390== Conditional jump or move depends on uninitialised value(s)
> > ==24390==at 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215)
> > ==24390==by 0x8B8069C: SRVCatSearchMedia (SRVCatSearchMedia.c:579)
> > ==24390==by 0x74D3683: SlnpRunModule (SLNPInterpreter.c:567)
> > ==24390==by 0x74D31C7: SlnpInterpreter (SLNPInterpreter.c:287)
> > ==24390==by 0x414543: SlnpMainLoop (OPServer.c:874)
> > ==24390==by 0x413ED3: OPServer (OPServer.c:258)
> > ==24390==by 0x413792: main (OPDaemon.c:407)
> > ==24390==  Uninitialised value was created by a stack allocation
> > ==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
> > ==24390==
> > 
> > /home/sisis/guru # file libcopz39.so
> > libcopz39.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
> > dynamically linked, BuildID[sha1]=eb1d460ebb565dedfe48bf5f534d2c097d9ca59c, 
> > with debug_info, not stripped
> > 
> > The *.o files in the shared lib have been compiled with 'gcc -m64 -g ...'
> 
> Can you check what file/line nr corresponds to 0x8B43AF0,
> using another tool (gdb, or whatever) ?

I have to check how to convert he addr 0x8B43AF0 into a line:

(gdb) info line *0x8B43AF0
No line number information available for address 0x8b43af0 


I will copy the sources over to the server.

Looks like this is near to 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215), 
may be in
the same source file.

matthias
-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, 
Druschba
instead of Nazis, to live instead of to survive.


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-21 Thread Philippe Waroquiers
On Thu, 2019-03-21 at 20:00 +0100, Matthias Apitz wrote:
> Hello,
> 
> Why are only the '???' marks printed for the localtion of the stack
> allocation? This is with 3.18.0 on Linux x64:
3.18.0 ?
Last release is 3.14.

> 
> ==24390== Conditional jump or move depends on uninitialised value(s)
> ==24390==at 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215)
> ==24390==by 0x8B8069C: SRVCatSearchMedia (SRVCatSearchMedia.c:579)
> ==24390==by 0x74D3683: SlnpRunModule (SLNPInterpreter.c:567)
> ==24390==by 0x74D31C7: SlnpInterpreter (SLNPInterpreter.c:287)
> ==24390==by 0x414543: SlnpMainLoop (OPServer.c:874)
> ==24390==by 0x413ED3: OPServer (OPServer.c:258)
> ==24390==by 0x413792: main (OPDaemon.c:407)
> ==24390==  Uninitialised value was created by a stack allocation
> ==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
> ==24390==
> 
> /home/sisis/guru # file libcopz39.so
> libcopz39.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
> dynamically linked, BuildID[sha1]=eb1d460ebb565dedfe48bf5f534d2c097d9ca59c, 
> with debug_info, not stripped
> 
> The *.o files in the shared lib have been compiled with 'gcc -m64 -g ...'

Can you check what file/line nr corresponds to 0x8B43AF0,
using another tool (gdb, or whatever) ?

Thanks

Philippe




___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


[Valgrind-users] location of stack allocation printed a at 0x8B43AF0: ??? ...

2019-03-21 Thread Matthias Apitz

Hello,

Why are only the '???' marks printed for the localtion of the stack
allocation? This is with 3.18.0 on Linux x64:

==24390== Conditional jump or move depends on uninitialised value(s)
==24390==at 0x8B5DC3A: CatTmFilterExclude (CATTmFilter.c:215)
==24390==by 0x8B8069C: SRVCatSearchMedia (SRVCatSearchMedia.c:579)
==24390==by 0x74D3683: SlnpRunModule (SLNPInterpreter.c:567)
==24390==by 0x74D31C7: SlnpInterpreter (SLNPInterpreter.c:287)
==24390==by 0x414543: SlnpMainLoop (OPServer.c:874)
==24390==by 0x413ED3: OPServer (OPServer.c:258)
==24390==by 0x413792: main (OPDaemon.c:407)
==24390==  Uninitialised value was created by a stack allocation
==24390==at 0x8B43AF0: ??? (in /home/sisis/guru/libcopz39.so)
==24390==

/home/sisis/guru # file libcopz39.so
libcopz39.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
dynamically linked, BuildID[sha1]=eb1d460ebb565dedfe48bf5f534d2c097d9ca59c, 
with debug_info, not stripped

The *.o files in the shared lib have been compiled with 'gcc -m64 -g ...'

Thanks

matthias
-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users