Commit 8679cea
fix(acp): prevent reader thread leak on transport close
AcpTransport.close() left the acp-reader thread blocked on readLine()
when the child process had spawned grandchildren (e.g. `sh -c "... sleep 30"`)
that inherited the stdout pipe. process.destroy() only terminates the
direct child, so the pipe stayed open and the reader never reached EOF,
causing testPing_timeout_returnsFalse to fail with a thread leak.
Close process stdout explicitly to unblock readLine, interrupt the reader
thread, and wait on destroyForcibly to ensure full cleanup.
Also de-duplicate Xvfb startup in the Tests workflow: export DISPLAY via
\$GITHUB_ENV so it persists to the Gradle step instead of starting Xvfb
twice (which logged "Server is already active for display 99").
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0753a13 commit 8679cea
2 files changed
Lines changed: 14 additions & 4 deletions
File tree
- .github/workflows
- src/main/java/com/devoxx/genie/service/acp/protocol
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
| 276 | + | |
268 | 277 | | |
269 | 278 | | |
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| 284 | + | |
275 | 285 | | |
276 | 286 | | |
277 | 287 | | |
| |||
0 commit comments