#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)
Change History (6)
by , 5 years ago
comment:1 by , 5 years ago
BTW, I installed the latest guest additions, and the problem is still there.
comment:2 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
Summary: | Cannot write more than 1023 bytes on shared drive using ofstream → 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 by , 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.
comment:4 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Summary: | Linux guests: calls to aio_{read,write}(3) may fail inside shared folder → 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 by , 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! :)
Example code for this problem.