Last modified: 2014-06-23 22:50:38 UTC
The Jenkins job running MediaWiki core unit tests under hhvm produces files such as /tmp/perf-\d+.map which are filling out /tmp on the Jenkins slaves. Looking at hhvm source code, the path is hardcoded: $ git grep /tmp.*map hphp/runtime/vm/debug/debug.cpp: "/tmp/perf-%d.map", getpid()); hphp/runtime/vm/debug/debug.h: * Stuff to output symbol names to /tmp/perf-%d.map files. This stuff hphp/util/stack-trace.cpp: "/tmp/perf-%d.map", getpid()); $ We would need a configuration setting to either disable the performance map or have them written to a configurable directory.
Alternatively, or in addition, can we have /tmp be part of /mnt (part of instance storage, we control) or /tmpfs (part of memory, we control) instead of the fixed 9GB / disk which we don't have any control over it seems. Either way, it should be garbage collected. Or maybe even disable the perf maps entirely, do we actually use them for anything? It seems a debug feature that is probably not enabled by default (wouldn't make sense in production to produce 30M files for every PHP process...). We can't use them as long as they're not tied to build anyway, so right now they're just useless afaics.
Apparently the file is supposed to be deleted by hhvm, it might not cleanup when it crashes though. The hardcoded settings are: hphp/runtime/base/runtime-option.h: F(bool, PerfPidMap, true) hphp/runtime/base/runtime-option.h: F(bool, KeepPerfPidMap, false) That should get rid of the file as per hphp/runtime/vm/debug/debug.cpp: if (!RuntimeOption::EvalKeepPerfPidMap) { unlink(m_perfMapName); } Maybe we can just disable the debugger entirely.
We can't disable perf maps because they're required for stack trace translation, so we just need to GC then.
(In reply to Max Semenik from comment #3) > We can't disable perf maps because they're required for stack trace > translation, so we just need to GC then. I don't think it is acceptable to have up to 5MB generated every time we throw an exception. hphp/runtime/base/runtime-option.h: F(bool, PerfPidMap, true) Suggests that it can be disabled entirely though that is hardcoded.
Sure, but it's either that or stacktraces.
Pinged Ori about this bug so it can be talked about during the weekly hiphop check in.
We don't need the stacktraces for Jenkins, so just add the following to /etc/config.hdf: Eval { PerfPidMap=false } Or invoke HHVM with hhvm -vEval.PerfPidMap=false
Change 135557 had a related patch set uploaded by Hashar: HHVM disable stacktraces https://gerrit.wikimedia.org/r/135557
Change 135557 merged by jenkins-bot: HHVM disable stacktraces https://gerrit.wikimedia.org/r/135557
Thanks Ori. I have adjusted the shell wrapper to pass -vEval.PerfPidMap=false as suggested. Cleaned up /tmp on both integration-slave1001.eqiad.wmflabs and integration-slave1002.eqiad.wmflabs. We will see what happens :)