[CRIU] Criu issue : Error parsing proc fdinfo

Andrew Vagin avagin at parallels.com
Wed Jan 22 00:20:49 PST 2014


On Tue, Jan 21, 2014 at 02:40:16PM +0100, Smain Kahlouch wrote:
> Hello guys,
> 
> I don't know if it's the right place to post this issue but I didn't find
> another way to contact you.
> 
> I'm currently testing lxc features ("docker" to be precise) and I'm facing the
> following message when I try to use criu :
> 
> 
> 1 - check if CRIU is working with my kernel :
> 
> criu check --ms
> (00.012246) Warn  (tun.c:55): Skipping tun support check
> Looks good.
> 
> 2 - Identify what i want to dump, for example varnish:
> 
> init,1  
>   ├─acpid,3886
>   ├─atd,3648
>   ├─auditd,3591
>   │   ├─audispd,3593
>   │   │   └─{audispd},3598
>   │   └─{auditd},3592
>   ├─cron,3781
>   ├─dbus-daemon,3883 --system
>   ├─docker,3732 -d -p /var/run/docker.pid -r=false -s devicemapper
>   │   ├─lxc-start,4592 -n
> 9f81f7bc33c83fc1369b9355c959b6f0d8c87c6758bb75af3ae726ba2bad053a -f...
>   │   │   └─sh,4601 -c /bin/bash -c '/usr/local/sbin/runservices.sh; /usr/sbin/
> sshd -D'
>   │   │       ├─bash,4685 -c /usr/local/sbin/runservices.sh; /usr/sbin/sshd -D
>   │   │       │   └─sshd,5022 -D
>   │   │       ├─cc-node,4774 /usr/bin/cc-node -d -p /var/run/cc-node.pid
>   │   │       │   └─{cc-node},4776
>   │   │       ├─collectdmon,4820 -P /var/run/collectdmon.pid -- -C /etc/
> collectd/collectd.conf
>   │   │       │   └─collectd,4822 -C /etc/collectd/collectd.conf -f
>   │   │       │       ├─{collectd},4823
>   │   │       │       ├─{collectd},4824
>   │   │       │       ├─{collectd},4825
>   │   │       │       ├─{collectd},4826
>   │   │       │       ├─{collectd},4827
>   │   │       │       └─{collectd},4828
>   │   │       ├─rsyslogd,4729 -c5
>   │   │       │   ├─{rsyslogd},4737
>   │   │       │   ├─{rsyslogd},4738
>   │   │       │   └─{rsyslogd},4739
>   │   │       ├─ruby,4837 /usr/bin/collectd-interface-daemon -p 5000 -l /var/
> log -P /var/run -I ...
>   │   │       │   └─{ruby},7084
>   │   │       └─varnishd,4792 -P /var/run/varnishd.pid -a :8000 -T :6082 -f /
> etc/varnish/default.vcl -p ...
>   │   │           └─varnishd,4794 -P /var/run/varnishd.pid -a :8000 -T :6082 -f
> /etc/varnish/default.vcl -p ...
>   │   │               ├─{varnishd},4795
>   │   │               ├─{varnishd},4796
>   │   │               ├─{varnishd},4797
>   │   │               ├─{varnishd},4798
>   │   │               ├─{varnishd},4800
>   │   │               ├─{varnishd},4801
>   │   │               ├─{varnishd},4802
>   │   │               ├─{varnishd},4803
>   │   │               ├─{varnishd},4804
>   │   │               ├─{varnishd},4805
>   │   │               ├─{varnishd},4806
>   │   │               ├─{varnishd},4807
>   │   │               ├─{varnishd},4808
>   │   │               ├─{varnishd},4809
>   │   │               ├─{varnishd},4810
>   │   │               ├─{varnishd},4811
>   │   │               ├─{varnishd},4812
>   │   │               └─{varnishd},4813
> 
> 3 - try to dump
> 
> criu dump --tree 4792 --images-dir /data/ --leave-stopped
> pie: Error (pie/parasite.c:243): mount failed (-1)
> pie: Error (pie/parasite.c:474): Close the control socket for writing
> >
> (00.095409) Error (parasite-syscall.c:787): Can't retrieve FD from socket
> (00.095454) Error (parasite-syscall.c:297): Message reply from daemon is
> trimmed (12/0)
> (00.095468) Error (cr-dump.c:1441): Can't get proc fd (pid: 4792)
> (00.096172) Error (cr-dump.c:1811): Dumping FAILED.
> 
> 
> I built a custom kernel from 3.12.6 debian sources.
> 
> I followed the instructions in your website 
> 
> Could you please help me to fix that.

You are trying to dump a task from another pidns. Unfortunately it's
unsupported by now. I'm going to fix that. I think it will not require too
much time. Thank you for the report.

Currently you can workaround this issue, if you enter in this pidns and
mount procfs in /proc.

unshare -m nsenter -p -t PID criu.sh

# cat criu.sh
set -e
mount -make-rprivate /
mount -t proc proc /proc
criu dump --tree PID --images-dir /data/ --leave-stopped

> 
> Thanks,
> Smana

> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list