[CRIU] ✗ travis-ci: failure for series starting with [PATCHv2,1/5] locks: Add c/r of non broken leases (kernel>=v4.1)

Pavel Begunkov asml.silence at gmail.com
Sun Sep 3 17:36:58 MSK 2017


Seems, CRIU can't set a lease on a file when user namespaces are used.
So, I found a notice from *fcntl* man:

"An unprivileged process may take out a lease only on a file whose UID
(owner) matches the filesystem UID of the process.  A process with the
CAP_LEASE capability may take out leases on arbitrary files."

I suppose, that restore stage is performed in user namespace and,
because of that, filesystem UID of new process differ from the original
one. Thus, it leads to violation of statements above.

Could somebody with a better understanding of namespaces in CRIU tell if
it sounds reasonable and guess what I can do about it, please?


On 30/08/17 04:04, Pavel Begunkov wrote:
> Yeah, thanks. Soon I'll make time to fix it along with one's noticed by
> Pavel.
> 
> On 30/08/17 02:43, Andrei Vagin wrote:
>> ===================== Run zdtm/static/file_lease01 in uns ======================
>> Start test
>> ./file_lease01 --pidfile=file_lease01.pid --outfile=file_lease01.out --filename=file_lease01.test
>> Run criu dump
>> Run criu restore
>> =[log]=> dump/zdtm/static/file_lease01/124/1/restore.log
>> ------------------------ grep Error ------------------------
>> (00.308462)      4: 		Create fd for 3
>> (00.308480)      4: 		Create fd for 4
>> (00.308486)      4: 		Create fd for 5
>> (00.308491)      4: 		Create fd for 6
>> (00.308510)      4: Error (criu/file-lock.c:528): Can't restore non broken lease: Permission denied
>> (00.310868)      1: Error (criu/cr-restore.c:1527): 4 exited, status=1
>> (00.346609) uns: calling exit_usernsd (-1, 1)
>> (00.346678) uns: daemon calls 0x4d3390 (146, -1, 1)
>> (00.346690) uns: `- daemon exits w/ 0
>> (00.349075) uns: daemon stopped
>> (00.349092) Error (criu/cr-restore.c:2412): Restoring FAILED.
>> ------------------------ ERROR OVER ------------------------
>> ############## Test zdtm/static/file_lease01 FAIL at CRIU restore ##############
>>
>> On Mon, Aug 14, 2017 at 01:12:36AM +0000, Patchwork wrote:
>>> == Series Details ==
>>>
>>> Series: series starting with [PATCHv2,1/5] locks: Add c/r of non broken leases (kernel>=v4.1)
>>> URL   : https://patchwork.criu.org/series/1885/
>>> State : failure
>>>
>>> == Logs ==
>>>
>>> For more details see: https://travis-ci.org/criupatchwork/criu/builds/264198066?utm_source=github_status&utm_medium=notification
>>> _______________________________________________
>>> CRIU mailing list
>>> CRIU at openvz.org
>>> https://lists.openvz.org/mailman/listinfo/criu
> 

-- 
Yours sincerely,
Pavel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvz.org/pipermail/criu/attachments/20170903/a6a408eb/attachment.sig>


More information about the CRIU mailing list