Commit 7ce93c7
Fix three critical bugs causing bash/tmux session leaks
1. EventService.close() fire-and-forget (CRITICAL): Added missing await
to ensure LocalConversation.close() actually runs during shutdown
2. No tmux session cleanup on startup (MEDIUM): Added cleanup_stale_tmux_sessions()
to kill orphaned sessions from previous server runs on startup
3. Task manager sub-conversations use delete_on_close=False (MEDIUM): Changed
to delete_on_close=True in both locations to ensure tool cleanup runs
These fixes prevent unbounded accumulation of orphaned tmux sessions and
their bash children processes that were never being terminated.
Co-authored-by: openhands <openhands@all-hands.dev>1 parent e9a5b81 commit 7ce93c7
File tree
2 files changed
+44
-2
lines changed- openhands-agent-server/openhands/agent_server
- openhands-tools/openhands/tools/task
2 files changed
+44
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
52 | 91 | | |
53 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
54 | 96 | | |
55 | 97 | | |
56 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
0 commit comments