Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to use valgrind within a chroot environment on Debian? It seems to need to access the proc filesystem, which is unsurprisingly inaccessible.

root@tree:/# valgrind
valgrind: warning (non-fatal): readlink("/proc/self/exe") failed.
valgrind: continuing, however --trace-children=yes will not work.
--6352:0:aspacem  Valgrind: FATAL: can't open /proc/self/maps
--6352:0:aspacem  Exiting now.

I can't install valgrind in my main tree due to some package dependency issues related to the standard libraries, and compiling it from source resulted in an unusable binary, hence my attempt to run it in a clean chroot environment.

share|improve this question

1 Answer 1

Ususal answer:

mount -o bind /proc /path/to/chroot/proc

This will give you a /proc in your chroot environment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.