Opened 12 years ago
Closed 12 years ago
#11115 closed defect (fixed)
Shared Folders under Windows does not accept writes of more than 16MiB length
Reported by: | stresstester | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 4.2.2 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | other |
Description
When performing a write to a file managed by VirtualBox Shared Folders and the write's length is greater than 16777216 bytes, then this file write fails, while it should succeed.
How to reproduce
- Use Windows 7 64-bit as guest. Use Linux 64-bit as host. (Probably the problem happens for other Windows versions as guest and for any host.)
- Install Ruby (e.g. from http://rubyforge.org/frs/download.php/76527/rubyinstaller-1.9.3-p286.exe)
- Map a writable share to a driver letter.
- Open a "cmd" console and cd into a directory in this drive.
- Run this ruby script (e.g. called "test_virtualbox_shared_folders_write_size.rb"):
#!/usr/bin/ruby [16*1024*1024,16*1024*1024+1].each do |size| filename = "test#{size}" content = "S"*size puts "Writing #{size} bytes to file #{filename}..." File.binwrite(filename,content) puts "Done." end
Expected result
This output should appear:
>ruby test_virtualbox_shared_folders_write_size.rb Writing 16777216 bytes to file test16777216... Done. Writing 16777217 bytes to file test16777217... Done.
Actual result
This output actually does appear:
>ruby test_virtualbox_shared_folders_write_size.rb Writing 16777216 bytes to file test16777216... Done. Writing 16777217 bytes to file test16777217... test_virtualbox_shared_folders_write_size.rb:7:in `binwrite': Invalid argument - test16777217 (Errno::EINVAL) from test_virtualbox_shared_folders_write_size.rb:7:in `block in <main>' from test_virtualbox_shared_folders_write_size.rb:3:in `each' from test_virtualbox_shared_folders_write_size.rb:3:in `<main>'
Additional observations
Note that this problem is not limited to Ruby. Visual Studio 2010 suffers the same problem when writing large files. The error message is different, though, and looks like:
error C1085: Cannot write precompiled header file: 'FooBar.pch': The parameter is incorrect.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Component: | guest additions → shared folders |
---|
The bug should be fixed in the new 4.2 additions: http://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.2.7-83629.iso
Please test it. Thanks.
As it turns out, the same bug applies not only to writing more than 16777216 bytes at once, but also to reading more than 16777216 bytes at once.