Re: Need support in debugging Valgrind 3.18 glibc segv error
kiran hardas <[email protected]> Thu, 30 Jan 2025 01:00:49 +0530
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Message-ID | <CAPyEgmaffx-xH4Dd4X3_GmEC6PCWex2XmfWwVB4jRgj76m=q3Q@mail.gmail.com> |
--===============1614960580342350054== Content-Type: multipart/alternative; boundary="0000000000007d8950062cdd5951" --0000000000007d8950062cdd5951 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes Philippe, I did try out Valgrind 3.24, but it too gave same error. Regards, Kiran H. On Wed, Jan 29, 2025 at 11:56=E2=80=AFPM Philippe Waroquiers < [email protected]> wrote: > The first thing to try is to compile and use a more recent valgrind > version. > (3.18 is something like 4 years old while 3.24 is from Oct 24). > > Thanks > Philippe > > > On Wed, 2025-01-29 at 19:03 +0530, kiran hardas wrote: > > Hi Team, > > > > Good Evening, > > > > I need some support in debugging an issue in Valgrind 3.18. > > > > I have an application which I am trying to check with Valgrind tool for > memory issues. I > > have the valgrind source code which is compiled and built along with my > application > > using same set of libraries. But while checking with valgrind tool i ge= t > an invalid > > address error in libc library (mostly implying null pointer > dereferencing/free) and > > valgrind is terminating. I am unable to find the exact place in glibc > code where this > > error is coming from and need any help which you can provide. > > > > Please find further details below, > > > > $ ./usr/test/bin/valgrind --version -v > > valgrind-3.18.1-42b08ed5bd-20211015 > > > > GNU/Linux 5.4 > > Glibc 2.40 > > gcc 14.2 > > binutils 2.43 > > > > This same valgrind was working when i was using glibc 2.23 but giving > this error when i > > upgraded glibc to 2.40 > > For valgrind 3.18 i have applied rseq patches and nop code error (0x2E > 0x8D 0xB4 0x26) > > patches also required for latest glibc 2.40. > > > > Error log snippet: > > ------------------------ > > ... > > ... > > =3D=3D13089=3D=3D > > --13089-- REDIR: 0x1f749f60 (libc.so.6:???) redirected to 0x1e59bd70 > (strcmp) > > =3D=3D13089=3D=3D Jump to the invalid address stated on the next line > > =3D=3D13089=3D=3D at 0x0: ??? > > =3D=3D13089=3D=3D by 0x1F607366: ??? (in /lib/libc-2.40.so) > > =3D=3D13089=3D=3D by 0x1F607423: (below main) (in /lib/libc-2.40.so) > > =3D=3D13089=3D=3D Address 0x0 is not stack'd, malloc'd or (recently) f= ree'd > > =3D=3D13089=3D=3D > > =3D=3D13089=3D=3D > > =3D=3D13089=3D=3D Process terminating with default action of signal 11 > (SIGSEGV): dumping core > > =3D=3D13089=3D=3D Bad permissions for mapped region at address 0x0 > > =3D=3D13089=3D=3D at 0x0: ??? > > =3D=3D13089=3D=3D by 0x1F607366: ??? (in /lib/libc-2.40.so) > > =3D=3D13089=3D=3D by 0x1F607423: (below main) (in /lib/libc-2.40.so) > > =3D=3D13089=3D=3D > > > > > > Approaches tried > > ----------------------- > > 1. I reduced the optimisation level in glibc to -O1, but still no > further symbol details > > are available > > 2. The core file generated for valgrind crash is also not showing any > symbol details at > > crash point. (only showing ??) > > 3. Tried adding more option to valgrind like --track-origins=3Dyes > , --read-var-info=3Dyes . > > But not giving any more info for the error. > > > > > > I would appreciate any pointers team can provide in debugging this issu= e. > > > > Thanks in advance > > > > Regards, > > Kiran H. > > > > _______________________________________________ > > Valgrind-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > --0000000000007d8950062cdd5951 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Yes Philippe, I did try out Valgrind 3.24, but it too gave= same error.<div><br></div><div>Regards,</div><div>Kiran H.</div></div><br>= <div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"= gmail_attr">On Wed, Jan 29, 2025 at 11:56=E2=80=AFPM Philippe Waroquiers &l= t;<a href=3D"mailto:[email protected]">philippe.waroquiers@skyn= et.be</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex">The first thing to try is to compile and use a more recent valgrind ve= rsion.<br> (3.18 is something like 4 years old while 3.24 is from Oct 24).<br> <br> Thanks<br> Philippe<br> <br> <br> On Wed, 2025-01-29 at 19:03 +0530, kiran hardas wrote:<br> > Hi Team,<br> > <br> > Good Evening,<br> > <br> > I need some support in debugging an issue in Valgrind 3.18.=C2=A0<br> > <br> > I have an application which I am trying to check with Valgrind tool fo= r memory issues. I<br> > have the valgrind source code which is compiled and built along with m= y application<br> > using same=C2=A0set of libraries. But while checking with valgrind too= l i get an=C2=A0invalid<br> > address error in libc library (mostly implying null pointer dereferenc= ing/free) and<br> > valgrind is terminating. I am unable to find the exact place in glibc = code where this<br> > error is coming from and need any help which you can provide.<br> > <br> > Please find further=C2=A0details below,<br> > <br> > $ ./usr/test/bin/valgrind --version -v<br> > valgrind-3.18.1-42b08ed5bd-20211015<br> > <br> > GNU/Linux 5.4<br> > Glibc 2.40<br> > gcc 14.2<br> > binutils 2.43<br> > <br> > This same valgrind was working when i was using glibc 2.23 but giving = this error when i<br> > upgraded glibc to 2.40<br> > For valgrind 3.18 i have=C2=A0applied rseq patches and nop code error = (0x2E 0x8D 0xB4 0x26)<br> > patches also required for latest glibc 2.40.<br> > <br> > Error log snippet:<br> > ------------------------<br> > ...<br> > ...<br> > =3D=3D13089=3D=3D<br> > --13089-- REDIR: 0x1f749f60 (libc.so.6:???) redirected to 0x1e59bd70 (= strcmp)<br> > =3D=3D13089=3D=3D Jump to the invalid address stated on the next line<= br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0at 0x0: ???<br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0by 0x1F607366: ??? (in /lib/<a href=3D"= http://libc-2.40.so" rel=3D"noreferrer" target=3D"_blank">libc-2.40.so</a>)= <br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0by 0x1F607423: (below main) (in /lib/<a= href=3D"http://libc-2.40.so" rel=3D"noreferrer" target=3D"_blank">libc-2.4= 0.so</a>)<br> > =3D=3D13089=3D=3D =C2=A0Address 0x0 is not stack'd, malloc'd o= r (recently) free'd<br> > =3D=3D13089=3D=3D<br> > =3D=3D13089=3D=3D<br> > =3D=3D13089=3D=3D Process terminating with default action of signal 11= (SIGSEGV): dumping core<br> > =3D=3D13089=3D=3D =C2=A0Bad permissions for mapped region at address 0= x0<br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0at 0x0: ???<br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0by 0x1F607366: ??? (in /lib/<a href=3D"= http://libc-2.40.so" rel=3D"noreferrer" target=3D"_blank">libc-2.40.so</a>)= <br> > =3D=3D13089=3D=3D =C2=A0 =C2=A0by 0x1F607423: (below main) (in /lib/<a= href=3D"http://libc-2.40.so" rel=3D"noreferrer" target=3D"_blank">libc-2.4= 0.so</a>)<br> > =3D=3D13089=3D=3D<br> > <br> > <br> > Approaches tried<br> > -----------------------<br> > 1. I reduced the optimisation level in glibc to -O1, but still no furt= her=C2=A0symbol details<br> > are available<br> > 2. The core file generated for valgrind crash is also not showing any = symbol details at<br> > crash point. (only showing ??)<br> > 3. Tried adding more option to valgrind like=C2=A0--track-origins=3Dye= s ,=C2=A0--read-var-info=3Dyes .<br> > But not giving any more info for the error.<br> > <br> > <br> > I would appreciate any pointers team can provide in debugging this iss= ue.<br> > <br> > Thanks in advance<br> > <br> > Regards,<br> > Kiran H.<br> > <br> > _______________________________________________<br> > Valgrind-users mailing list<br> > <a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a><br> > <a href=3D"https://lists.sourceforge.net/lists/listinfo/valgrind-users= " rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/= listinfo/valgrind-users</a><br> <br> </blockquote></div> --0000000000007d8950062cdd5951-- --===============1614960580342350054== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1614960580342350054== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users --===============1614960580342350054==--