VirtualBox

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18805 closed defect (fixed)

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 (1)

test.cpp (342 bytes ) - added by AndresPlazaR 5 years ago.
Example code for this problem.

Download all attachments as: .zip

Change History (6)

by AndresPlazaR, 5 years ago

Attachment: test.cpp added

Example code for this problem.

comment:1 by AndresPlazaR, 5 years ago

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

comment:2 by paulson, 5 years ago

Owner: set to paulson
Status: newaccepted
Summary: Cannot write more than 1023 bytes on shared drive using ofstreamLinux 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 by Socratis, 5 years ago

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 5 years ago by Socratis (previous) (diff)

comment:4 by paulson, 5 years ago

Resolution: fixed
Status: acceptedclosed
Summary: Linux guests: calls to aio_{read,write}(3) may fail inside shared folderLinux 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 by Socratis, 5 years ago

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.

© 2023 Oracle
ContactPrivacy policyTerms of Use