Hi Prasad, I appreciate this fix. However, I'd like to understand better why SoftwareManager can't be pickled before accepting this fix. It might be that the best solution would be simply revert my SoftwareManager patches, for once.
Will keep you posted on that, Lucas On Fri, Jul 20, 2012 at 12:16 PM, Prasad Joshi <prasadjoshi...@gmail.com> wrote: > root@prasad-autotest-2:/usr/local/autotest/client# cat > 0001-Do-not-pickle-SoftwareManager.patch > From 72fd2c3a81bf60dffd71bcffbc31e8fcaa205dd1 Mon Sep 17 00:00:00 2001 > From: Prasad Joshi <prasadjoshi.li...@gmail.com> > Date: Sat, 21 Jul 2012 01:59:19 +0530 > Subject: [PATCH] Do not pickle SoftwareManager > > The sleeptest on remote CentOS machine resulted in following traceback > > 15:45:31 ERROR| JOB ERROR: Unhandled TypeError: can't pickle file objects > Traceback (most recent call last): > File "/tmp/sysinfo/autoserv-KCmM2V/job.py", line 1165, in step_engine > execfile(self.control, global_control_vars, global_control_vars) > File "/tmp/sysinfo/autoserv-KCmM2V/control.autoserv", line 13, in <module> > pickle.dump(job.sysinfo, open(sysinfo_pickle, 'w')) > File "/usr/lib64/python2.6/pickle.py", line 1362, in dump > Pickler(file, protocol).dump(obj) > File "/usr/lib64/python2.6/pickle.py", line 224, in dump > self.save(obj) > File "/usr/lib64/python2.6/pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "/usr/lib64/python2.6/pickle.py", line 419, in save_reduce > ... > ... > ... > ... > File "/usr/lib64/python2.6/pickle.py", line 306, in save > rv = reduce(self.proto) > File "/usr/lib64/python2.6/copy_reg.py", line 70, in _reduce_ex > raise TypeError, "can't pickle %s objects" % base.__name__ > TypeError: can't pickle file objects > > Marking SoftwareManager as not to pickle solve the problem. > > Signed-off-by: Abhay Chavan <chavan.ab...@gmail.com> > Signed-off-by: Rajshree Thorat <rajashree.thora...@gmail.com> > Signed-off-by: Prasad Joshi <prasadjoshi.li...@gmail.com> > --- > client/base_sysinfo.py | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/client/base_sysinfo.py b/client/base_sysinfo.py > index 8aef38a..9029c77 100644 > --- a/client/base_sysinfo.py > +++ b/client/base_sysinfo.py > @@ -192,6 +192,10 @@ class base_sysinfo(object): > log_in_keyval=True)) > self.sm = software_manager.SoftwareManager() > > + def __getstate__(self): > + ret = dict(self.__dict__) > + ret["sm"] = None > + return ret > > def serialize(self): > return {"boot": self.boot_loggables, "test": self.test_loggables} > -- > 1.7.5.4 > > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest > -- Lucas _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest