- Notifications
You must be signed in to change notification settings - Fork1k
Commit988ee39
authored
test: stop running Test_sshConfigProxyCommandEscape in parallel (#20009)
Fixescoder/internal#1035Or, at least, closes a remaining race that seems pretty likely.The tests in question write a file, close the file, then execute the file. Sometimes Linux errors saying "text file busy" which means the file is still open for writing.What I think is going on is:1. Test_sshConfigProxyCommandEscape goroutine opens the file and begins writing.2. Some other, unrelated test execs a command, which causes a `fork()` syscall. The child process now has a copy of the file descriptor to our open file.3. Test_sshConfigProxyCommandEscape goroutine executes the file and gets "text file busy".4. The child process calls the `exec` syscall, which closes the file (due to `CLOEXEC` being set).The race is very tight because 3 has to happen before 4 (and, 3 involves it's own fork/exec), but it's not impossible on a busy system.c.f.#14233 which was an earlier attempt to fix this. It only prevented the subtests from running in parallel. When the subtests were all running in parallel, the flake was fairly likely because you've got all this fork() activity happening at the same time. But, since the main test was in parallel there is still a chance a totally different test is `fork`'ing at in inopportune time.1 parente878281 commit988ee39
1 file changed
+6
-4
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
139 |
| - | |
140 |
| - | |
| 138 | + | |
| 139 | + | |
141 | 140 |
| |
142 |
| - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 |
| |
144 | 146 |
| |
145 | 147 |
| |
|
0 commit comments
Comments
(0)