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

Re: [Xen-users] "xl restore" leaks a file descriptor?



It's the checkpoint file - i.e. the command line argument to xl
restore - that is being leaked. Here's how you can reproduce:

# df /tmp
# xl save mydomU /tmp/mydomU.save
# df /tmp
# xl restore /tmp/mydomU.save
# lsof | grep mydomU.save
# rm /tmp/mydomU.save
# df /tmp

Here's the output when I run that on my box:

root@vmhost1:/home/armena# df /tmp
Filesystem                                             1K-blocks
Used Available Use% Mounted on
/dev/disk/by-uuid/61fa8a4c-094d-4b11-8070-362aa88b15f7  19076820
7191260  10893460  40% /
root@vmhost1:/home/armena# xl save www-server /tmp/www-server.save
Saving to /tmp/www-server.save new xl format (info 0x0/0x0/680)
xc: Saving memory: iter 0 (last sent 0 skipped 0): 262144/262144  100%
root@vmhost1:/home/armena# df /tmp
Filesystem                                             1K-blocks
Used Available Use% Mounted on
/dev/disk/by-uuid/61fa8a4c-094d-4b11-8070-362aa88b15f7  19076820
8241928   9842792  46% /
root@vmhost1:/home/armena# xl restore /tmp/www-server.save
Loading new save file /tmp/www-server.save (new xl fmt info 0x0/0x0/680)
 Savefile contains xl domain config
Parsing config from <saved>
xc: Reloading memory pages: 262144/262144  100%
root@vmhost1:/home/armena# lsof | grep www-server.save
xl        20602              root    7r      REG                9,0
1075866524     263106 /tmp/www-server.save
xl        20602 20603        root    7r      REG                9,0
1075866524     263106 /tmp/www-server.save
root@vmhost1:/home/armena# rm /tmp/www-server.save
root@vmhost1:/home/armena# df /tmp
Filesystem                                             1K-blocks
Used Available Use% Mounted on
/dev/disk/by-uuid/61fa8a4c-094d-4b11-8070-362aa88b15f7  19076820
8241932   9842788  46% /

So the checkpoint file is clearly being leaked. Its space is not freed
until the 'xl restore' process is ended by shutting down the domain:

root@vmhost1:/home/armena# xl shutdown www-server
Shutting down domain 13
root@vmhost1:/home/armena# df /tmp
Filesystem                                             1K-blocks
Used Available Use% Mounted on
/dev/disk/by-uuid/61fa8a4c-094d-4b11-8070-362aa88b15f7  19076820
7191272  10893448  40% /

It seems like xl restore should close the checkpoint file as soon as
it's done restoring the domain, allowing the space to be freed, but
that's clearly not happening.

-Andrew

On Aug 11, 2015 04:55, "Ian Campbell" <ian.campbell@xxxxxxxxxx> wrote:
>
> On Fri, 2015-08-07 at 12:50 -0400, Andrew Armenia wrote:
> > The issue appears to occur with any state file - not just one in
> > particular.
>
> Please give some specific examples e.g. paths to some of the files to which
> a fd has been leaked. I'm trying to determine which state files I should be
> investigating, since there are several things which an end user might
> consider a "state file".
>
> Ian.

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


 


Rackspace

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