multiple operations launched in concurrent processes fail
miminar opened this issue · 1 comments
miminar commented
I have a test executed against single broker on local system that launches three processes. In 1 of 2 cases, it fails with errors like "Pegasus: Mismatched response message type."
. The weird thing is that the issue does not exhibit once the pywbem library is used instead - with the same version of openlmi-tools
and tog-pegasus
You can find mentioned test in git repository at fedorahosted.
My testing configuration is:
- Fedora rawhide
- openlmi-tools-0.10.2-1.fc22.noarch
- pywbem-0.7.0-27.20131121svn626.fc21.noarch
- tog-pegasus-2.13.0-19.fc22.x86_64
- lmiwbem-0.5.0-2.fc22.x86_64
Here's one example of test run:
test_parallel_install (test_software_installation_job.TestSoftwareInstallationJob) ... Process Process-2:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 797, in _do_test_single_pkg_install
rval, oparms, _ = self.service_op.InstallFromSoftwareIdentity(
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 288, in service_op
self._service_op = self.ns.LMI_SoftwareInstallationService \
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 337, in first_instance
return inst_name.to_instance() if inst_name else None
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 228, in wrapper
return fn(self_wr, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIInstanceName.py", line 560, in to_instance
self._cim_instance_name, LocalOnly=False)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 293, in get_instance
PropertyList=PropertyList))
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 285, in get_instance_core
rval=self._cliconn.GetInstance(path, **kwargs))
CIMError: GetInstance LMI_SoftwareInstallationService: Pegasus: Mismatched response message type.
Process Process-3:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 797, in _do_test_single_pkg_install
rval, oparms, _ = self.service_op.InstallFromSoftwareIdentity(
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 288, in service_op
self._service_op = self.ns.LMI_SoftwareInstallationService \
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 336, in first_instance
inst_name = self.first_instance_name(inst_filter, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 269, in first_instance_name
**kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 226, in get_instance_names
classname, namespace)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 204, in get_instance_names_core
classname, namespace))
CIMError: EnumerateInstanceNames LMI_SoftwareInstallationService: Pegasus: Mismatched response message type.
Process Process-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 797, in _do_test_single_pkg_install
rval, oparms, _ = self.service_op.InstallFromSoftwareIdentity(
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 288, in service_op
self._service_op = self.ns.LMI_SoftwareInstallationService \
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 336, in first_instance
inst_name = self.first_instance_name(inst_filter, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 269, in first_instance_name
**kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 226, in get_instance_names
classname, namespace)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 204, in get_instance_names_core
classname, namespace))
CIMError: EnumerateInstanceNames LMI_SoftwareInstallationService: Pegasus: Connection closed by CIM Server.
FAIL
and another:
test_parallel_install (test_software_installation_job.TestSoftwareInstallationJob) ... Process Process-2:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 797, in _do_test_single_pkg_install
rval, oparms, _ = self.service_op.InstallFromSoftwareIdentity(
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 288, in service_op
self._service_op = self.ns.LMI_SoftwareInstallationService \
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 336, in first_instance
inst_name = self.first_instance_name(inst_filter, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 269, in first_instance_name
**kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 226, in get_instance_names
classname, namespace)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 204, in get_instance_names_core
classname, namespace))
CIMError: EnumerateInstanceNames LMI_SoftwareInstallationService: Pegasus: Mismatched response message type.
Process Process-3:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 797, in _do_test_single_pkg_install
rval, oparms, _ = self.service_op.InstallFromSoftwareIdentity(
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 288, in service_op
self._service_op = self.ns.LMI_SoftwareInstallationService \
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIClass.py", line 337, in first_instance
return inst_name.to_instance() if inst_name else None
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 228, in wrapper
return fn(self_wr, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIInstanceName.py", line 560, in to_instance
self._cim_instance_name, LocalOnly=False)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 293, in get_instance
PropertyList=PropertyList))
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 285, in get_instance_core
rval=self._cliconn.GetInstance(path, **kwargs))
CIMError: GetInstance LMI_SoftwareInstallationService: Pegasus: Mismatched response message type.
Process Process-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/root/workspace/openlmi-providers/src/python/lmi/test/lmibase.py", line 48, in _wrapper
retval = method(*args, **kwargs)
File "/root/workspace/openlmi-providers/src/software/test/test_software_installation_job.py", line 798, in _do_test_single_pkg_install
**input_parameters)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIMethod.py", line 653, in __call__
self._lmi_instance, self._method_name, **method_args)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 508, in call_method
return call_method_core(path, method, **params)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 323, in wrapped
lmi_raise_or_dump_exception(conn_error)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/lmi/shell/LMICIMXMLClient.py", line 504, in call_method_core
rval, rparams = self._cliconn.InvokeMethod(method, path, **params)
ConnectionError: (24, 'InvokeMethod InstallFromSoftwareIdentity: connection timed out')
FAIL
miminar commented
Finally I've found the problem. The existing connection object was duplicated to each process and reused there which caused problems like above. The issue is fixed now in upstream.