#16567 closed defect (duplicate)
VirtualBox 5.1.16 crashes when I open any file on the shared folder
Reported by: | Une | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 5.1.16 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | other |
Description
As wrote in the summary, VirtualBox 5.1.16 crashes when I open any file on the folder which is assigned as the shared folder. At that time, only the VM's window disappeared and VirtualBox Manager Window is still alive. Virtual Box 5.1.14 didn't crash whenever I use the files on the shared folder. I use FreeBSD 10.3-stable (r315187) as host OS and Windows 7 SP1 as guest OS. The log file contains the following lines:
00:02:25.243750 !!Assertion Failed!! 00:02:25.243750 Expression: strchr(pszFullPath, '\0') == pszSrc + 1 00:02:25.243751 Location : /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.16/src/VBox/HostServices/SharedFolders/vbsfpath.cpp(184) int vbsfCorrectPathCasing(SHFLCLIENTDATA *, char *, size_t, bool, bool)
VirtualBox is built by poudriere pkg builder with FreeBSD ports system. In addition, I employ the DEBUG option to generate the additional logs to obtain the above information. When I use VirtualBox without DEBUG option, it casts siglnal 11 and crash without any information.
Attachments (4)
Change History (14)
by , 7 years ago
Attachment: | Win7_vlab-2017-03-15-19-53-32.log added |
---|
comment:1 by , 7 years ago
Thanks for the report. It is a known regression in 5.1.16 and already fixed. The next maintenance release of VirtualBox will contain the fix.
comment:3 by , 7 years ago
Thanks for your response. However, this problem still occurs after upgrading to 5.1.18. When I logon to Windows 7 guest, the window of VM disappeared. I show the last few lines in the log file:
00:01:36.522026 !!Assertion Failed!!
00:01:36.522026 Expression: <NULL>
00:01:36.522027 Location : /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.18/src/VBox/HostServicesSharedFolders/vbsfpath.cpp(114) int vbsfCorrectCasing(SHFLCLIENTDATA *, char *, char *)
Furthermore, I changed the configuration to stop using shared folder, VM's window also vanished with the following log:
00:03:28.630041 !!Assertion Failed!!
00:03:28.630042 Expression: pBDLE->State.u32BufOff <= pBDLE->u32BufSize
00:03:28.630043 Location : /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.18/src/VBox/Devices/Audio/DevHDA.cpp(2626) void hdaBDLEUpdate(PHDABDLE, uint32_t, uint32_t)
by , 7 years ago
Attachment: | Win7_vlab-2017-03-24-12-58-05.log added |
---|
Crash log when I use shared folders
by , 7 years ago
Attachment: | Win7_vlab-2017-03-24-13-26-07.log added |
---|
Crash Log when I didn't use shared folders
comment:4 by , 7 years ago
priority: | critical → major |
---|
I wonder why do you run a debug build of VBox. Assertions in debug builds could be triggered and crash the VirtualBox process.
I guess that in the shared folders case RTDirReadEx returns a different 'rc' on FreeBSD host. It would be very helpful if you could find out what is the 'rc' value when the assert happens.
Audio code is being worked on and it is expected that it can assert in some cases.
comment:5 by , 7 years ago
priority: | major → minor |
---|
comment:6 by , 7 years ago
Une, to make it clear: Your original attempt to use a DEBUG build to find the reason for the crash in the release build was a good idea. There was definitely a problem in 5.1.16 which was fixed in 5.1.18. Then, the assertion you see with 5.1.18 is not a real problem, as sunlover wrote in comment:53. If you can provide the additional information sunlover asked for we will try to fix the problem. Unfortunately we don't have much time to support FreeBSD hosts, therefore we didn't see the problem -- and it might not be a real problem at all. Just try a release build and it shouldn't crash.
comment:7 by , 7 years ago
Thank you for your advice. I'm convinced that the filenames which contains invalid Japanese characters caused this problem.
I inspected the value of rc returned by RTDirReadEx using the core dump file. As sunlover wrote, this value made the failure of assertion at line 114 of vbsfpath.cpp. However the value of rc was -58, which is equal to VERR_NO_TRANSLATION (corresponding to EILSEQ on FreeBSD) and used the following if statement. To confirm that the character encoding caused this trouble, I configured to use the directory whose name doesn't contain any Japanese character as the shared folder. This configuration didn't make any trouble.
And then, I recalled that there were invalid filenames in my home directory which I'd like to use as the shared folder. I use EUC-JP character encoding for filenames on my host OS, however, the invalid filenames are consist of UTF-8 encoded characters. This mismatch makes error to convert the encoding of file name and VERR_NO_TRANSLATION as the value of rc. I eliminated those invalid files and configured to use my home directory as the shared folder, it worked fine. In the previous operations, I used debug build of VirtualBox to obtain stack trace.
The failure by audio code didn't occurred. I will inform if it happens. I sincerely thank you for your responses again.
by , 7 years ago
Attachment: | VirtualBox_dbg.txt added |
---|
The stack trace of core dump when VBox crashed by accessing shared folder
comment:8 by , 7 years ago
I forgot to mention in previous message. IMHO, AssertFailed at line 114 should be after the following 'if' statement as following:
if ( rc == VERR_NO_TRANSLATION || rc == VERR_INVALID_UTF8_ENCODING) continue; AssertFailed();
As I read source files in VirtualBox repository (https://www.virtualbox.org/browser/vbox/trunk#src/VBox/HostServices/SharedFolders), the original author of this code seems to have decided to ignore filenames which cause 'rc == VERR_NO_TRANSLATION' by RTDirReadEx (at least 9 years ago). If so, I think that AssertFailed should detect other value of rc.
comment:9 by , 7 years ago
Une, thanks for the information. I think that you are right and the assert can be moved.
Here is the change, which I committed to the repository:
{ - AssertFailed(); if ( rc == VERR_NO_TRANSLATION || rc == VERR_INVALID_UTF8_ENCODING) continue; + AssertMsgFailed(("%Rrc\n", rc)); break; }
comment:10 by , 7 years ago
Sunlover,
Thank you for your quick response and append the assertion with clear log message.
The entire log when VirtualBox crash