<@ULVA73B9P> Flow run process exited with non-zero...
# ask-marvin
p
@Marvin Flow run process exited with non-zero status code -7?
m
The exit status code -7 is not directly referenced in the GitHub issues I found. However, issues related to abnormal flow run behavior and event loop management in Prefect have been documented, which could potentially relate to your problem. One reported issue concerns a long-running flow with subflows incorrectly displaying as "crashed" (#10991). This bug manifested when the parent flow was flagged as crashed while subflows were still running. Eventually, after all subflows completed, the parent flow status corrected to "completed." Another issue, potentially more relevant to yours, deals with an
Async context manager in flow causes RuntimeError: Event loop is closed
error (#9412). This error occurred in flows that utilized external libraries (httpx in the reported case) with async context managers. The reported bug was tied to Prefect versions higher than v2.8.4, and the flow behaved as expected when not utilizing tasks (thus not invoking Prefect's concurrency management). Here's a general troubleshooting suggestion for the non-zero status code -7 you're encountering: 1. Inspect Logs: Check Prefect's logs for more detailed error messages surrounding the status code -7 exit. 2. Review Code: Look for async context managers and ensure they are properly managed within tasks and subflows. 3. Test Version Downgrade: Consider downgrading Prefect to a version before the reported issues appeared (below v2.8.7) and see if the error persists. 4. Flow Control: If you're running parallel subflows, like in issue #10991, monitor the parent flow's status throughout the run. 5. Seek Help on GitHub: If you suspect this to be a new or related issue, open a GitHub issue with details including the output, logs, and flow setup. Remember to follow this up with the Prefect community or support if you find this issue to be persistent or indicative of a broader problem with Prefect's internal handling of async operations.