Skip to content

fix: don't hang formats in flight when a process plugin shuts down - #1385

Merged
dsherret merged 2 commits into
mainfrom
fix/process-plugin-shutdown-test-timeout
Oct 21, 2026
Merged

dsherret merged 2 commits into
mainfrom
fix/process-plugin-shutdown-test-timeout

Conversation

@dsherret

Copy link
Copy Markdown
Member

CI has been hanging until the 6 hour job limit on the native test jobs (ex. x86_64-pc-windows-msvc) since #1377 on should_not_restart_process_plugin_after_shutdown.

The test starts a format that waits for cancellation, then shuts down the plugin. The plugin acknowledges Close right away, so the host never kills it. But the plugin doesn't exit after it closes: its stdin reader is a spawn_blocking task still blocked on stdin, which the host keeps open, and dropping a tokio runtime waits for blocking tasks. With the process still alive, stdout never ends, so the host never fails the format's pending message and it waits forever.

Once a plugin acknowledges Close it no longer handles messages, so the host now fails the messages still in flight at that point, the same as it does when the plugin's stdout ends.

Also:

  • The test now runs on its own thread with a 10 second timeout, like should_not_hang_when_plugin_subprocess_holds_stdio_open, so a regression fails it instead of hanging CI.
  • CI jobs time out after 35 minutes. The longest job in a recent run took 14 minutes.

The dprint tests now take ~8s locally instead of ~7.5 minutes.

@dsherret
dsherret merged commit b89e35f into main Oct 21, 2026
1 of 4 checks passed
@dsherret
dsherret deleted the fix/process-plugin-shutdown-test-timeout branch October 21, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant