* Daniel Kahn Gillmor <[EMAIL PROTECTED]> [2008-11-06 21:20-0500]: > Package: util-vserver > Severity: normal > Version: 0.30.216~r2772-3 > > I'm using a vserver kernel. I get failures within a vserver guest > when i try to test the POSIX-style shared-memory commands with the .c > examples found here: > > http://www.cs.cf.ac.uk/Dave/C/node27.html#SECTION002730000000000000000
Can you provide more details about what failures you are getting? > This turns out to be because the initial creation of /dev/shm inside > the vserver (by initscripts.postinst during a stock lenny debootstrap) > is defeated by Probably your examples assume /dev/shm exists, and this is why they fail. Looking more into it, it seems like glibc expects it to exist when you are trying to do shared memory operations (shm_open, shm_unlunk). > If the following two steps are done from the host before starting the > vserver, POSIX-style shared memory seems to work within the vserver > for me: > > mkdir /var/lib/vservers/$VSERVER_NAME/dev/shm > chmod --reference=/dev/shm /var/lib/vservers/$VSERVER_NAME/dev/shm Exactly, however I think its more correct to say that glibc >= 2.2 expects tmpfs to be mounted at /dev/shm for POSIX shared memory compliance, although as you notice, it doesn't have to be a tmpfs and just having a directory there is sufficient. > Perhaps this directory should be added into the default deboostrap > operation? Probably the shm directory should be added to distrib/defaults/devs so it is created correctly. >Are there other ways to resolve this that i missed? As this is typically just a regular tmpfs filesystem, and doesn't provide anything special WRT to shared memory, you can either make the directory manually, or add it to /etc/vservers/monkey/fstab as a tmpfs so it will be mounted when the guest is started. micah
signature.asc
Description: Digital signature

