Re: Need support in debugging Valgrind 3.18 glibc segv error
kiran hardas <[email protected]> Mon, 24 Mar 2025 21:03:03 +0530
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Message-ID | <CAPyEgmZifZo4yaM5+c6RpBvNR_9i+Mis4VKr-OnO2+GOtrxevA@mail.gmail.com> |
--===============8619858536827907848== Content-Type: multipart/alternative; boundary="00000000000096e5a006311852c4" --00000000000096e5a006311852c4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Paul, Thanks for taking time and providing inputs. I am still debugging for that shmat failure, so far no rca. The error string that i got from perror after shmat is "Invalid argument". Regards, Kiran H. On Sat, Mar 22, 2025 at 2:18=E2=80=AFAM Paul Floyd <[email protected]> wro= te: > > On 21/03/2025 09:06, kiran hardas wrote: > > Hi Paul/Team, > > > > Thank you for your suggestion. I added the entry for shmget function > > in coregrind/m_syswrap/syswrap-x86-linux.c > > and the error got resolved for shmget function. Yes it is x86 linux > > that is getting used. Similar errors came for shmat, shmdt, shmctl > > functions. > > I added similar entries of those functions too in the table and > > resolved the errors. > > > > Currently i am getting error from shmat function as "Invalid argument" > > from my application code. > > The data pointer returned by shmat function is coming as 0xffffffff > > which is -1 (error). I am calling the shmat as below > > in my application code > > > > data =3D shmat(shmid, NULL, 0); /* where data is a struct > > pointer and shmid is 1 obtained by a successful shmget call */ > > > > I verified the arguments for this shmat function and they seem to be > > fine. Also checked for permission issues. > > I am suspecting memory issue which could be resulting in shmat attach > > failure after running valgrind (have glibc 2.40). > > > > Would appreciate any advice/suggestion you can provide for this issue. > > > > Hi > > On the Valgrind side I've pushed a change that adds these 4 syscalls to > x86 Linux. > > I can't tell why your shmat call is failing. If the shmget call to > obtain shmid works than it ought to work. The man page lists the error > conditions. What do you get in errno? > > It might be worth checking with the ipcs command to see if hou have lots > of leftover memorys/queues/semaphores. > > > A+ > > Paul > > --00000000000096e5a006311852c4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Paul,<div><br></div><div>Thanks for taking time and pro= viding inputs. I am still debugging for that shmat failure,=C2=A0so far no = rca.</div><div>The error string that i got from perror after shmat is "= ;Invalid argument".</div><div><br></div><div><br></div><div>Regards,</= div><div>Kiran H.</div></div><br><div class=3D"gmail_quote gmail_quote_cont= ainer"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Mar 22, 2025 at 2:18= =E2=80=AFAM Paul Floyd <<a href=3D"mailto:[email protected]">pjfloyd@wa= nadoo.fr</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex"><br> On 21/03/2025 09:06, kiran hardas wrote:<br> > Hi Paul/Team,<br> ><br> > Thank you for your suggestion. I added the entry for shmget function <= br> > in coregrind/m_syswrap/syswrap-x86-linux.c<br> > and the error got resolved for shmget function. Yes it is x86 linux <b= r> > that is=C2=A0getting used. Similar errors came for shmat, shmdt, shmct= l <br> > functions.<br> > I added similar entries of those functions too in the table and <br> > resolved the=C2=A0errors.<br> ><br> > Currently i am getting error from shmat function as "Invalid argu= ment" <br> > from my application code.<br> > The data pointer returned by shmat function is coming as 0xffffffff <b= r> > which is -1 (error). I am calling the shmat as below<br> > =C2=A0in my application code<br> ><br> > data =3D shmat(shmid, NULL, 0);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 /* where data is a struct <br> > pointer and shmid is 1 obtained by a successful=C2=A0shmget call */<br= > ><br> > I verified the arguments for this shmat function and they seem to be <= br> > fine. Also checked for permission issues.<br> > I am suspecting memory issue which could be resulting in shmat attach = <br> > failure after running valgrind (have glibc 2.40).<br> ><br> > Would appreciate any advice/suggestion you can provide for this issue.= <br> ><br> <br> Hi<br> <br> On the Valgrind side I've pushed a change that adds these 4 syscalls to= <br> x86 Linux.<br> <br> I can't tell why your shmat call is failing. If the shmget call to <br> obtain shmid works than it ought to work. The man page lists the error <br> conditions. What do you get in errno?<br> <br> It might be worth checking with the ipcs command to see if hou have lots <b= r> of leftover memorys/queues/semaphores.<br> <br> <br> A+<br> <br> Paul<br> <br> </blockquote></div> --00000000000096e5a006311852c4-- --===============8619858536827907848== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8619858536827907848== 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 --===============8619858536827907848==--