VirtualBox

Opened 8 years ago

Last modified 6 years ago

#15897 new defect

Symfony clearing cache fails when done through shared folder (rmdir fails)

Reported by: MicWit Owned by:
Component: shared folders Version: VirtualBox 5.1.4
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

I have opened a bug on the Symfony bug tracker (https://github.com/symfony/symfony/issues/19851), however, I believe this is an issue between Linux and Windows with a shared folder.

I am using RHEL7 on the guest machine and windows 8 on the host. The /var/www/ dir is a mount of a shared folder on the windows machine (a Virtual Box share). I have installed Symfony on the guest, so its files are done through the share (I can browse them on the host).

Everything seems to run fine except clearing of cache. This fails saying that there are files in the dir that it is trying to run an rmdir on:

(Failed to remove directory "/var/www/html/tut1/var/cache/pro~/twig": rmdir(/var/www/html/tut1/var/cache/pro~/twig): Directory not empty.)

Looking in windows, I can see that there are a bunch of files still showing there, however, when I try list (dir, ll and a bunch of other options attempted), it shows no files. Yet if I try to do an rm -R on the dir:

rm -R /var/www/html/tut1/var/cache/pro~/twig/

it says that it can't:

rm: cannot remove ‘/var/www/html/tut1/var/cache/pro~/twig/’: Directory not empty

If I remount the /var/www/ mount (or reboot the guest), the files all show and I can run the rm command without any issues.

It's like in the Symfony script it is sending the unlink command that is being reported as successful even though on the host the files are not deleted.

I will attach an strace log if that is of any help. The main lines I looked at are copied into the Symfony bug report.

If you want to replicate this, install with a linux guest, windows host and install and run Symfony on it. Browse to a prod page (go to /project-name/web/app.php) and then clear the cache with the following command:

php bin/console cache:clear --env=prod

if you then delete the /project-name/var/cashe/pro~ dir and try that command again (or remount the share) it will work.

Attachments (1)

cache_clear.zip (162.2 KB ) - added by MicWit 8 years ago.
strace log of clear cache command

Download all attachments as: .zip

Change History (3)

by MicWit, 8 years ago

Attachment: cache_clear.zip added

strace log of clear cache command

comment:1 by MicWit, 8 years ago

The output of the 'mount' command for this mount is:

wwwshare on /var/www type vboxsf (rw,nodev,relatime)

I also did a 'lsof +D /var/www' before the cache clear and it shows no open files.

comment:2 by Marijn, 6 years ago

The problem still exists in VirtualBox 5.2.8. Seems to be the same as #8761 and #15149

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use