facebook / facebook/hhvm

hh_client hangs on OSX, but works if killed and retried

Open
#8,322 10 comments 1 reaction 0 assignees View on GitHub
hack
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

```
hhvm --version
HipHop VM 3.28.1-0-slack (rel)
Compiler: 1536019668_N
Repo schema: 67f5fcde7bddd6a0837c7f2e1ec04a5e6fee91f2
```

### Operating System and Version

MacOS High Sierra, notably this does NOT reproduce on Debian.

### Standalone code, or other way to reproduce the problem

This only reproduces when running `hh_client` on a large repository. Small repositories work fine. Ours is much smaller than FB's www I'm sure, about 2M LOC.

### Actual result

hh_client hangs until it runs out of retries or you ctrl+c it. Subsequent runs of hh_client work just fine, and report the expected result. It takes several minutes to run out of retries, far longer than the 22 seconds the server spends getting ready from these logs.

```
$ hh_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@3.28/3.28.1/bin/hh_server' '-d' '/Users/ssandler/Documents/dev/webapp' '--waiting-client' '5'
Spawned typechecker (child pid=96900)
Logs will go to /private/tmp/hh_server/monitor_logs/zSUserszSssandlerzSDocumentszSdevzSwebapp-2018-09-18-14-15-02.monitor_log
hh_server is busy: [processing] /
Error: Ran out of retries, giving up!

$ cat $(hh_client --monitor-logname)
[2018-09-18 14:15:02.264] Loading config exception: (Sys_error "/usr/local/etc/hh.conf: No such file or directory")
[2018-09-18 14:15:02.264] Could not load config at /usr/local/etc/hh.conf, using defaults
Informant using dummy - resigning
[2018-09-18 14:15:02.331] Starting first server
[2018-09-18 14:15:02.332] About to spawn typechecker daemon. Logs will go to /private/tmp/hh_server/zSUserszSssandlerzSDocumentszSdevzSwebapp.log

[2018-09-18 14:15:02.334] Just started typechecker server with pid: 96902.
[2018-09-18 14:15:03.336] Got default request for typechecker. Prior request 1.0 seconds ago
```

```
$ cat $(hh_client --logname)
[2018-09-18 14:15:02.472] Loading config exception: (Sys_error "/usr/local/etc/hh.conf: No such file or directory")
[2018-09-18 14:15:02.472] Could not load config at /usr/local/etc/hh.conf, using defaults
[2018-09-18 14:15:02.473] Version: hh-d79571c59fd56e173cb616b9df2083a600a1635a-3.28.1 Mon Sep 3 17:08:47 2018
[2018-09-18 14:15:02.473] Hostname: SFO-M-SSANDLER01.local
[2018-09-18 14:15:02.479] Loading config exception: (Sys_error "/usr/local/etc/hh.conf: No such file or directory")
[2018-09-18 14:15:02.479] Could not load config at /usr/local/etc/hh.conf, using defaults
[2018-09-18 14:15:02.492] Initializing Server (This might take some time)
[2018-09-18 14:15:02.493] Init id: kx3Z5lE3DQ
[2018-09-18 14:15:02.493] Initing with approach: Local_config_mini_state_disabled
[2018-09-18 14:15:02.493] Begin Indexing
[2018-09-18 14:15:02.493] Indexing: 0.000002
[2018-09-18 14:15:02.493] Begin Parsing
[2018-09-18 14:15:14.323] Heap size: 129075968
[2018-09-18 14:15:14.323] Parsing: 11.830879
[2018-09-18 14:15:14.357] Updating deps: 0.033804
[2018-09-18 14:15:14.357] Begin Naming
[2018-09-18 14:15:14.488] Heap size: 136360832
[2018-09-18 14:15:14.488] Naming: 0.130369
[2018-09-18 14:15:15.040] Updating 9169 search files:: 0.535844
[2018-09-18 14:15:15.040] Done updating search files
[2018-09-18 14:15:15.045] Dependency table load factor: 0 / 1048576 (0.00)
[2018-09-18 14:15:15.047] Hashtable load factor: 147028 / 1048576 (0.14) with 147028 nonempty slots
[2018-09-18 14:15:15.047] Waiting for daemon(s) to be ready...
[2018-09-18 14:15:15.047] Server is partially ready
[2018-09-18 14:15:15.047] Took 12.554565 seconds.
******************************************
[2018-09-18 14:15:15.047] Check kind: Full_check
[2018-09-18 14:15:15.047] Files to recompute: 0
[2018-09-18 14:15:15.047] Begin Parsing 0 files
[2018-09-18 14:15:15.048] Heap size: 144006656
[2018-09-18 14:15:15.048] Parsing 0 files: 0.000673
[2018-09-18 14:15:15.048] Begin Updating deps
[2018-09-18 14:15:15.048] Updating deps: 0.000020
[2018-09-18 14:15:15.048] Begin Naming
[2018-09-18 14:15:15.048] Naming: 0.000020
[2018-09-18 14:15:15.048] Heap size: 144006656
[2018-09-18 14:15:15.048] Determining changes: 0.000508
[2018-09-18 14:15:15.048] Begin Type-decl 0 files
[2018-09-18 14:15:15.049] Heap size: 144006656
[2018-09-18 14:15:15.049] Type-decl 0 files: 0.000477
[2018-09-18 14:15:15.073] Begin Type-check 9168 files
[2018-09-18 14:15:25.313] Type-check 9168 files: 10.263725
[2018-09-18 14:15:25.313] Total: 10.265423

[2018-09-18 14:15:25.314] Dependency table load factor: 469559 / 1048576 (0.45)
[2018-09-18 14:15:25.316] Hashtable load factor: 231057 / 1048576 (0.22) with 231057 nonempty slots
[2018-09-18 14:15:25.316] Heap size: 164081792
[2018-09-18 14:15:25.316] Server is READY
[2018-09-18 14:15:25.316] Took 22.823757 seconds to initialize.
[2018-09-18 14:15:25.317] Recheck id: Fsu3e7g8wo
Error: End_of_file

```

### Expected result

`hh_client` will detect when the server is ready and report results.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.