[Pkg-postgresql-public] postgresql-common testsuite loop device problems

Martin Pitt mpitt at debian.org
Wed Jul 25 05:01:46 UTC 2012


Peter Eisentraut [2012-07-24 15:21 +0300]:
> > Are you actually using the loop device? I. e. does losetup -a show
> > anything?
> 
> $ sudo losetup -a
> /dev/loop7: [0011]:34957998 (/tmp/jcs0Qep1NT)
> 
> That file doesn't exit and lsof doesn't show anything about it.

Right, it's a temporary name-less file, i. e. gets unlinked right
after creation. The inode is supposed to go away right after losetup -d
which apparently failed.

Is this still mounted to /var/lib/postgresql at that time?

Could you perhaps change this line:

END { system "umount /var/lib/postgresql 2>/dev/null; losetup -d /dev/loop7 2>/dev/null; true"; }

in t/030_errors.t to drop the 2>/dev/null and see which of those is
failing? I presume umount is failing because something is still busy.
Was any other test failing before which would explain this?

> I've experimented with using losetup -f to find a free loop device
> instead of hardcoding loop7, but that ends up locking up each loop
> device in a similar fashion after a few runs.

Right, so that will only increase the damage. That sounds like you
could reproduce it, so let's rather find out what's keeping it busy. I
figure we need some extra cleanup code in case of failures to ensure
to kill all leftover postmasters.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the Pkg-postgresql-public mailing list