Commit Graph
8 Commits
Author SHA1 Message Date
Mike Shal f7e8c5d875 Bug 1162594 - create build_resources.json even if psutil fails; r=ahal 2015-06-09 18:22:53 -04:00
Gregory Szorc 31fedb1702 Bug 1116194 - Catch errors calling psutil; r=ted
The build system / mach currently has a very hacky virtualenv setup.
Essentially, it resorts to sys.path munging instead of a proper,
isolated environment.

During initialization, mach installs python/psutil in sys.path. Later
on, some code does an |import psutil|. This fails iff the psutil C
extension can't be found.

If there is a psutil C extension installed outside of mach and
python/psutil, |import psutil| may load it. The version mismatch isn't
detected until an extension-using psutil API is called. This has
manifested inside |mach build| via the resource monitor as an
|AttributeError: 'module' object has no attribute 'linux_sysinfo'|
exception during psutil.virtual_memory().

The proper fix for this is for the Python environment to ensure the
psutil C extension is built before attempting to import and use psutil.
Arguably, psutil itself should perform some kind of version check when
it imports the C extension to ensure things are in sync and fail at
import time.

Fixing mach and the build system Python environment to build psutil
earlier/properly is a long outstanding bug. It needs to be addressed.
But it is considerable effort. This patch continues the long history of
wallpapering over psutil import/run failures because using a proper
virutalenv from mach/build system is a lot of work. Sad panda.
2014-12-29 12:06:21 -08:00
Mike Shal 072024ed72 Bug 1013730 - Have mach ignore broken disk io stats; r=gps
This works around the "RuntimeError: couldn't find any physical disk"
issue on Windows when using 'diskperf -n'
2014-10-01 13:14:58 -04:00
Chris Manchester 4a33d5736b Bug 1035006 - Fix pyflakes warnings in mozbase.;r=wlach 2014-07-07 14:51:34 -04:00
Gregory Szorc 1cde5654ff Bug 907331 - Ability to convert resource usage to a serializable dict; r=ahal 2014-05-23 14:08:04 -07:00
Gregory Szorc 3b92147392 Bug 908296 - Catch all exceptions when importing psutil; r=ted 2013-08-23 10:50:28 -07:00
Gregory Szorc 788c63928e Bug 907797 - Catch NotImplementedError when importing psutil; r=ahal 2013-08-21 09:56:36 -07:00
Gregory Szorc 19bbc83c98 Bug 883205 - Add mozsystemmonitor to mozbase; r=ahal 2013-06-14 15:15:58 -07:00