clearcontainers / runtime

OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Apache License 2.0
589 stars 70 forks source link

Issue with shared mmap #852

Open vinay-y opened 6 years ago

vinay-y commented 6 years ago

We are trying to run filebench 1.4.9.1 benchmark in a clear container running on Ubuntu 16.04. But, inside the container, when we run filebench we get the following error. "Could not mmap the shared memory file: Invalid argument"

It works fine using "runc" runtime. We suspect the error is because filebench is using mmap in MAP_SHARED mode which may not be supported by clear containers. Please help me out if this is true. Has anyone else encountered this shared mmap issue before?

Thanks.

jodh-intel commented 6 years ago

Hi @vinay-y - MAP_SHARED should work. Please can you run the sudo cc-collect-data.sh script and attach to this issue (after reviewing its contents).

Also, could you add an strace of the failing call(s)?

devimc commented 6 years ago

this is a very known issue with 9p, @vinay-y could you try with devicemapper?

docker: https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#configure-docker-with-the-devicemapper-storage-driver

grahamwhaley commented 6 years ago

Just for ref, a little old background over here: https://github.com/01org/cc-oci-runtime/issues/949 /cc @egernst

jodh-intel commented 6 years ago

Thanks @grahamwhaley and @devimc ! That ol' :chestnut:. I was confused because mmap(MMAP_SHARED) alone on 9p does seem to work. But not in combination with ftruncate().

jodh-intel commented 6 years ago

(that's a chestnut by the way, not a pile of anything... ;)

vinay-y commented 6 years ago

Thank you @devimc @grahamwhaley @jodh-intel . It worked with devicemapper driver in docker. This is yet to be fixed?

egernst commented 6 years ago

@vinay-y -- I think for 9p in Clear Containers this is probably categorized as "will not fix". @devimc @grahamwhaley @jodh-intel - agreed?