VirtualBox

Ticket #9952 (new defect)

Opened 2 years ago

Last modified 2 years ago

Apache in guest cannot access files though shared folder

Reported by: jefft Owned by:
Priority: major Component: shared folders
Version: VirtualBox 4.1.6 Keywords:
Cc: Guest type: Linux
Host type: Mac OS X

Description

Symptom is that Apache running in the guest (Ubuntu LTS server) is unable to serve files stored in the host in a shared folder. Strange thing is that the files on the guest are accessible though the shared folder using a shell (user can copy or view files) and also Apache is able to display a directory listing of the files, but when a user clicks on a file in the listing, then the file appears to be served (downloaded to the user), but there is no content (zero bytes). Also, when this happens errors like the following appear in /var/log/messages:

Nov 22 23:08:25 crcns kernel: [ 8082.266785] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
Nov 22 23:08:25 crcns kernel: [ 8082.266902] VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.

And errors like the following appear in VBox.log:

02:04:21.031 Guest Log: VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
02:04:21.031 Guest Log: VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.

This problem came up after I upgraded to VirtualBox 4.1.6 (and the guest additions in the guest OS) and also upgraded my host OS (Snow Leopard Server) to 10.6.8. Guest is running Linux kernel 2.6.24-29-virtual, same problem with 2.6.24-30-virtual kernel. This was not a problem before I did the upgrades. Previously, I was using a VB that was a bit out of date, so I'm not sure when this problem was introduced, or if it is being caused by the newer version of OS X server. It does not seem to be a problem on the regular (not a server) OS X version 10.6.7.

Attachments

VBox.log Download (51.8 KB) - added by jefft 2 years ago.
strace-4_1_6.txt Download (6.0 KB) - added by jefft 2 years ago.
Strace output of Apache process, with 4.1.6 guest additions, and matching var/log/messages
vbox-GA412.log Download (72.7 KB) - added by jefft 2 years ago.
VBox.log file for Guest Additions 4.1.2
strace_GA412.txt Download (5.6 KB) - added by jefft 2 years ago.
strace of apache2 with Guest Additions 4.1.2
log_messages_GA412.txt Download (22.4 KB) - added by jefft 2 years ago.
/var/log/message - full output from system startup to apache error, guest additions 4.1.2

Change History

Changed 2 years ago by jefft

comment:1 Changed 2 years ago by michael

If you have a chance to try to narrow that down a bit by trying out older Guest Additions versions from  http://download.virtualbox.org/virtualbox/ that would be great. (Assuming of course that this is an Additions issue.) Old Additions versions should work fine in current VirtualBox versions. An strace of the Apache process might also be interesting if we are able to match the strace output with the log messages (timestamps might help here).

Changed 2 years ago by jefft

Strace output of Apache process, with 4.1.6 guest additions, and matching var/log/messages

comment:2 Changed 2 years ago by jefft

I added strace output of Apache and corresponding log messages. I will try older Guest Additions and get back about that.

Changed 2 years ago by jefft

VBox.log file for Guest Additions 4.1.2

Changed 2 years ago by jefft

strace of apache2 with Guest Additions 4.1.2

comment:3 Changed 2 years ago by jefft

The problem still occurs with Guest Additions 4.1.2. I think I was running that version of VB before with no problems. So maybe the error is in general Virtual Box (not the Guest Additions) and/or it was caused by upgrading the host OS to Snow Leopard Server 10.6.8.

I uploaded three new files for this GA 4.1.2 test. /var/log/messages of a full system startup until the errors generated by apache, the strace apache2 output, and the VBox.log file. I used syslog-ng to generate microsecond timestamps in /var/log/messages that can be matched with the strace output.

Based on the matching, I think the error is in a call to sendfile (generates a Protocol error). In the following (from strace) the file referenced in the first line (crcns-neuroinformatics-article.pdf) is the file apache is trying to send to the user.

1322698963.939921 open("/mnt/crcns-data/downloads/site-files/news/crcns-neuroinformatics-article.pdf", O_RDONLY|O_LARGEFILE) = 18
1322698963.942795 setsockopt(16, SOL_TCP, TCP_CORK, [1], 4) = 0
1322698963.943860 writev(16, [{"HTTP/1.1 200 OK\r
Date: Thu, 01 D"..., 368}], 1) = 368
1322698963.944845 sendfile(16, 18, [0], 134452) = -1 EPROTO (Protocol error)
1322698963.947758 setsockopt(16, SOL_TCP, TCP_CORK, [0], 4) = 0
1322698963.948434 read(16, 0x83ccd28, 8000) = -1 EAGAIN (Resource temporarily unavailable)

Here are the corresponding lines in /var/log/messages:

2011-12-01T00:22:43.946640+00:00 crcns kernel: [  661.466761] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
2011-12-01T00:22:43.946757+00:00 crcns kernel: [  661.467346] VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.

Please let me know if you would like me to do more tests.

Changed 2 years ago by jefft

/var/log/message - full output from system startup to apache error, guest additions 4.1.2

comment:4 Changed 2 years ago by the729

I have the same issue. In addition, ASCII files seem to work, only binary files fail. I guess this is nothing to do with Apache, although I first noticed the problem because Apache can not serve properly.

On my machine, I can not copy a binary file from a vbox share folder to the guest file system using the GUI. It said "protocol error". 'dmesg' outputs the errors:

[  157.261163] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[  157.261216] VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.

And I guess this is the same issue as Ticket #9719.

Host: Mac OS X 10.6.8 \ Guest: Ubuntu running kernel 2.6.32-34 \ VBox: 4.1.6 r74713

comment:5 Changed 2 years ago by bobo69

I have also the same issue and same errors accessing html on on host share folder through apache

Host: Windows 7 \ Guest: Linux fedora 2.6.34.9-69 \ VBox: 4.1.6 r74713 VBOXAdditions 4.1.6 r74713

What is really completly incredible in my case is that

  • any php file through apache is OK !!!
  • nearly all html file through apache is KO !!!

there is maybe some kind of link with apache acces to share folder...

comment:6 Changed 2 years ago by edovale

Is there any update on this issue? I am experiencing exactly the same problem with guest ubuntu 10.04, 11.04 and 11.10 running on host Mac OS X 10.6.8 and VirtualBox 4.1.8.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use