VirtualBox

Ticket #8761 (new defect)

Opened 3 years ago

Last modified 3 months ago

Silent failure to delete files on Shared Folders

Reported by: macrovita-erw Owned by:
Priority: major Component: shared folders
Version: VirtualBox 4.0.6 Keywords:
Cc: Guest type: Linux
Host type: Windows

Description

When running bonnie++ bechmark on Linux guest (Fedora 14) in a shared folder under Windows XP host, the benchmark fails due to "directory not empty" at the end.

The benchmark creates thousands of small files, and then deletes them. The problem is that after all deletions are done (and no error is reported), the benchmark directory is not empty.

Running the same benchmark on the same guest, but on a Linux native folder (VDI disk), the benchmark runs OK. No files left over.

VirtualBox 4.0.6 (the problem also occurred on VirtualBox 4.0.4, I just hadn't reported it yet, sorry)
Host: Windows XP Professional SP3
Guest: Fedora 14 kernel 2.6.35.11-83.fc14.i686
bonnie++-1.96-1.fc13.i686

Terminal session:

# cd /media/sf_some_shared_folder
# bonnie++ -u root -n 3 -s 0
Using uid:0, gid:0.
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...Bonnie: drastic I/O error (rmdir): Directory not empty
Cleaning up test directory after error.
# ls
Bonnie.1733
# ls Bonnie.1733/ | wc -l
1106
# for i in `seq 1 5`; do bonnie++ -u root -n 3 -s 0; done
Using uid:0, gid:0.
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...Bonnie: drastic I/O error (rmdir): Directory not empty
Cleaning up test directory after error.
...[snip, cut 4x repeated output]...
# for dir in `ls -d Bonnie*`; do \
    echo -n "files left over in $dir: "; \
    ls $dir | wc -l; done
files left over in Bonnie.1733: 1106
files left over in Bonnie.1743: 1111
files left over in Bonnie.1744: 1102
files left over in Bonnie.1745: 1102
files left over in Bonnie.1746: 1102
files left over in Bonnie.1747: 1108
# rm -rf Bonnie.*
# ls

Notes:

  • bonnie++ option [-n 3] creates 3 * 1024 files
  • The command [rm -rf Bonnie.*] successfully deletes all left over files. That said, as stated above the benchmark runs OK on native Linux guest disk instead of shared folder, so it seems the problem is not in bonnie++ code.
  • There's no error / no message appearing at VBox.log for the running VM right before, during or after the benchmark. See attached file VBox-20110421-1939.log.

BTM3505 (self reference, please ignore)

Attachments

VBox-20110421-1939.log Download (91.5 KB) - added by macrovita-erw 3 years ago.

Change History

Changed 3 years ago by macrovita-erw

comment:1 Changed 2 years ago by frankieandshadow

I think I have what is probably the same problem in a different guise.

I am deleting (from a script) a folder on a SHARED DRIVE (host Windows 7, guest Debian) of some moderately large and many files in a tree three levels deep, with "rm -r path". It randomly gives errors 'rm: cannot remove '<intermediate directory>': Directory not empty' and because of that ultimately fails to delete the top level folder. I think it is trying to do the delete on the directory, but the recursive delete on the contents has not completed.

I think there is a similar situation that mv on a large-ish directory on a shared folder completes some time after the mv returns.

comment:2 Changed 23 months ago by nickblah

I believe I'm also seeing the same issue with a shared folder. OS X Lion Host, CentOS 6.2 guest. Basically recursive deletes seem to fail if the directory has enough contents. Even though "rm" reports having deleted certain files, they still remain on the shared folder file system, so deleting the parent folder fails. Repeated recursive delete commands will eventually delete the whole folder, but that's not ideal and not very practical when using 3rd party tools that expect recursive deletes to work the first time.

Here's an example using PHP PEAR's Pyrus installer:

$ php pyrus.phar ./vendor/pear install pear/Auth
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /vagrant_sites/my_site/main/releases/main/vendor/pear
Downloading pear.php.net/Auth
Mime-type: application/octet-stream
Pyrus\AtomicFileTransaction\MultiException: Warning: not all backup directories have been removed====>] 100% (54/54 kb)
 Pyrus\IOException: Unable to fully remove /vagrant_sites/my_site/main/releases/main/vendor/pear/.old-php
  Pyrus\IOException: Unable to fully remove /vagrant_sites/my_site/main/releases/main/vendor/pear/.old-data
   Pyrus\IOException: Unable to fully remove /vagrant_sites/my_site/main/releases/main/vendor/pear/.old-docs
    Pyrus\IOException: Unable to fully remove /vagrant_sites/my_site/main/releases/main/vendor/pear/.old-tests

