[lxc-users] Using valgrind with lxc

Tom Hughes tom at compton.nu
Mon Sep 29 15:07:26 UTC 2014


On 29/09/14 15:41, Vallevand, Mark K wrote:

> Our program is designed to close all open file descriptors in the child
> process before calling lxc_start().  That code can try to close all file
> descriptors to make sure something doesn’t sneak through.  However,
> closing the file descriptors associated with valgrind does not work.  I
> get errno=0 Bad File Descriptor.  Valgrind really has them held open.  I
> am running as root in all these tests.

Yes, we refuse to let them be closed because that would, for example, 
break logging as it would close our log stream.

We do however also lie when asked with getrlimit how many file 
descriptors there are, so lxc is obviously just guessing some high upper 
limit rather than actually asking what the limit is.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/


More information about the lxc-users mailing list