Zach P
04/11/2023, 5:31 PMdagster._core.errors.DagsterSubprocessError: During multiprocess execution errors occurred in child processes:
In process 263: dagster._core.errors.DagsterUnknownStepStateError: Execution exited with steps {'my_step_launched_asset'} in an unknown state to this process.
This was likely caused by losing communication with the process performing step execution.
Full error in 🧵Zach P
04/11/2023, 5:31 PMdagster._core.errors.DagsterSubprocessError: During multiprocess execution errors occurred in child processes:
In process 263: dagster._core.errors.DagsterUnknownStepStateError: Execution exited with steps {'data_axle_poi_raw_from_sftp'} in an unknown state to this process.
This was likely caused by losing communication with the process performing step execution.
Stack Trace:
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/executor/child_process_executor.py", line 79, in _execute_command_in_child_process
for step_event in command.execute():
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/executor/multiprocess.py", line 93, in execute
yield from execute_plan_iterator(
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/execution/api.py", line 1101, in __iter__
yield from self.iterator(
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/execution/plan/execute_plan.py", line 136, in inner_plan_execution_iterator
yield from _handle_compute_log_teardown_error(pipeline_context, sys.exc_info())
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/execution/plan/active.py", line 168, in __exit__
raise DagsterUnknownStepStateError(
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/execution/api.py", line 990, in pipeline_execution_iterator
for event in pipeline_context.executor.execute(pipeline_context, execution_plan):
File "/venvs/03f91443cf20/lib/python3.9/site-packages/dagster/_core/executor/multiprocess.py", line 306, in execute
raise DagsterSubprocessError(
Zach P
04/11/2023, 5:32 PMdaniel
04/12/2023, 2:31 AMZach P
04/12/2023, 2:04 PMlocal_external_step_main.py
, before all_events
had any issues.
3. Since the resulting events.pkl
had no length, it seemed to trigger an unknown state error.
I ended up implementing my own alternative local_external_step_main
that catches exceptions from the dagtster provided one, and if an exception does occur, will check for the resulting events.pkl
and create a new one with exception details provided if and only if events.pkl
represents a null length event list.