Debugging in Ubuntu 10.10 (Maverick Meerkat)

The latest release of Ubuntu (10.10/Maverick Meerkat) has clamped down on some of the more esoteric security loopholes in the OS. One of these prevents debuggers from attaching to processes, the idea being that users can’t use a debugger to sniff out interesting data from running programs unless they started them explicitly in debug mode. This of course means that your average developer can’t attach a debugger to his processes to see what they’re up to – a vital part of many development activities.

Luckily it’s very easy to disable this security block and return things to normal. Simply edit the file /etc/sysctl.d/10-ptrace.conf, and replace the last line

kernel.yama.ptrace_scope = 1

with

kernel.yama.ptrace_scope = 0

There’s probably a way to signal this change to the system, but I just rebooted the machine and all was fine.

Leave a Reply