Opened 8 years ago

Closed 8 years ago

#245 closed defect (invalid)

File corruption if serving static files from vboxfs

Reported by: Anže Pečar Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.2.x
Keywords: Cc:
uname -a: Linux smotko-debian 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.2.4
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-pcre-jit --with-file-aio --with-http_gzip_static_module --with-http_ssl_module --with-ipv6 --without-http_browser_module --without-http_geo_module --without-http_limit_req_module --without-http_limit_zone_module --without-http_memcached_module --without-http_referer_module --without-http_scgi_module --without-http_split_clients_module --with-http_stub_status_module --without-http_ssi_module --without-http_userid_module --without-http_uwsgi_module --add-module=/usr/src/nginx/source/nginx-1.2.4/debian/modules/nginx-echo

Description

I have a VirtualBox machine running debian and nginx. I have set up a shared folder between my local machine (Ubuntu 12.04) and the vb machine and I am serving static files from this shared folder.

When I open one of the files in my web browser nginx serves the file correctly, but if I then make a change to it from my local machine, nginx serves the old version, but adds some weird characters. If I open the file on my vb machine with vim (or any other text editor) the file is correctly updated and if I save it (without changing anything else) nginx starts serving the file correctly again.

Some more info is available on my blog: http://smotko.si/nginx-static-file-problem/.

Change History (3)

comment:1 by Anže Pečar, 8 years ago

Thanks to a comment on reddit I found a solution to this problem.

comment:2 by maxim, 8 years ago

The comment on reddit is probably correct -- it looks like a bug in VirtualBox vfs/sendfile implementation.

comment:3 by Valentin V. Bartenev, 8 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.