Commit b00c6b1
committed
Prevent CI hangs from unbounded subprocess waits (#1434)
Two intermittent CI hang issues were identified:
1. test-message-generation-bin.js: The before() hook runs spawnSync for npm init, npm pack, and npm install (full native rebuild from tarball) with no timeout. If any of these hangs (network issue, lock contention, slow arm64 runner), mocha blocks indefinitely until the GitHub Actions runner is reclaimed, producing a "context canceled" error with no useful diagnostics. Fixed by adding timeout to all spawnSync calls (60s for init, 120s for pack/scripts, 300s for install).
2. test/electron/run_test.js: The parent process spawns Electron via xvfb-run and waits for the close event. If the Electron child process or lingering DDS/FastDDS background threads don't terminate cleanly (due to async app.quit() racing with process.exit(), or xvfb-run holding stdio pipes open), the parent hangs forever. Fixed by adding a 30-second kill timeout that forcibly terminates the child if it doesn't exit after the test completes.
Fix: #14331 parent 10706b9 commit b00c6b1
2 files changed
Lines changed: 66 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
35 | 57 | | |
36 | 58 | | |
37 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
36 | 69 | | |
37 | 70 | | |
38 | 71 | | |
| |||
60 | 93 | | |
61 | 94 | | |
62 | 95 | | |
| 96 | + | |
63 | 97 | | |
64 | | - | |
| 98 | + | |
65 | 99 | | |
66 | 100 | | |
67 | 101 | | |
| 102 | + | |
68 | 103 | | |
69 | 104 | | |
70 | 105 | | |
| |||
80 | 115 | | |
81 | 116 | | |
82 | 117 | | |
83 | | - | |
| 118 | + | |
84 | 119 | | |
85 | 120 | | |
86 | 121 | | |
| 122 | + | |
87 | 123 | | |
88 | 124 | | |
89 | 125 | | |
| |||
114 | 150 | | |
115 | 151 | | |
116 | 152 | | |
117 | | - | |
| 153 | + | |
118 | 154 | | |
119 | 155 | | |
| 156 | + | |
120 | 157 | | |
121 | 158 | | |
122 | 159 | | |
| |||
132 | 169 | | |
133 | 170 | | |
134 | 171 | | |
135 | | - | |
| 172 | + | |
136 | 173 | | |
137 | 174 | | |
138 | 175 | | |
| 176 | + | |
139 | 177 | | |
140 | 178 | | |
141 | 179 | | |
| |||
0 commit comments