Hi Philippe/Team, Thank you Philippe for your suggestions, I was able to resolve the earlier errors by adding additional valgrind options and loading the symbol table. In my application, few variables and a function pointer was uninitialised which led to previous errors mentioned in earlier email.
Proceeding further with my earlier activity, right now i am seeing error related to unhandled syscall no. 395 in valgrind logs. I thought to bring this up in this mail chain for your suggestions/inputs. # ./usr/test/bin/valgrind --version -v valgrind-3.24.0-fcdaa47426-20241101 GNU/Linux 5.4 Glibc 2.40 gcc 14.2 binutils 2.43 Error snippet: --6423-- WARNING: unhandled x86-linux syscall: 395 ==6423== at 0x1F757398: shmget (in /lib/libc-2.40.so) by 0xF597083: <application backtraces> ... ... --6423-- You may be able to write your own handler. --6423-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --6423-- Nevertheless we consider this a bug. Please report --6423-- it at http://valgrind.org/support/bug_reports.html. >From my analysis of valgrind code, i can see the shmget wrappers are present in coregrind/m_syswrap area, but still it is throwing such error. Any pointers or suggestions would be appreciated, Thanks. Regards, Kiran H. On Thu, Jan 30, 2025 at 1:54 AM Philippe Waroquiers < philippe.waroqui...@skynet.be> wrote: > Is glibc compiled with debug info ? > Without a way to see where the problem happens in glibc, this will be > difficult > to understand. > If/when you have glibc debug info, you might use valgrind --vgdb-error=0 > and debug > glibc startup under valgrind+gdb > > Alternatively, you might add -v -v -v -d -d -d to have more information > produced by > valgrind, but that will likely not help much without glibc debug. > > In the original mail, you show an extract of the error logs. > Was there any other error before ? > Because the problem might originate from an earlier error. > > Finally, do you encounter the same problem with e.g. --tool=none or > --tool=callgrind ? > (none will do no transformation to the guest process and callgrind will > not replace > malloc/free, so that might give a hint). > > Thanks > Philippe > > > > > On Thu, 2025-01-30 at 01:00 +0530, kiran hardas wrote: > > 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 PM Philippe Waroquiers < > philippe.waroqui...@skynet.be> > > 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 > get 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: > > > > ------------------------ > > > > ... > > > > ... > > > > ==13089== > > > > --13089-- REDIR: 0x1f749f60 (libc.so.6:???) redirected to 0x1e59bd70 > (strcmp) > > > > ==13089== Jump to the invalid address stated on the next line > > > > ==13089== at 0x0: ??? > > > > ==13089== by 0x1F607366: ??? (in /lib/libc-2.40.so) > > > > ==13089== by 0x1F607423: (below main) (in /lib/libc-2.40.so) > > > > ==13089== Address 0x0 is not stack'd, malloc'd or (recently) free'd > > > > ==13089== > > > > ==13089== > > > > ==13089== Process terminating with default action of signal 11 > (SIGSEGV): dumping > > > > core > > > > ==13089== Bad permissions for mapped region at address 0x0 > > > > ==13089== at 0x0: ??? > > > > ==13089== by 0x1F607366: ??? (in /lib/libc-2.40.so) > > > > ==13089== by 0x1F607423: (below main) (in /lib/libc-2.40.so) > > > > ==13089== > > > > > > > > > > > > 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=yes > , --read-var- > > > > info=yes . > > > > But not giving any more info for the error. > > > > > > > > > > > > I would appreciate any pointers team can provide in debugging this > issue. > > > > > > > > Thanks in advance > > > > > > > > Regards, > > > > Kiran H. > > > > > > > > _______________________________________________ > > > > Valgrind-users mailing list > > > > Valgrind-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > >
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users