[CRIU] [PATCH] files: Fail dump if dump_one_file() fails

Dmitry Safonov 0x7f454c46 at gmail.com
Wed Apr 11 01:25:54 MSK 2018


2018-04-10 20:54 GMT+01:00 Andy Tucker <agtucker at google.com>:
> When dumping a process with a large number of open files,
> dump_task_files_seized() processes the fds in batches. If
> dump_one_file() results in an error, processing of the current batch is
> stopped but the next batch (if any) will still be fetched and the error
> value is overwritten. The result is a corrupt dump image (the fdinfo
> file is missing a bunch of fds) which results in restore failure.
>
> Also close all received fds after an error (previously the skipped ones
> were left open).
>
> Signed-off-by: Andy Tucker <agtucker at google.com>

Reviewed-by: Dmitry Safonov <0x7f454c46 at gmail.com>

Really nice catch!
Have you found it with some automatic tool?

+Cc: Cyrill
This looks like a candidate for your stable Openvz branch, imho.

Thanks,
             Dmitry


More information about the CRIU mailing list