Linux system calls mmap and mmap2 fail on shared folders

Discussions about using Linux guests in VirtualBox.
Post Reply
avd.79
Posts: 4
Joined: 31. Mar 2013, 04:01

Linux system calls mmap and mmap2 fail on shared folders

Post 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
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

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

Post 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.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
avd.79
Posts: 4
Joined: 31. Mar 2013, 04:01

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

Post 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
avd.79
Posts: 4
Joined: 31. Mar 2013, 04:01

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

Post 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
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

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

Post 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.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

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

Post by mpack »

If GA Shared Folders don't work for you, then why not set up a normal network share?
avd.79
Posts: 4
Joined: 31. Mar 2013, 04:01

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

Post 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
Post Reply