On Monday 25 October 2010 17:14:06 Tom Hughes wrote: > On 25/10/10 15:57, Paul Ortyl wrote: > > I have filed an Ubuntu bug after being unable to use --db-attach=yes > > feature of valgrind. > > https://bugs.launchpad.net/bugs/665850 > > > > It looks like this feature has been destroyed "by design": > > https://wiki.ubuntu.com/Security/Features#ptrace > > https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace%20Pro > > tection > > > > This new hardened behaviour can be deactivated by modifying > > /proc/sys/kernel/yama/ptrace_scope > > which is then global and not really pretty solution. > > As I read that, you can still ptrace your own descendants (which is what > valgrind does) just not other processes owned by the same user. > > So I think the diagnosis you were given may be wrong.
Unfortunately it is not how valgrind+gdb do that. See the bug description I posted at launchpad. > That said, the db-attach feature is very fragile and often fails and I > would generally advise only trying to use it as a last resort - it is > normally quite possible to find and fix problems without it. Normally if I get valgrind warning it is a really obscure situation, where only the inspection of variables on the stack may reveal the truth... I hope that there is some kind of solution, but frankly I do not see any. The GDB gets started as a child of valgrind, but GDB is not parent of the process, which should get monitored. So unless there is a clever trick I do not know how to get around this security feature which is a complete show stopper on a developers machine without root access. Paul ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
