Skip to content

Fix Cuttlefish helper process leak on unresponsive ADB teardown#25

Open
9640-Akhil wants to merge 2 commits into
ittiam-systems:masterfrom
9640-Akhil:process_leak_fix_cuttlefish
Open

Fix Cuttlefish helper process leak on unresponsive ADB teardown#25
9640-Akhil wants to merge 2 commits into
ittiam-systems:masterfrom
9640-Akhil:process_leak_fix_cuttlefish

Conversation

@9640-Akhil

@9640-Akhil 9640-Akhil commented May 27, 2026

Copy link
Copy Markdown
Collaborator

The Cuttlefish teardown routine bypasses the graceful stop_cvd command when Cuttlefish freezes, hangs, or when the ADB connection goes offline, proceeding to force-kill only crosvm and run_cvd. This leaks helper processes like tombstone_receiver and socket_vsock_proxy, leaving TCP ports bound indefinitely and causing subsequent boot attempts to fail with Address already in use errors.

This change ensures stop_cvd is always attempted gracefully and force-kills remaining CVD helper processes in the fallback path to guarantee clean port release.

@9640-Akhil 9640-Akhil force-pushed the process_leak_fix_cuttlefish branch from b6e3281 to 937ebe7 Compare May 27, 2026 13:39
The teardown routine bypasses the graceful 'stop_cvd' command when Cuttlefish
freezes, hangs, or when the ADB connection goes offline, proceeding to
force-kill only 'crosvm' and 'run_cvd'. This leaks helper processes like
'tombstone_receiver' and 'socket_vsock_proxy', leaving TCP ports bound
indefinitely and causing subsequent boot attempts to fail with 'Address
already in use' errors.

This change ensures 'stop_cvd' is always attempted gracefully and force-kills
all remaining CVD helper processes in the fallback path to guarantee clean
port release.
@9640-Akhil 9640-Akhil force-pushed the process_leak_fix_cuttlefish branch from 937ebe7 to 06e93ea Compare May 28, 2026 11:42
Use a single directory-targeted pkill command instead of maintaining a
hardcoded list of individual helper processes and running multiple separate
SSH commands.
@9640-Akhil 9640-Akhil force-pushed the process_leak_fix_cuttlefish branch from 59eec5e to 62d8bcf Compare May 28, 2026 12:01
@9640-Akhil 9640-Akhil requested a review from svasudevprasad May 28, 2026 12:04
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.

2 participants