VirtualBox

Ticket #18805 (closed defect: fixed)

Opened 3 months ago

Last modified 7 weeks ago

Linux guests: calls to aio_{read,write}(3) may fail inside shared folder => fixed in SVN/6.0.x x>12

Reported by: AndresPlazaR Owned by: paulson
Component: shared folders Version: VirtualBox 6.0.10
Keywords: ofstream Cc:
Guest type: Linux Host type: Mac OS X

Description

Trying to write 1024 (or more) bytes to a shared drive just create the file with no content (filesize = 0).

Less than 1024 characters, it writes the file properly.

Writing 1024 (or more) to VM file systems works fine.

This is similar to tickets https://www.virtualbox.org/ticket/1187 and https://www.virtualbox.org/ticket/10246, but it does not seem to be fixed.

See attached file for example code.

Environment:

  • VirtualBox 6.0.10
  • Guest: CentOS 7.6.1810
  • Host: MacOS X 10.14.6 (Mojave)

Attachments

test.cpp Download (342 bytes) - added by AndresPlazaR 3 months ago.
Example code for this problem.

Change History

Changed 3 months ago by AndresPlazaR

Example code for this problem.

comment:1 Changed 3 months ago by AndresPlazaR

BTW, I installed the latest guest additions, and the problem is still there.

comment:2 Changed 7 weeks ago by paulson

  • Owner set to paulson
  • Status changed from new to accepted
  • Summary changed from Cannot write more than 1023 bytes on shared drive using ofstream to Linux guests: calls to aio_{read,write}(3) may fail inside shared folder

This is a regression which was introduced in VirtualBox 6.0.6 and affects Linux guests which have a kernel < 3.16.0. Calls to aio_read(3) or aio_write(3) for small data sizes (< 2896 bytes) by userspace applications fail due to a logic error when copying the data to or from userspace. CentOS 7 runs 3.10.0 and when the sample test.cpp program using ofstream opens a file and writes out less than 1024 bytes then write(2) is used but when 1024 or more bytes are written writev(2) is used which is handled by aio_write() for this kernel version and there we encounter this bug.

comment:3 Changed 7 weeks ago by socratis

So @paulson, has it been addressed in the SVN? If so, would you mind posting the public rev. number in the tree that includes the fix, and most importantly the public test build that this was integrated? TIA...

I've updated the " Known issues with 6.0.6", but I've left it as open/unfixed.

Last edited 7 weeks ago by socratis (previous) (diff)

comment:4 Changed 7 weeks ago by paulson

  • Status changed from accepted to closed
  • Resolution set to fixed
  • Summary changed from Linux guests: calls to aio_{read,write}(3) may fail inside shared folder to Linux guests: calls to aio_{read,write}(3) may fail inside shared folder => fixed in SVN/6.0.x x>12

As of today this has been fixed in trunk and the fix has also been backported to VirtualBox 6.0.x (x > 12) and any 6.0.x Testbuilds with a revision >= r133104. This issue doesn't apply to VirtualBox 5.2.x.

comment:5 Changed 7 weeks ago by socratis

Thank you @paulson. The test builds are at rev. 133025 (as of this writing), but I've updated the KnownIssues to point to the future! :)

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use