Please include the output of
hhvm --versionandhh_client --version
$ hhvm --version
HipHop VM 4.17.1 (rel)
Compiler: 1565219311_680317822
Repo schema: db6d381a92c607fc27aa4545f27800c5143c4b73
For example, 'Debian Squeeze', 'Ubuntu 16.04', 'MacOS High Sierra'. Please
also mention if you are using Docker or similar images.
Reproduced on MacOS Mojave and Ubuntu 16.04, both on HHVM 4.17.1
This should not depend on installing any libraries or frameworks. Ideally, it
should be possible to copy-paste this into a single file and reproduce the
problem by runninghhvmand/orhh_client
<?hh // strict
function foo(): void {
$a = some_function(1 instanceof SomeClass);
}
If applicable, please copy-paste output from
hhvmorhh_client
For more detailed logs, try `tail -f $(hh_client --monitor-logname) $(hh_client --logname)`
Server launched with the following command:
'/usr/local/Cellar/hhvm-4.17/4.17.1/bin/hh_server' '-d' '/tests/sandbox/2019-08-10-1' '--waiting-client' '7'
Spawned typechecker (child pid=3513)
Logs will go to /private/tmp/hh_server/monitor_logs/zStestszSsandboxzS2019-08-10-1-2019-08-10-23-10-17.monitor_log
hh_server is busy: [parsing] -
Not hanging; a bunch of errors about how some_function and SomeClass don't exist, and instanceof is deprecated, etc.
The structure is very specific: it needs to be assigned to a variable, and instanceof needs to be called within a function call. It doesn't matter if the class or function exists.
I didn't write new code like this, but this prevented some of my older code from running after an upgrade to more recent versions because it had old dependencies; in my case, on an old version of HHVM's difflib with this line in it. I had to hunt this error down by binary searching all the Hack files in my project, so it would help greatly just to save the effort to find this error if it didn't cause a hang.
So that was it! I have had a similar issue too. My project has difflib as a far distant third party dependency. After upgrading to 4.17 for _real_ generics, my typechecker would spin forever during parsing. After removing vendor it worked again. I couldn't find out why. I just removed all dependencies and reinstalled only what was needed for my code in src to work. Does hacktest rely on that version of difflib?
@lexidor Ah, I've got to say it's slightly consoling to know I wasn't alone. It's a direct dependency to hhast which is depended on by many others, including hacktest. But, if you just upgrade your packages it should go away because difflib 鈮1.1.1 has changed instanceof over to is.
The infinite loop on instanceof was fixed in https://github.com/facebook/hhvm/commit/1dc83a9480ad6fd00eea049a8d84fe8758f6e7f3.
Fixed in 1dc83a9.
Most helpful comment
The infinite loop on
instanceofwas fixed in https://github.com/facebook/hhvm/commit/1dc83a9480ad6fd00eea049a8d84fe8758f6e7f3.