If I then manually delete the ".old-*" directories it's complaining about, the following happens:

$ rm -Rv vendor/pear/.old-*
removed `vendor/pear/.old-data/MDB2/LICENSE'
rm: cannot remove `vendor/pear/.old-data/MDB2': Directory not empty
removed `vendor/pear/.old-data/MDB2_Driver_oci8/package_oci8.xml'
rm: cannot remove `vendor/pear/.old-data/MDB2_Driver_oci8': Directory not empty
removed `vendor/pear/.old-data/PEAR/package.dtd'
removed `vendor/pear/.old-data/PEAR/template.spec'
rm: cannot remove `vendor/pear/.old-data/PEAR': Directory not empty
removed `vendor/pear/.old-data/Structures_Graph/LICENSE'
removed directory: `vendor/pear/.old-data/Structures_Graph'
removed `vendor/pear/.old-docs/Archive_Tar/docs/Archive_Tar.txt'
removed directory: `vendor/pear/.old-docs/Archive_Tar/docs'
rm: cannot remove `vendor/pear/.old-docs/Archive_Tar': Directory not empty
removed `vendor/pear/.old-docs/MDB2/docs/CONTRIBUTORS'
removed `vendor/pear/.old-docs/MDB2/docs/datatypes.html'
removed `vendor/pear/.old-docs/MDB2/docs/examples/example.php'
removed `vendor/pear/.old-docs/MDB2/docs/examples/example_php5.php'
removed `vendor/pear/.old-docs/MDB2/docs/examples/metapear_test_db.schema'
removed directory: `vendor/pear/.old-docs/MDB2/docs/examples'
removed `vendor/pear/.old-docs/MDB2/docs/MAINTAINERS'
removed `vendor/pear/.old-docs/MDB2/docs/README'
removed `vendor/pear/.old-docs/MDB2/docs/STATUS'
removed `vendor/pear/.old-docs/MDB2/docs/TODO'
removed directory: `vendor/pear/.old-docs/MDB2/docs'
rm: cannot remove `vendor/pear/.old-docs/MDB2': Directory not empty
removed `vendor/pear/.old-docs/PEAR/INSTALL'
removed `vendor/pear/.old-docs/PEAR/LICENSE'
removed `vendor/pear/.old-docs/PEAR/README'
rm: cannot remove `vendor/pear/.old-docs/PEAR': Directory not empty
removed `vendor/pear/.old-docs/Structures_Graph/docs/generate.sh'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/classtrees_Structures_Graph.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/elementindex.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/elementindex_Structures_Graph.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/errors.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/index.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/li_Structures_Graph.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/media/banner.css'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/media/stylesheet.css'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs/html/media'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/packages.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Node_php.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_php.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Node.html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs/html/Structures_Graph'
removed `vendor/pear/.old-docs/Structures_Graph/docs/html/todolist.html'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs/html'
removed `vendor/pear/.old-docs/Structures_Graph/docs/tutorials/Structures_Graph/Structures_Graph.pkg'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs/tutorials/Structures_Graph'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs/tutorials'
removed directory: `vendor/pear/.old-docs/Structures_Graph/docs'
rm: cannot remove `vendor/pear/.old-docs/Structures_Graph': Directory not empty
removed `vendor/pear/.old-docs/XML_Util/XML/examples/example.php'
removed `vendor/pear/.old-docs/XML_Util/XML/examples/example2.php'
removed directory: `vendor/pear/.old-docs/XML_Util/XML/examples'
removed directory: `vendor/pear/.old-docs/XML_Util/XML'
removed directory: `vendor/pear/.old-docs/XML_Util'
removed `vendor/pear/.old-php/Archive/Tar.php'
rm: cannot remove `vendor/pear/.old-php/Archive': Directory not empty
removed `vendor/pear/.old-php/Console/Getopt.php'
rm: cannot remove `vendor/pear/.old-php/Console': Directory not empty
removed `vendor/pear/.old-php/MDB2/Date.php'
removed `vendor/pear/.old-php/MDB2/Driver/Datatype/Common.php'
removed `vendor/pear/.old-php/MDB2/Driver/Datatype/oci8.php'
removed directory: `vendor/pear/.old-php/MDB2/Driver/Datatype'
removed `vendor/pear/.old-php/MDB2/Driver/Function/Common.php'
removed `vendor/pear/.old-php/MDB2/Driver/Function/oci8.php'
removed directory: `vendor/pear/.old-php/MDB2/Driver/Function'
removed `vendor/pear/.old-php/MDB2/Driver/Manager/Common.php'
removed `vendor/pear/.old-php/MDB2/Driver/Manager/oci8.php'
removed directory: `vendor/pear/.old-php/MDB2/Driver/Manager'
removed `vendor/pear/.old-php/MDB2/Driver/Native/Common.php'
removed `vendor/pear/.old-php/MDB2/Driver/Native/oci8.php'
removed directory: `vendor/pear/.old-php/MDB2/Driver/Native'
removed `vendor/pear/.old-php/MDB2/Driver/oci8.php'
removed `vendor/pear/.old-php/MDB2/Driver/Reverse/Common.php'
removed `vendor/pear/.old-php/MDB2/Driver/Reverse/oci8.php'
removed directory: `vendor/pear/.old-php/MDB2/Driver/Reverse'
removed directory: `vendor/pear/.old-php/MDB2/Driver'
removed `vendor/pear/.old-php/MDB2/Extended.php'
removed `vendor/pear/.old-php/MDB2/Iterator.php'
removed `vendor/pear/.old-php/MDB2/LOB.php'
rm: cannot remove `vendor/pear/.old-php/MDB2': Directory not empty
removed `vendor/pear/.old-php/MDB2.php'
removed `vendor/pear/.old-php/OS/Guess.php'
rm: cannot remove `vendor/pear/.old-php/OS': Directory not empty
removed `vendor/pear/.old-php/PEAR/Autoloader.php'
removed `vendor/pear/.old-php/PEAR/Builder.php'
removed `vendor/pear/.old-php/PEAR/ChannelFile/Parser.php'
removed directory: `vendor/pear/.old-php/PEAR/ChannelFile'
removed `vendor/pear/.old-php/PEAR/ChannelFile.php'
removed `vendor/pear/.old-php/PEAR/Command/Auth.php'
removed `vendor/pear/.old-php/PEAR/Command/Auth.xml'
removed `vendor/pear/.old-php/PEAR/Command/Build.php'
removed `vendor/pear/.old-php/PEAR/Command/Build.xml'
removed `vendor/pear/.old-php/PEAR/Command/Channels.php'
removed `vendor/pear/.old-php/PEAR/Command/Channels.xml'
removed `vendor/pear/.old-php/PEAR/Command/Common.php'
removed `vendor/pear/.old-php/PEAR/Command/Config.php'
removed `vendor/pear/.old-php/PEAR/Command/Config.xml'
removed `vendor/pear/.old-php/PEAR/Command/Install.php'
removed `vendor/pear/.old-php/PEAR/Command/Install.xml'
removed `vendor/pear/.old-php/PEAR/Command/Mirror.php'
removed `vendor/pear/.old-php/PEAR/Command/Mirror.xml'
removed `vendor/pear/.old-php/PEAR/Command/Package.php'
removed `vendor/pear/.old-php/PEAR/Command/Package.xml'
removed `vendor/pear/.old-php/PEAR/Command/Pickle.php'
removed `vendor/pear/.old-php/PEAR/Command/Pickle.xml'
removed `vendor/pear/.old-php/PEAR/Command/Registry.php'
removed `vendor/pear/.old-php/PEAR/Command/Registry.xml'
removed `vendor/pear/.old-php/PEAR/Command/Remote.php'
removed `vendor/pear/.old-php/PEAR/Command/Remote.xml'
removed `vendor/pear/.old-php/PEAR/Command/Test.php'
removed `vendor/pear/.old-php/PEAR/Command/Test.xml'
removed directory: `vendor/pear/.old-php/PEAR/Command'
removed `vendor/pear/.old-php/PEAR/Command.php'
removed `vendor/pear/.old-php/PEAR/Common.php'
removed `vendor/pear/.old-php/PEAR/Config.php'
removed `vendor/pear/.old-php/PEAR/Dependency2.php'
removed `vendor/pear/.old-php/PEAR/DependencyDB.php'
removed `vendor/pear/.old-php/PEAR/Downloader/Package.php'
removed directory: `vendor/pear/.old-php/PEAR/Downloader'
removed `vendor/pear/.old-php/PEAR/Downloader.php'
removed `vendor/pear/.old-php/PEAR/ErrorStack.php'
removed `vendor/pear/.old-php/PEAR/Exception.php'
removed `vendor/pear/.old-php/PEAR/FixPHP5PEARWarnings.php'
removed `vendor/pear/.old-php/PEAR/Frontend/CLI.php'
removed directory: `vendor/pear/.old-php/PEAR/Frontend'
removed `vendor/pear/.old-php/PEAR/Frontend.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Cfg.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Cfg.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Common.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Data.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Data.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Doc.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Doc.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Ext.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Ext.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Php.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Php.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Script.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Script.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Src.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Src.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Test.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Test.xml'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Www.php'
removed `vendor/pear/.old-php/PEAR/Installer/Role/Www.xml'
removed directory: `vendor/pear/.old-php/PEAR/Installer/Role'
removed `vendor/pear/.old-php/PEAR/Installer/Role.php'
removed directory: `vendor/pear/.old-php/PEAR/Installer'
removed `vendor/pear/.old-php/PEAR/Installer.php'
removed `vendor/pear/.old-php/PEAR/PackageFile/Generator/v1.php'
removed `vendor/pear/.old-php/PEAR/PackageFile/Generator/v2.php'
removed directory: `vendor/pear/.old-php/PEAR/PackageFile/Generator'
removed `vendor/pear/.old-php/PEAR/PackageFile/Parser/v1.php'
removed `vendor/pear/.old-php/PEAR/PackageFile/Parser/v2.php'
removed directory: `vendor/pear/.old-php/PEAR/PackageFile/Parser'
removed `vendor/pear/.old-php/PEAR/PackageFile/v1.php'
removed `vendor/pear/.old-php/PEAR/PackageFile/v2/rw.php'
removed `vendor/pear/.old-php/PEAR/PackageFile/v2/Validator.php'
removed directory: `vendor/pear/.old-php/PEAR/PackageFile/v2'
removed `vendor/pear/.old-php/PEAR/PackageFile/v2.php'
removed directory: `vendor/pear/.old-php/PEAR/PackageFile'
removed `vendor/pear/.old-php/PEAR/PackageFile.php'
removed `vendor/pear/.old-php/PEAR/Packager.php'
removed `vendor/pear/.old-php/PEAR/Registry.php'
removed `vendor/pear/.old-php/PEAR/REST/10.php'
removed `vendor/pear/.old-php/PEAR/REST/11.php'
removed `vendor/pear/.old-php/PEAR/REST/13.php'
removed directory: `vendor/pear/.old-php/PEAR/REST'
removed `vendor/pear/.old-php/PEAR/REST.php'
removed `vendor/pear/.old-php/PEAR/RunTest.php'
removed `vendor/pear/.old-php/PEAR/Task/Common.php'
removed `vendor/pear/.old-php/PEAR/Task/Postinstallscript/rw.php'
removed directory: `vendor/pear/.old-php/PEAR/Task/Postinstallscript'
removed `vendor/pear/.old-php/PEAR/Task/Postinstallscript.php'
removed `vendor/pear/.old-php/PEAR/Task/Replace/rw.php'
removed directory: `vendor/pear/.old-php/PEAR/Task/Replace'
removed `vendor/pear/.old-php/PEAR/Task/Replace.php'
removed `vendor/pear/.old-php/PEAR/Task/Unixeol/rw.php'
removed directory: `vendor/pear/.old-php/PEAR/Task/Unixeol'
removed `vendor/pear/.old-php/PEAR/Task/Unixeol.php'
removed `vendor/pear/.old-php/PEAR/Task/Windowseol/rw.php'
removed directory: `vendor/pear/.old-php/PEAR/Task/Windowseol'
removed `vendor/pear/.old-php/PEAR/Task/Windowseol.php'
removed directory: `vendor/pear/.old-php/PEAR/Task'
removed `vendor/pear/.old-php/PEAR/Validate.php'
removed `vendor/pear/.old-php/PEAR/Validator/PECL.php'
removed directory: `vendor/pear/.old-php/PEAR/Validator'
removed `vendor/pear/.old-php/PEAR/XMLParser.php'
rm: cannot remove `vendor/pear/.old-php/PEAR': Directory not empty
removed `vendor/pear/.old-php/PEAR.php'
removed `vendor/pear/.old-php/PEAR5.php'
removed `vendor/pear/.old-php/pearcmd.php'
removed `vendor/pear/.old-php/peclcmd.php'
removed `vendor/pear/.old-php/Structures/Graph/Manipulator/AcyclicTest.php'
removed `vendor/pear/.old-php/Structures/Graph/Manipulator/TopologicalSorter.php'
removed directory: `vendor/pear/.old-php/Structures/Graph/Manipulator'
removed `vendor/pear/.old-php/Structures/Graph/Node.php'
removed directory: `vendor/pear/.old-php/Structures/Graph'
removed `vendor/pear/.old-php/Structures/Graph.php'
rm: cannot remove `vendor/pear/.old-php/Structures': Directory not empty
removed `vendor/pear/.old-php/System.php'
removed `vendor/pear/.old-php/XML/Util.php'
removed directory: `vendor/pear/.old-php/XML'
removed `vendor/pear/.old-tests/MDB2/tests/basic.phpt'
removed `vendor/pear/.old-tests/MDB2/tests/clitest.php'
removed `vendor/pear/.old-tests/MDB2/tests/config.php'
removed `vendor/pear/.old-tests/MDB2/tests/Console_TestListener.php'
removed `vendor/pear/.old-tests/MDB2/tests/driver_test.schema.xml'
removed `vendor/pear/.old-tests/MDB2/tests/HTML_TestListener.php'
removed `vendor/pear/.old-tests/MDB2/tests/import.schema.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_api_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_bugs_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_Connect_Test.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_datatype_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_extended_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_function_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_internals_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_manager_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_native_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_ibase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_mssql.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_mysql.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_mysqli.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_oci8.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_pgsql.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_nonstandard_sqlite.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_reverse_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/MDB2_usage_testcase.php'
removed `vendor/pear/.old-tests/MDB2/tests/README'
removed `vendor/pear/.old-tests/MDB2/tests/test.php'
removed `vendor/pear/.old-tests/MDB2/tests/test_setup.php.dist'
removed `vendor/pear/.old-tests/MDB2/tests/testchoose.php'
removed `vendor/pear/.old-tests/MDB2/tests/tests.css'
removed `vendor/pear/.old-tests/MDB2/tests/testUtils.php'
removed directory: `vendor/pear/.old-tests/MDB2/tests'
rm: cannot remove `vendor/pear/.old-tests/MDB2': Directory not empty
removed `vendor/pear/.old-tests/MDB2_Driver_oci8/tests/MDB2_nonstandard_oci8.php'
removed directory: `vendor/pear/.old-tests/MDB2_Driver_oci8/tests'
rm: cannot remove `vendor/pear/.old-tests/MDB2_Driver_oci8': Directory not empty
removed `vendor/pear/.old-tests/Structures_Graph/tests/AllTests.php'
removed `vendor/pear/.old-tests/Structures_Graph/tests/testCase/BasicGraph.php'
removed directory: `vendor/pear/.old-tests/Structures_Graph/tests/testCase'
removed directory: `vendor/pear/.old-tests/Structures_Graph/tests'
rm: cannot remove `vendor/pear/.old-tests/Structures_Graph': Directory not empty
removed `vendor/pear/.old-tests/XML_Util/XML/tests/AllTests.php'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_apiVersion.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_attributesToString.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_collapseEmptyTags.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createCDataSection.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createComment.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createEndElement.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createStartElement.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createTag.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_createTagFromArray.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_getDocTypeDeclaration.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_getXmlDeclaration.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_isValidName.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_raiseError.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_replaceEntities.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_reverseEntities.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBasic_splitQualifiedName.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBug_4950.phpt'
removed `vendor/pear/.old-tests/XML_Util/XML/tests/testBug_5392.phpt'
removed directory: `vendor/pear/.old-tests/XML_Util/XML/tests'
removed directory: `vendor/pear/.old-tests/XML_Util/XML'
removed directory: `vendor/pear/.old-tests/XML_Util'

As an example of a failed delete, note in that output these lines:

removed `vendor/pear/.old-tests/MDB2_Driver_oci8/tests/MDB2_nonstandard_oci8.php'
removed directory: `vendor/pear/.old-tests/MDB2_Driver_oci8/tests'
rm: cannot remove `vendor/pear/.old-tests/MDB2_Driver_oci8': Directory not empty

