Mongo serializaion can fail
The exception instance WorkflowExceptionInstance
is added in PythonActor.errorHandler
by !70 (merged) to solve #20 (closed).
This might be the cause of the following error (reported by @svensson )
bson.errors.InvalidDocument: cannot encode object: RuntimeError("Task 'Check move of phi' failed"), of type: <class 'RuntimeError'>
2024-01-30 16:56:37,207 DEBUG [TroubleShooting] Thread ended for 'Name mapper <Check move of phi -only on error- CommonErrorReporter/Log error message>' (1 threads running)
2024-01-30 16:56:37,209 ERROR [TroubleShooting] [<EwoksPythonActor> Check move of phi] In errorHandler for 'Check move of phi'
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/ewokscore/task.py", line 401, in execute
self.run()
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/ewokscore/ppftasks.py", line 30, in run
result = method(**method_kwargs)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/bes/src/bes/actors/checkMoveOfPhi.py", line 39, in run
print(1/0)
ZeroDivisionError: division by zero
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/concurrent/futures/process.py", line 246, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/concurrent/interrupt/process.py", line 14, in task_main
return fn(*args, **kwargs)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/ewoksppf/src/ewoksppf/ppfrunscript.py", line 27, in run
task.execute()
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/ewokscore/task.py", line 407, in execute
raise RuntimeError(f"Task '{self.label}' failed") from e
RuntimeError: Task 'Check move of phi' failed
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/concurrent/process.py", line 78, in cb
result = future.result()
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/concurrent/futures/_base.py", line 440, in result
return self.__get_result()
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
RuntimeError: Task 'Check move of phi' failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/PythonActor.py", line 147, in errorHandler
self._triggerErrorHandlers(downstreamData)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/PythonActor.py", line 162, in _triggerErrorHandlers
errorHandler.trigger(downstreamData)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/ThreadCountingActor.py", line 13, in wrapper
return trigger(self, *args, **kw)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/ewoksppf/src/ewoksppf/bindings.py", line 198, in trigger
actor.trigger(newInData, source=self)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/ThreadCountingActor.py", line 13, in wrapper
return trigger(self, *args, **kw)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/ewoksppf/src/ewoksppf/bindings.py", line 255, in trigger
actor.trigger(newInData)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/ThreadCountingActor.py", line 13, in wrapper
return trigger(self, *args, **kw)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/ewoksppf/src/ewoksppf/bindings.py", line 84, in trigger
return super().trigger(inData)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/ThreadCountingActor.py", line 13, in wrapper
return trigger(self, *args, **kw)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/PythonActor.py", line 53, in trigger
self.uploadInDataToMongo(actorData={"inData": inData}, script=self.script)
File "/mnt/multipath-shares/sware/exp/pxsoft/mxworkflows/id30a2/ewoksppf/src/ewoksppf/bindings.py", line 90, in uploadInDataToMongo
super().uploadInDataToMongo(**kw)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/AbstractActor.py", line 61, in uploadInDataToMongo
self.actorId = self.parent.db_client.startActor(name=name, info=info)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/persistence/mongo.py", line 69, in startActor
self._appendActorInfo(actorInfo)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pypushflow/persistence/pymongo.py", line 35, in _appendActorInfo
self._collection.update_one(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/collection.py", line 998, in update_one
self._update_retryable(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/collection.py", line 854, in _update_retryable
return self.__database.client._retryable_write(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1491, in _retryable_write
return self._retry_with_session(retryable, func, s, None)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1384, in _retry_with_session
return func(session, sock_info, retryable)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/collection.py", line 846, in _update
return self._update(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/collection.py", line 815, in _update
result = sock_info.command(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/pool.py", line 618, in command
self._raise_connection_failure(error)
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/pool.py", line 603, in command
return command(self.sock, dbname, spec, slave_ok,
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/network.py", line 127, in command
request_id, msg, size, max_doc_size = message._op_msg(
File "/opt/pxsoft/mxworkflows/id30a2/miniconda3/envs/id30a2/lib/python3.9/site-packages/pymongo/message.py", line 706, in _op_msg
return _op_msg_uncompressed(
bson.errors.InvalidDocument: cannot encode object: RuntimeError("Task 'Check move of phi' failed"), of type: <class 'RuntimeError'>
2024-01-30 16:56:37,213 DEBUG [TroubleShooting] Thread ended for 'Check move of phi' (0 threads running)
2024-01-30 16:56:37,216 DEBUG [TroubleShooting] [<StopActor> Stop] scheduler threads are finished
2024-01-30 16:56:37,220 DEBUG [TroubleShooting] [<StopActor> Stop] finished