[CRIU] Difference between two snapshots generated by CRIU

Christopher Covington cov at codeaurora.org
Tue Feb 10 07:52:04 PST 2015


On 02/10/2015 07:45 AM, Thouraya TH wrote:
> 
> I have done copy paste in two different files and I proceeded as follows:
> 
> diff LoopProcess.txt LoopProcess1.txt > diffLoop.txt
> 
> 19c19
> < Task 9773:
> ---
>> Task 10821:
> 27,28c27,28
> <         r13: 0x007fffc422ea40
> <         r12: 0x007fffc422e8d0
> ---
>>         r13: 0x007fff795b16c0
>>         r12: 0x007fff795b1550
> 32c32
> <         r10: 0x007fffc422e690
> ---
>>         r10: 0x007fff795b1310
> 39c39
> <         di: 0x007fffc422e8d0
> ---
>>         di: 0x007fff795b1550
> 41c41
> <         ip: 0x007fe23fb1799e
> ---
>>         ip: 0x007f2e2456799e
> 44c44
> <         sp: 0x007fffc422e8c8
> ---
>>         sp: 0x007fff795b1548
> 46c46
> <         fs_base: 0x007fe240033740
> ---
>>         fs_base: 0x007f2e24a83740
> 64c64
> <         xmm_space:
> 0:0:0:0:0:0:0:0:0:0:0:0:0x4c4c415f:0x4e414c00:0x69660047:0x6f6c646e:0xc422e860:0x7fff:0x3fa84a9c:0x7fe2:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0xff00:0:0xff0000:0xff0000:0:0:0:0:0:0:0:0:0:0:0:0
> ---
>>         xmm_space:
> 0:0:0:0:0:0:0:0:0:0:0:0:0x4c4c415f:0x4e414c00:0x69660047:0x6f6c646e:0x795b14e0:0x7fff:0x244d4a9c:0x7f2e:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0xff00:0:0xff0000:0xff0000:0:0:0:0:0:0:0:0:0:0:0:0
> 194c194
> < Resources for 9773:
> ---
>> Resources for 10821:
> 196c196
> < * mm-9773.img:
> ---
>> * mm-10821.img:
> 201,207c201,207
> < mm_start_stack: 0x007fffc422ea40
> < mm_start_brk: 0x00000001e72000
> < mm_brk: 0x00000001e93000
> < mm_arg_start: 0x007fffc422f88d
> < mm_arg_end: 0x007fffc422f895
> < mm_env_start: 0x007fffc422f895
> < mm_env_end: 0x007fffc422ffed
> ---
>> mm_start_stack: 0x007fff795b16c0
>> mm_start_brk: 0x000000013b6000
>> mm_brk: 0x000000013d7000
>> mm_arg_start: 0x007fff795b288d
>> mm_arg_end: 0x007fff795b2895
>> mm_env_start: 0x007fff795b2895
>> mm_env_end: 0x007fff795b2fed

This looks like noise due to ASLR. If you understand the security implications
and find the potentially elevated risk acceptable, I would suggest booting
with the "norandmaps" kernel parameter or running `echo 0 >
/proc/sys/kernel/randomize_va_space` before launching your runs. For example I
boot with the norandmaps kernel parameter when running code I trust in simulators.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sysctl/kernel.txt#n677

It might also mean you don't have to do any math on the sp and ip values
before passing them to addr2line.

Chris

