-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If php source is invoked when it's being created, HHVM will lost the complete code. #1447
Comments
Thanks for reporting this. inotify notifications should take care of invalidating old units on Linux when files are modified. Are you running on Linux? (Are your source files on NFS where inotify is unsupported by any chance?) |
I'm still not clear on the scenario here. @lokeshhctm: Files are being modified while they are loaded? We definitely don't actively test that scenario. |
I can reproduce this running on Ubuntu 14.04. Wishlist doesn't fit really, its a phpincompatibility |
Will redo when this issue will be fixed facebook/hhvm#1447
cc @AlphaStream |
This bug occurs when file system is ext2. It doesn't occur when file system is ext4. Because ext4 file system has higher file stat time resolution. |
I am going over old issues on this repository, to see which ones apply to the current versions of hhvm. In hhvm 4.67 and above, it is not possible to include a file multiple times. The only constructs that may appear at the top-level are named entities (classes, constants, functions, types, enums, interfaces). If included more than once, this will throw an So in order to include a file more than once, it must have been empty (with the exception of comments / whitespace). If it weren't empty, this would error out on the second include. |
code to reproduce:
$ cat test.php
$ hhvm test.php
$ rm code.php
$ php test.php
When request this test.php in server mode, and then request code.php, you will get an empty response even after a long time, until code.php is modified or hhvm is restarted.
This may happen in actual scene online. For example, there is file a.php at the beginning and do the whole work. After some updates, file b.php is added and included in file a.php . During the online deployment, file a.php is modified first. When file b.php is being created, a request come up and invoke file a.php, that cause HHVM to parse and invoke the incomplete file b.php. After b.php is written completely, HHVM will not reload this file, so the incomplete b.php is always being used.
The text was updated successfully, but these errors were encountered: