Last modified: 2014-06-23 22:50:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64788, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62788 - hhvm Jenkins job fill up /tmp with perf-*.map files
hhvm Jenkins job fill up /tmp with perf-*.map files
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-18 16:00 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-06-23 22:50 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2014-03-18 16:00:27 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.
Comment 1 Krinkle 2014-03-18 16:59:21 UTC
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.
Comment 2 Antoine "hashar" Musso (WMF) 2014-04-07 12:16:04 UTC
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.
Comment 3 Max Semenik 2014-04-10 10:02:07 UTC
We can't disable perf maps because they're required for stack trace translation, so we just need to GC then.
Comment 4 Antoine "hashar" Musso (WMF) 2014-04-10 15:44:56 UTC
(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.
Comment 5 Max Semenik 2014-04-10 16:04:03 UTC
Sure, but it's either that or stacktraces.
Comment 6 Antoine "hashar" Musso (WMF) 2014-05-19 15:28:52 UTC
Pinged Ori about this bug so it can be talked about during the weekly hiphop check in.
Comment 7 Ori Livneh 2014-05-27 09:07:46 UTC
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
Comment 8 Gerrit Notification Bot 2014-05-27 12:24:55 UTC
Change 135557 had a related patch set uploaded by Hashar:
HHVM disable stacktraces

https://gerrit.wikimedia.org/r/135557
Comment 9 Gerrit Notification Bot 2014-05-27 12:25:16 UTC
Change 135557 merged by jenkins-bot:
HHVM disable stacktraces

https://gerrit.wikimedia.org/r/135557
Comment 10 Antoine "hashar" Musso (WMF) 2014-05-27 12:27:47 UTC
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 :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links