qemu target may fail to sync data to the image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LAVA Dispatcher |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Trying linaro_test_shell action with qemu target, it appears there's high probability that logs, results, etc. won't be available for pickup from underlying filesystem image after the test run. This appears to be because following happens in quick succession:
1. Log/results files are written in qemu guest.
2. "sync" is performed in qemu guest.
3. qemu is terminated.
So, it seems that step 2., sync, doesn't really flush changed to the fs image on a host immediately, and (abrupt?) termination of qemu (closing of pipe) doesn't flush either.
mem-stress-a7 : PASS
<LAVA_TEST_RUNNER>: 0_passfail exited with: 0
<LAVA_TEST_RUNNER>: exiting<
<LAVA_DISPATCHE
sync
sync
linaro-test [rc=0]# & 0_passfail-
&& 0_passfail-
<LAVA_DISPATCHE
Traceback (most recent call last):
File "/home/
testruns.
File "/home/
testdef = json.loads(testdef)
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
{'test_runs': [], 'format': 'Dashboard Bundle Format 1.3'}
<LAVA_DISPATCHE
Related branches
- Paul Sokolovsky: Approve
- Dave Pigott: Approve
-
Diff: 13 lines (+3/-0)1 file modifiedlava_dispatcher/device/target.py (+3/-0)
Doing sleep(3) before closing qemu pipe works around this issue for me, though it's clear a workaround, and there can be cases when 3s sleep would be not enough.