[CRIU] [PATCH v7 1/6] aio: Make struct aio_ring visible for everybody

Kirill Tkhai ktkhai at virtuozzo.com
Thu Mar 31 04:43:50 PDT 2016



On 31.03.2016 12:50, Pavel Emelyanov wrote:
> On 03/31/2016 12:05 PM, Kirill Tkhai wrote:
>> On 30.03.2016 22:53, Pavel Emelyanov wrote:
>>> Tests start to fail:
>>>
>>> https://ci.openvz.org/job/CRIU/job/CRIU-x86_64-pre-dump/branch/criu-dev/24/console
>>>
>>> ========================== Run zdtm/static/aio00 in h ==========================
>>> Start test
>>> ./aio00 --pidfile=aio00.pid --outfile=aio00.out
>>> Run criu pre-dump
>>> Run criu pre-dump
>>> Run criu pre-dump
>>> Run criu dump
>>> =[log]=> dump/zdtm/static/aio00/24/4/dump.log
>>> ------------------------ grep Error ------------------------
>>> (00.050521) Error (page-read.c:116): Missing 7ff10d38a000 in parent pagemap, current iov: base=7ff10d38d000,len=16384
>>> (00.050524) Error (page-xfer.c:563): Hole 0x7ff10d38a000/28672 not found in parent
>>> (00.050549) Error (mem.c:383): Can't dump page with parasite
>>> (00.050944) Error (cr-dump.c:1606): Dumping FAILED.
>>> ------------------------ ERROR OVER ------------------------
>>> ################### Test zdtm/static/aio00 FAIL at CRIU dump ###################
>>> Wait for zdtm/static/aio00 to die for 0.100000
>>
>> Does criu use non-default arguments in this run?
> 
> Of course. This is pre-dumps (with memory tracking) that you tried to
> address in the patches ;)

1)Ok, but is there a way to execute the scenario you use to test every incomming
patches?

2)The below fixes the problem:

[PATCH] aio: Take in account a ring never has a parent in pre-dump

Since AIO ring is never pre-dumped, it never has a parent
in pre-dump. Make generate_iovs() to know this.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/mem.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/criu/mem.c b/criu/mem.c
index 0513823..76a63aa 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -303,19 +303,23 @@ static int __parasite_dump_pages_seized(struct parasite_ctl *ctl,
 	 */
 	args->off = 0;
 	list_for_each_entry(vma_area, &vma_area_list->h, list) {
+		bool has_parent = !!xfer.parent;
 		u64 off = 0;
 		u64 *map;
 
 		if (!vma_area_is_private(vma_area, kdat.task_size))
 			continue;
-		if (vma_entry_is(vma_area->e, VMA_AREA_AIORING) && pp_ret)
-			continue;
+		if (vma_entry_is(vma_area->e, VMA_AREA_AIORING)) {
+			if (pp_ret)
+				continue;
+			has_parent = false;
+		}
 
 		map = pmc_get_map(&pmc, vma_area);
 		if (!map)
 			goto out_xfer;
 again:
-		ret = generate_iovs(vma_area, pp, map, &off, xfer.parent);
+		ret = generate_iovs(vma_area, pp, map, &off, has_parent);
 		if (ret == -EAGAIN) {
 			BUG_ON(pp_ret);
 




More information about the CRIU mailing list