Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run runtime.close in background thread #7524

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Conversation

tofarr
Copy link
Collaborator

@tofarr tofarr commented Mar 26, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality that this introduces.
Fix for issue where closing a conversation blocks the main runloop


Give a summary of what the PR does, explaining any non-trivial design decisions.
Users had reported intermittent stalls, and I had observed this but not been able to pin it down. Eventually with some careful use of time.sleep(), I was able to narrow the stall down to the session close, and particularly the runtime.close. This will no longer block the main runloop.


Link of any specific issues this addresses.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:11f5198-nikolaik   --name openhands-app-11f5198   docker.all-hands.dev/all-hands-ai/openhands:11f5198

@tofarr tofarr marked this pull request as ready for review March 26, 2025 14:20
@tofarr tofarr merged commit c5491e8 into main Mar 26, 2025
14 checks passed
@tofarr tofarr deleted the fix-close-session-stall branch March 26, 2025 18:13
rbren added a commit that referenced this pull request Apr 1, 2025
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