facebook / facebook/hhvm

Reentry-> deadlock on Repo initialization failure

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

Description

### HHVM Version
3.24.6. Not present on 3.23.*.

### Operating System and Version
Ubunutu 16.x derivative

### Standalone code, or other way to reproduce the problem
We don't have an easy repro, but our production deamon that spins up several XBox threads and runs on a mutable source tree for a long time occasionally deadlocks in a stack trace that looks like:

https://gist.github.com/kmaslack/1f5b8b38aeae052262bf30ef97f8d3b8

The only important parts of that stack trace for this discussion are frame 16 (`HPHP::Unit::getLineNumber(int)`), frames 10 & 11 (`assert_fail` called from the `fail_no_repo` lambda in `HPHP::Repo::initCentral`), and frame 1 (`HPHP::Unit::getLineNumber(int)` again). Once in this state the thread grinds to a halt, as do all other threads as they eventually try to access the repo.

### Expected result

Continued execution.

### Actual result

Deadlock.

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.