Commit 0957c45
committed
runtime_vm: Avoid possible deadlock on UpdateContainerStatus()
StartContainer() function will hold the opLock, while a goroutine will
be waiting for the container to terminate. Once it happens, the
goroutine would update the container status, calling then
UpdateContainerStatus() which will try to get the opLock and,
consequently, a deadlock will happen.
In order to avoid such situation, let's create the
updateContainerStatus() helper, which actually does status update but
does not try to get the opLock, leaving it up to the caller to do so.
This new helper will be used from both StartContainer() and
UpdateContainerStatus() functions.
Signed-off-by: Fabiano Fidêncio <[email protected]>
(cherry picked from commit faad1a4)
(cherry picked from commit 2e92c0b)1 parent 5705587 commit 0957c45
1 file changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
| |||
576 | 578 | | |
577 | 579 | | |
578 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
579 | 591 | | |
580 | 592 | | |
581 | 593 | | |
| |||
0 commit comments