But if I check that directory, MDB2_nonstandard_oci8.php and the tests directory still remain on disk, despite rm thinkinging it had successfully deleted them:

$ ls -l vendor/pear/.old-tests/MDB2_Driver_oci8/
total 0
drwxrwxrwx. 1 vagrant vagrant 102 Jun  2 09:32 tests
[vagrant@my_site main]$ ls -l vendor/pear/.old-tests/MDB2_Driver_oci8/tests/
total 8
-rwxrwxrwx. 1 vagrant vagrant 4457 Jun  2 09:32 MDB2_nonstandard_oci8.php

Using the force -f parameter on rm doesn't seem to make any difference. But like I said, after running the recursive delete command 1 or 2 more times all the files and folder will eventually get deleted and it will succeed.

Version 0, edited 23 months ago by nickblah (next)

comment:3 Changed 14 months ago by pixeltreiber

I have the same Problem here when deleting the cache of a Symfony2 Application. I use a shared folder and try to delete the cache in the guest. Host: Windows 7 Professional 64Bit

Guest: CentOS 6.3 Linux devel.local 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Virtualbox Version 4.2.6 r82870

comment:4 Changed 14 months ago by snance

I'm having the same issue, specifically using Symfony2's cache:clear (php).

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

# ls /opt/
VBoxGuestAdditions-4.2.8

