[CRIU] [PATCH] compel -- Use unsigned long for arguments

Andrey Vagin avagin at virtuozzo.com
Fri Aug 17 01:46:50 MSK 2018


Applied, thanks

On Fri, Aug 10, 2018 at 05:53:01PM +0300, Cyrill Gorcunov wrote:
> When checkpointing applications with really big memory slab
> (like in our vz7 test with 920G of memory) the int type get
> cutted, we should use long int instead, just like we do in
> other code pieces.
> 
> Otherwise get
> 
>  | pie: 756: Daemon waits for command
>  | (01.193097) Wait for ack 12 on daemon socket
>  | (01.193112) Fetched ack: 12 12 0
>  | (01.193164) 988065 fdinfo 0: pos:                0 flags:           100002/0
>  | (01.193201) fdinfo: type: 0xb flags: 0100002/0 pos:        0 fd: 0
>  | (01.193279) 988065 fdinfo 1: pos:                0 flags:           100002/0
>  | (01.193307) fdinfo: type: 0xb flags: 0100002/0 pos:        0 fd: 1
>  | (01.193341) 988065 fdinfo 2: pos:                0 flags:           100002/0
>  | (01.193365) fdinfo: type: 0xb flags: 0100002/0 pos:        0 fd: 2
>  | (01.193375) ----------------------------------------
>  | (01.193405) Error (criu/parasite-syscall.c:243): BUG at criu/parasite-syscall.c:243
>  | pie: 756: Error (criu/pie/parasite.c:676): Trimmed message received (1>
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
>  compel/include/uapi/infect.h | 2 +-
>  compel/src/lib/infect.c      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/compel/include/uapi/infect.h b/compel/include/uapi/infect.h
> index f087f21f3..1da795074 100644
> --- a/compel/include/uapi/infect.h
> +++ b/compel/include/uapi/infect.h
> @@ -56,7 +56,7 @@ extern int compel_cure(struct parasite_ctl *ctl);
>  	})
>  
>  extern void *compel_parasite_args_p(struct parasite_ctl *ctl);
> -extern void *compel_parasite_args_s(struct parasite_ctl *ctl, int args_size);
> +extern void *compel_parasite_args_s(struct parasite_ctl *ctl, unsigned long args_size);
>  
>  extern int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret,
>  		unsigned long arg1,
> diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
> index d51b8aa88..8e39cf99e 100644
> --- a/compel/src/lib/infect.c
> +++ b/compel/src/lib/infect.c
> @@ -1351,7 +1351,7 @@ void *compel_parasite_args_p(struct parasite_ctl *ctl)
>  	return ctl->addr_args;
>  }
>  
> -void *compel_parasite_args_s(struct parasite_ctl *ctl, int args_size)
> +void *compel_parasite_args_s(struct parasite_ctl *ctl, unsigned long args_size)
>  {
>  	BUG_ON(args_size > ctl->args_size);
>  	return compel_parasite_args_p(ctl);
> -- 
> 2.14.4
> 


More information about the CRIU mailing list