> 209c209
> < mm_saved_auxv:
> 0x00000000000021:0x007fffc437e000:0x00000000000010:0x000000bfebfbff:0x00000000000006:0x00000000001000:0x00000000000011:0x00000000000064:0x00000000000003:0x00000000400040:0x00000000000004:0x00000000000038:0x00000000000005:0x00000000000009:0x00000000000007:0x007fe23fe1c000:0x00000000000008:0:0x00000000000009:0x000000004017ac:0x0000000000000b:0:0x0000000000000c:0:0x0000000000000d:0:0x0000000000000e:0:0x00000000000017:0:0x00000000000019:0x007fffc422ec59:0x0000000000001f:0x007fffc422ffed:0x0000000000000f:0x007fffc422ec69:0:0
> ---
>> mm_saved_auxv:
> 0x00000000000021:0x007fff795fe000:0x00000000000010:0x000000bfebfbff:0x00000000000006:0x00000000001000:0x00000000000011:0x00000000000064:0x00000000000003:0x00000000400040:0x00000000000004:0x00000000000038:0x00000000000005:0x00000000000009:0x00000000000007:0x007f2e2486c000:0x00000000000008:0:0x00000000000009:0x000000004017ac:0x0000000000000b:0:0x0000000000000c:0:0x0000000000000d:0:0x0000000000000e:0:0x00000000000017:0:0x00000000000019:0x007fff795b18d9:0x0000000000001f:0x007fff795b2fed:0x0000000000000f:0x007fff795b18e9:0:0
> 244,245c244,245
> <     start: 0x00000001e72000
> <     end: 0x00000001e93000
> ---
>>     start: 0x000000013b6000
>>     end: 0x000000013d7000
> 255,256c255,256
> <     start: 0x007fe23f78d000
> <     end: 0x007fe23fa56000
> ---
>>     start: 0x007f2e241dd000
>>     end: 0x007f2e244a6000
> 266,267c266,267
> <     start: 0x007fe23fa56000
> <     end: 0x007fe23fc11000
> ---
>>     start: 0x007f2e244a6000
>>     end: 0x007f2e24661000
> 277,278c277,278
> <     start: 0x007fe23fc11000
> <     end: 0x007fe23fe11000
> ---
>>     start: 0x007f2e24661000
>>     end: 0x007f2e24861000
> 288,289c288,289
> <     start: 0x007fe23fe11000
> <     end: 0x007fe23fe15000
> ---
>>     start: 0x007f2e24861000
>>     end: 0x007f2e24865000
> 299,300c299,300
> <     start: 0x007fe23fe15000
> <     end: 0x007fe23fe17000
> ---
>>     start: 0x007f2e24865000
>>     end: 0x007f2e24867000
> 310,311c310,311
> <     start: 0x007fe23fe17000
> <     end: 0x007fe23fe1c000
> ---
>>     start: 0x007f2e24867000
>>     end: 0x007f2e2486c000
> 321,322c321,322
> <     start: 0x007fe23fe1c000
> <     end: 0x007fe23fe3f000
> ---
>>     start: 0x007f2e2486c000
>>     end: 0x007f2e2488f000
> 332,333c332,333
> <     start: 0x007fe240033000
> <     end: 0x007fe240036000
> ---
>>     start: 0x007f2e24a83000
>>     end: 0x007f2e24a86000
> 343,344c343,344
> <     start: 0x007fe24003c000
> <     end: 0x007fe24003e000
> ---
>>     start: 0x007f2e24a8c000
>>     end: 0x007f2e24a8e000
> 354,355c354,355
> <     start: 0x007fe24003e000
> <     end: 0x007fe24003f000
> ---
>>     start: 0x007f2e24a8e000
>>     end: 0x007f2e24a8f000
> 365,366c365,366
> <     start: 0x007fe24003f000
> <     end: 0x007fe240040000
> ---
>>     start: 0x007f2e24a8f000
>>     end: 0x007f2e24a90000
> 376,377c376,377
> <     start: 0x007fe240040000
> <     end: 0x007fe240041000
> ---
>>     start: 0x007f2e24a90000
>>     end: 0x007f2e24a91000
> 387,388c387,388
> <     start: 0x007fffc420e000
> <     end: 0x007fffc4230000
> ---
>>     start: 0x007fff79591000
>>     end: 0x007fff795b3000
> 398,399c398,399
> <     start: 0x007fffc437e000
> <     end: 0x007fffc4380000
> ---
>>     start: 0x007fff795fe000
>>     end: 0x007fff79600000
> 421c421
> < * sigacts-9773.img:
> ---
>> * sigacts-10821.img:
> 484c484
> < * creds-9773.img:
> ---
>> * creds-10821.img:
> 499c499
> < * fs-9773.img:
> ---
>> * fs-10821.img:
> 507c507
> < ---[ end of task 9773 ]---
> ---
>> ---[ end of task 10821 ]---
> 
> Could you please explain me some of these lines ? What are the main changes
> from one snapshot to another ?
> 
> Thanks a lot for help.
> Bests.
> 
> 2015-02-10 12:30 GMT+01:00 Thouraya TH <thouraya87 at gmail.com
> <mailto:thouraya87 at gmail.com>>:
> 
>     Hello all,  i have done two times the dumping process of this process
>     http://criu.org/Simple_loop
> 
>     root at g-52:/home# *cd LoopProcess*
>     root at g-52:/home/LoopProcess# ls
>     cgroup.img      dump.log       fdinfo-2.img   fs-9162.img   inotify.img   
>     ns-files.img      pages-2.img     remap-fpath.img   stats-dump    unixsk.img
>     core-9162.img   eventfd.img    fdinfo-3.img   fs-9773.img   inventory.img 
>     packetsk.img      pipes-data.img  sigacts-9162.img  timerfd.img
>     core-9773.img   eventpoll.img  fifo-data.img  ids-9162.img  mm-9162.img   
>     pagemap-9162.img  pipes.img       sigacts-9773.img  tty.img
>     creds-9162.img  ext-files.img  fifo.img       ids-9773.img  mm-9773.img   
>     pagemap-9773.img  pstree.img      signalfd.img      tty-info.img
>     creds-9773.img  fanotify.img   filelocks.img  inetsk.img    netlinksk.img 
>     pages-1.img       reg-files.img   sk-queues.img     tunfile.img
> 
>     root at g-52:/home/LoopProcess# cd ..
>     root at g-52:/home# *cd LoopProcess1/*
>     root at g-52:/home/LoopProcess1# ls
>     cgroup.img       dump.log       fdinfo-2.img   fs-10821.img  
>     inotify.img    ns-files.img       pages-2.img     remap-fpath.img   
>     stats-dump    unixsk.img
>     core-10821.img   eventfd.img    fdinfo-3.img   fs-9162.img   
>     inventory.img  packetsk.img       pipes-data.img  sigacts-10821.img 
>     timerfd.img
>     core-9162.img    eventpoll.img  fifo-data.img  ids-10821.img 
>     mm-10821.img   pagemap-10821.img  pipes.img       sigacts-9162.img   tty.img
>     creds-10821.img  ext-files.img  fifo.img       ids-9162.img  
>     mm-9162.img    pagemap-9162.img   pstree.img      signalfd.img      
>     tty-info.img
>     creds-9162.img   fanotify.img   filelocks.img  inetsk.img    
>     netlinksk.img  pages-1.img        reg-files.img   sk-queues.img     
>     tunfile.img
> 
>     Then:
> 
>     criu show -D LoopProcess 
>     i see many lines.. i'd like to redirect the result of this command to a
>     file like that:
> 
>     criu show -D LoopProcess > first.txt
> 
>     but i have these error :
>     Error (image.c:231): Unable to open netdev-2.img: No such file or directory
>     Error (image.c:231): Unable to open ifaddr-2.img: No such file or directory
>     Error (image.c:231): Unable to open route-2.img: No such file or directory
>     Error (image.c:231): Unable to open iptables-2.img: No such file or directory
>     Error (image.c:231): Unable to open ipcns-var-3.img: No such file or directory
>     Error (image.c:231): Unable to open ipcns-shm-3.img: No such file or directory
>     Error (image.c:231): Unable to open ipcns-msg-3.img: No such file or directory
>     Error (image.c:231): Unable to open ipcns-sem-3.img: No such file or directory
>     Error (image.c:231): Unable to open utsns-4.img: No such file or directory
>     Error (image.c:231): Unable to open mountpoints-5.img: No such file or
>     directory
> 
> 
>     ?
> 
>     Thanks a lot.
>     Best Regards.
> 
> 
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> 


-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


More information about the CRIU mailing list