# app/console cache:clear
Clearing the cache for the dev environment with debug true

  [ErrorException]
  Warning: rmdir(/home/repx/www/app/cache/dev_old/jms_security): Directory not empty in /home/repx/www/vendor/symfony/symfony
  /src/Symfony/Component/Filesystem/Filesystem.php line 133

comment:5 Changed 3 months ago by gregory.0xf0

I'm seeing this same problem under Linux, specifically: Ubuntu 13.04 x86_64.

Guest: CentOS 4.8 (output of uname -a: Linux localhost.localdomain 2.6.9-89.EL #1 Mon Jun 22 12:19:40 EDT 2009 i686 i686 i386 GNU/Linux)

Virtualbox version: 4.2.10_Ubuntur84101

This can be easily reproduced in a shared folder (here in /share) by running the following:

$ mkdir -p /share/blah
$ touch /share/blah/{1..169}
$ rm -rf /share/blah  
rm: cannot remove directory `/share/blah': Directory not empty
$ ls -ln /share/blah                                                          
total 0
-rw-rw-r--  1 500 501 0 Jan  6 18:04 113

I can consistently reproduce this when attempting to delete the folder with >=169 items and it appear to never happen with <169 items. The file left is always "113" when 169 items are created.

Running mkdir -p /share/blah && touch /share/blah/{1..169} && strace rm -rf /share/blah contains an unlink() call for every file except 113. It looks like some unlink calls are being dropped when working with shared folders that contain larger than 168 entries for some reason...

Last edited 3 months ago by gregory.0xf0 (previous) (diff)

comment:6 Changed 3 months ago by kburtch

Problem still exists in VirtualBox 4.3.4.

Host is Solaris 11.1 on an Oracle X3-2 (SUN FIRE X4170 M3).

Client is Red Hat Enterprise Linux Server release 6.4 (Santiago).

[kburtch@testbox ~]$ bonnie++ -d /media/sf_hostshare/
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...Bonnie: drastic I/O error (rmdir): File exists
Cleaning up test directory after error.

This is repeatable (I've yet to get bonnie++ to complete when writing to the shared folder).

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use