|
From: Kunal C. <atk...@gm...> - 2020-05-15 08:21:12
|
Hi Team, Below is the error coming when running valgrind , Do not know how to tackle it ............................. valgrind --tool=memcheck ./lte_tr069 ==6660== ==6660== Warning: Can't execute setuid/setgid/setcap executable: ./lte_tr069 ==6660== Possible workaround: remove --trace-children=yes, if in effect ==6660== valgrind: ./lte_tr069: Permission denied -- *Thanks with Regards!* *Kunal Chauhan* *Mob:09813614826* *Mob:08860397903* *E-mail:atk...@gm... <E-mail%3Aa...@gm...>* |
|
From: Paul F. <pj...@wa...> - 2020-05-15 09:19:52
|
> Message du 15/05/20 10:22 > De : "Kunal Chauhan" > ==6660== Warning: Can't execute setuid/setgid/setcap executable: ./lte_tr069 > ==6660== Possible workaround: remove --trace-children=yes, if in effect > ==6660== > valgrind: ./lte_tr069: Permission denied Hi The problem is that your application (or something that your application is executing) is trying to switch user, group or capabilities. This is likely to interfere with the workings of Valgrind. As an example of this, Valgrind often needs to open new log files. This may fail if Valgrind has switched user/group/caps. This is more likely to happen if you are running Valgrind on a wrapper script and using the --trace-children=yes. For instance you might be on a system where utilities like 'basename' and 'dirname' are security hardened. If they are used in your wrapper this could result in the problem you are seeing. Alternatively, if you are not using a wrapper, then the best workaround is to have some special Valgrind handling in your executable. See http://valgrind.org/docs/manual/manual-core- adv.html#manual-core-adv.clientreq So you could write some code like if (!RUNNING_ON_VALGRIND) { // your setcap calls } A+ Paul |
|
From: Kunal C. <atk...@gm...> - 2020-05-15 11:08:56
|
Hi Team, 1. I have created a simple program ./a.out and make a check if(RUNNING_ON_VALGRIND) but still same error is coming. 2. I am trying to run ./a.out on arm board as it is compile for it also valgrind is running there only Thanks Kunal On Fri, May 15, 2020 at 2:51 PM Paul FLOYD <pj...@wa...> wrote: > > > > Message du 15/05/20 10:22 > > De : "Kunal Chauhan" > > > > ==6660== Warning: Can't execute setuid/setgid/setcap executable: > ./lte_tr069 > > ==6660== Possible workaround: remove --trace-children=yes, if in effect > > ==6660== > > valgrind: ./lte_tr069: Permission denied > > > Hi > > The problem is that your application (or something that your application > is executing) is trying to switch user, group or capabilities. This is > likely to interfere with the workings of Valgrind. As an > example of this, Valgrind often needs to open new log files. This may fail > if Valgrind has switched user/group/caps. > > This is more likely to happen if you are running Valgrind on a wrapper > script and using the --trace-children=yes. For instance you might be on a > system where utilities like 'basename' and > 'dirname' are security hardened. If they are used in your wrapper this > could result in the problem you are seeing. > > Alternatively, if you are not using a wrapper, then the best workaround is > to have some special Valgrind handling in your executable. See > http://valgrind.org/docs/manual/manual-core- > adv.html#manual-core-adv.clientreq > <http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq> > > So you could write some code like > > if (!RUNNING_ON_VALGRIND) > { > // your setcap calls > } > > A+ > Paul > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- *Thanks with Regards!* *Kunal Chauhan* *Mob:09813614826* *Mob:08860397903* *E-mail:atk...@gm... <E-mail%3Aa...@gm...>* |
|
From: John R. <jr...@bi...> - 2020-05-15 18:35:17
|
> Below is the error coming when running valgrind , Do not know how to tackle it > valgrind --tool=memcheck ./lte_tr069 > ==6660== > ==6660== Warning: Can't execute setuid/setgid/setcap executable: ./lte_tr069 > ==6660== Possible workaround: remove --trace-children=yes, if in effect > ==6660== > valgrind: ./lte_tr069: Permission denied READ THE Warning MESSAGE. It says *EXACTLY* what the problem is. ./lte_tr069 has one of the attributes setuid, or setgid, or setcap. If you're clever enough to set such an attribute then you should be clever enough to deal with the complaint from valgrind/memcheck. |