VirtualBox

Opened 12 years ago

Closed 8 years ago

#9952 closed defect (obsolete)

Apache in guest cannot access files though shared folder — at Version 7

Reported by: Jeff Teeters Owned by:
Component: shared folders Version: VirtualBox 4.1.6
Keywords: Cc:
Guest type: Linux Host type: Mac OS X

Description (last modified by aeichner)

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.

Change History (12)

by Jeff Teeters, 12 years ago

Attachment: VBox.log added

comment:1 by Michael Thayer, 12 years ago

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).

by Jeff Teeters, 12 years ago

Attachment: strace-4_1_6.txt added

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

comment:2 by Jeff Teeters, 12 years ago

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

by Jeff Teeters, 12 years ago

Attachment: vbox-GA412.log added

VBox.log file for Guest Additions 4.1.2

by Jeff Teeters, 12 years ago

Attachment: strace_GA412.txt added

strace of apache2 with Guest Additions 4.1.2

comment:3 by Jeff Teeters, 12 years ago

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.

by Jeff Teeters, 12 years ago

Attachment: log_messages_GA412.txt added

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

comment:4 by Tianji Wu, 12 years ago

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 by bobo69, 12 years ago

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 by Erick Dovale, 12 years ago

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.

comment:7 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use