[CRIU] Cannot run zdtm.py script, flock problem

Pavel Emelyanov xemul at parallels.com
Mon Jan 25 01:38:14 PST 2016


On 01/23/2016 11:09 PM, Rodrigo Bruno wrote:
> Hi,
> 
> I was trying to run tests using the zdtm.py script.
> 
> However, when running "./zdtm.py run -a":
> 
> flock: ./zdtm_mount_cgroups: Text file busy
> Traceback (most recent call last):
>   File "./zdtm.py", line 1403, in <module>
>     tst.available()
>   File "./zdtm.py", line 436, in available
>     subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"])
>   File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups', './zdtm_mount_cgroups']' returned non-zero exit status 69
> 
> This problem seems to happen because flock is trying to lock the script it is going
> to run.
> 
> Has anyone got the same problem?
> 
> Is this lock important?

Yes, this is needed to pre-mount cgroups only once when we run several zdtm.py-s
in parallel.

> I'm able to run all tests I if remove the flock command.

OK, so while you don't run zdtm.py-s in parallel, you can move forward without
one. But once time permits, can you investigate why flock behaves like that?

> cheers,
> 
> rodrigo
> 

-- Pavel


More information about the CRIU mailing list