[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Is: Contention in block script when doing guest saving. Was:Re: an issue with 'xm save'



Zhenzhong Duan writes ("Re: [Xen-devel] Is: Contention in block script when 
doing guest saving. Was:Re: an issue with 'xm save'"):
> Attachment is part of xen-hotplug.log that will show the spin.
> Original file is nearly 7G big. I fetch first 1000 lines.

Thanks.  This is quite mystifying to me.


Picking a representative example, and translating it to what I think
the syscalls would be:

> + eval 'exec 200>>/var/run/xen-hotplug/block'
> ++ exec

  fd = open("/var/run/xen-hotplug/block", O_WRONLY|O_APPEND|O_CREAT, 0666);
  dup2(fd, 200);
  close(fd);

> + flock -x 200

  flock(200, LOCK_EX);

> ++ perl -e '
>             open STDIN, "<&200" or die $!;

  dup2(200, 0);

>             my $fd_inum = (stat STDIN)[1]; die $! unless defined $fd_inum;

  fstat(0, &stdin_stat);

>             my $file_inum = (stat $ARGV[0])[1];

  stat("/var/run/xen-hotplug/block", &file_stat);

>             print "y\n" if $fd_inum eq $file_inum;

  if (stdin_stat.st_ino == file_stat.st_ino)
      puts("y");

>                              ' /var/run/xen-hotplug/block
> + rightfile=

And here we see that perl didn't print "y" so the two files must be
different.


Let's try something else: can you strace it ?  That is, get it to the
point where it's spinning, find the pid of the relevant shell process,
and
   strace -f -vvs500 -ooutput.strace PID
where PID is the pid in question ?

Let that run for a fraction of a second and then ^C it.

The output may shed some light.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.