[LNT] r261531 - Don't add objects to the logger, only strings.
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 08:01:36 PST 2016
Author: kbeyls
Date: Mon Feb 22 10:01:34 2016
New Revision: 261531
URL: http://llvm.org/viewvc/llvm-project?rev=261531&view=rev
Log:
Don't add objects to the logger, only strings.
When objects are added to the logger, the mem_logger apparantly could
retain those. If then the object isn't picklable, during submission of
results, the server could crash with a backtrace like the following, as
a the mem_logger is given to the python multiprocessing manager, which
needs all objects to be picklable.
....
File "/lnt/lnt/util/async_ops.py", line 40, in launch_workers
current_app.config['mem_logger'].buffer =
manager.list(current_app.config['mem_logger'].buffer)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 667, in temp
token, exp = self._create(typeid, *args, **kwds)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 567, in _create
id, exposed = dispatch(conn, None, 'create', (typeid,)+args, kwds)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 101, in dispatch
c.send((id, methodname, args, kwds))
PicklingError: Can't pickle <class 'lnt.server.db.testsuitedb.Run'>:
attribute lookup lnt.server.db.testsuitedb.Run failed
Modified:
lnt/trunk/lnt/server/reporting/analysis.py
Modified: lnt/trunk/lnt/server/reporting/analysis.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=261531&r1=261530&r2=261531&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Mon Feb 22 10:01:34 2016
@@ -338,13 +338,13 @@ class RunInfo(object):
cur_hash_set = set(hash_values)
prev_hash_set = set(prev_hash_values)
if len(cur_hash_set) > 1:
- logger.warning("Found different hashes for multiple samples " +
- "in the same run %r: %r",
- runs, hash_values)
+ logger.warning(("Found different hashes for multiple samples " +
+ "in the same run {0}: {1}").format(
+ runs, hash_values))
if len(prev_hash_set) > 1:
- logger.warning("Found different hashes for multiple samples " +
- "in the same run %r: %r",
- compare_runs, prev_hash_values)
+ logger.warning(("Found different hashes for multiple samples " +
+ "in the same run {0}: {1}").format(
+ compare_runs, prev_hash_values))
cur_hash = hash_values[0] if len(hash_values) > 0 else None
prev_hash = prev_hash_values[0] \
if len(prev_hash_values) > 0 else None
More information about the llvm-commits
mailing list