If you have problems with using gdb or valgrind with threaded programs (like that of OpenVZ Bug #487), just upgrade to ovzkernel-2.6.18.
If you have problems with using gdb or valgrind with threaded programs (like that of OpenVZ Bug #487), just upgrade to ovzkernel-2.6.18.