Page 1 of 1

Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 04:12
by avd.79
Hi people,

This is my first post, so I hope this post is appropriate and not an already known issue.

I am running VirtualBox 4.2.10 on a Windows 7 Home Premium x64 Guest. I am running the latest version of the guest add-ins.

I am finding with my Ubuntu 11.10 i386 guest that 2 system calls fail with files on shared folders. Specifically the calls are:

mmap (90) and mmap(192).

Using the same code on the same files, in a directory local to the Linux installation, things work.

Is it possible this is happening because the file are trying to be mapped including write access (PROT_READ+PROT_WRITE)?

If this is the case, will there ever be support for writable mem-mapped files on shared folders in Linux guests?

Thank you,
AVD.79

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 10:44
by noteirak
The shared folders are not a real implementation of "shared folders" in the NFS or CIFS sense of the term. It is merely an emulation of it to provide access.
So it's all possible that this kind of call fails.

If I understand you correctly, you're actually using this in a C/C++ code? If yes, the best place for getting an answer would be on the dev mailing list.

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 11:11
by avd.79
Hi

The code was in assembler, but the same code in C basically compiles the same and gives the same error code.

I will get onto the dev mailing list.

Thanks,
AVD.79

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 12:35
by avd.79
The dev mailing list askes end users to refrain from posting to the list.

Maybe I should leave the problem in this form for now?

AVD.79

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 12:44
by noteirak
You are safe to post on the dev mailing list for this kind of issues as it involves more than just the common usage and refers directly to how Virtualbox was coded. You can also check out the Source Code if you wish to.

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 13:09
by mpack
If GA Shared Folders don't work for you, then why not set up a normal network share?

Re: Linux system calls mmap and mmap2 fail on shared folders

Posted: 31. Mar 2013, 13:13
by avd.79
Urmm.. Thank you for pointing out the obvious ;)
I will try that and post if it doesn't remedy the problem.

AVD.79