VirtualBox

Ticket #11115 (closed defect: fixed)

Opened 18 months ago

Last modified 14 months ago

Shared Folders under Windows does not accept writes of more than 16MiB length

Reported by: stresstester Owned by:
Priority: major 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

  1. 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.)
  2. Install Ruby (e.g. from  http://rubyforge.org/frs/download.php/76527/rubyinstaller-1.9.3-p286.exe)
  3. Map a writable share to a driver letter.
  4. Open a "cmd" console and cd into a directory in this drive.
  5. 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

comment:1 Changed 18 months ago by stresstester

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.

comment:2 Changed 15 months ago by sunlover

  • Component changed from guest additions to 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.

comment:3 Changed 14 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

The fix is part of VBox 4.2.8.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use