Add race mitigation lock to vboxwrapper#5571
Conversation
|
While it builds fine on my local Linux system I get these errors on the github build system: Any idea what's wrong? |
|
@computezrmle, these two builds are building on Ubuntu 13.04, because we still need to provide the binaries for the old libc version: |
|
@AenBleidd |
|
@computezrmle, try to add boinc/samples/vboxwrapper/Makefile Line 80 in 6cd441f |
Makes log output look like other records in 'vbox_trace.txt'
|
A case is not handled correctly in |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5571 +/- ##
============================================
- Coverage 10.80% 10.54% -0.26%
Complexity 1068 1068
============================================
Files 279 279
Lines 36294 35869 -425
Branches 8409 8409
============================================
- Hits 3920 3781 -139
+ Misses 31980 31694 -286
Partials 394 394 |
|
A reliable volunteer from LHC@home and I tested the artifact from yesterday with real project tasks on Windows and Linux. |

Introduction
Vboxwrapper allows to use VirtualBox multiattach/differencing disk images since version 26206.
Attaching a disk in this mode can't be done in 1 step.
Hence, a workaround suggested by VirtualBox had to be implemented in vboxwrapper and improved.
The required steps (in short):
For more details see:
#4602
#4603
Long term experience with LHC@home shows that errors like these happen more often than expected:
They usually happen when
VirtualBox processes all incoming commands FIFO, hence "closemedium" and "storageattach" (normal/multiattach) from different vboxwrappers can easily be mixed.
Suggested Solution
This PR introduces a lock to protect the critical code sections.
All vboxwrapper instances trying to modify the same parent disk entry must own the lock or wait.
This is important when a VM gets registered as well as when a VM gets deregistered.
Also included in this PR
Tests done
Several series of concurrently starting VMs (CMS subproject from LHC@home)