facebook / facebook/hhvm

Memory leak in CompactTrace::extract

Open
#8,441 0 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
HipHop VM 3.30.2 (rel)
Compiler: 1547606131_793769619
Repo schema: f64db376aeddd959936df38c14d823991dc434d9

$ hh_client --version
hh-fa0e3c70afe06e7b6566bb2b4e3edde95563addc-3.30.2 Tue Jan 15 17:54:19 2019
```
This is running on a in-house built package on RHEL6.

We haven't yet been able to reproduce this memory leak outside of production, but the behavior we observe is that whenever a request comes in that is particularly long-lived, memory usage on the host increases at a very fast and constant rate. Turning jemalloc profiling on and taking periodic heap dumps, we see that all the memory gets sucked up by this path:

![image](https://user-images.githubusercontent.com/70601/52802521-f9ddb500-3034-11e9-92c8-ff1d73bf48c3.png)

Fortunately, its very easy to avoid the offending path by setting `Eval.EnableCompactBacktrace` to false in conf (the memory leak doesn't reappear in prod), but this would've been a showstopper otherwise.

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.