Bug#592250: [buildd-tools-devel] Bug#592250: schroot: LVM snapshots not fully cleaned up

2010-08-15 Thread Roger Leigh
On Tue, Aug 10, 2010 at 08:08:24PM -0400, James Vega wrote:
> reassign 592250 lvm2 2.02.66-2
> forcemerge 549691 592250
> thanks
> 
> And I just found the lvm2 bug.  Reassigning.

No worries.  I've not had an issue with the snapshotting myself, but
it looks like there's a common underlying cause in the other bug.
I've certainly seen issues shutting down where the swap devices on
LVM were kept open and wouldn't allow a clean shutdown of the VG
or MD device it was on.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?   http://gutenprint.sourceforge.net/
   `-GPG Public Key: 0x25BFB848   Please GPG sign your mail.


signature.asc
Description: Digital signature


Bug#592250: [buildd-tools-devel] Bug#592250: schroot: LVM snapshots not fully cleaned up

2010-08-10 Thread James Vega
reassign 592250 lvm2 2.02.66-2
forcemerge 549691 592250
thanks

And I just found the lvm2 bug.  Reassigning.

On Tue, Aug 10, 2010 at 7:56 PM, James Vega  wrote:
> On Tue, Aug 10, 2010 at 12:09:42PM +0100, Roger Leigh wrote:
>> On Sun, Aug 08, 2010 at 01:08:57PM -0400, James Vega wrote:
>> > Package: schroot
>> > Version: 1.4.7-1
>> > Severity: normal
>> >
>> > As the attached typescript should show, when schroot is finished running
>> > commands in an LVM snapshot chroot, the snapshot is not properly torn
>> > down.  This leads to an accumulation of active snapshots.
>>
>> > I: Executing ‘05lvm setup-start ok’
>> > E: 05lvm:     Setting chunksize to 8 sectors.
>> > E: 05lvm:     Setting logging type to disk
>> > E: 05lvm:     Finding volume group "debil0"
>> > E: 05lvm:     Archiving volume group "debil0" metadata (seqno 1378).
>> > E: 05lvm:     Creating logical volume 
>> > sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df
>> > E: 05lvm:     Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
>> > 1379).
>> > E: 05lvm:     Found volume group "debil0"
>> > E: 05lvm:     Creating debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df
>> > E: 05lvm:     Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
>> > table (254:9)
>> > E: 05lvm:     Resuming 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df (254:9)
>> > E: 05lvm:     Clearing start of logical volume 
>> > "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df"
>> > E: 05lvm:     Creating logical volume snapshot1
>> > E: 05lvm:     Found volume group "debil0"
>> > E: 05lvm:     Found volume group "debil0"
>> > E: 05lvm:     Loading debil0-schroot-real table (254:6)
>> > E: 05lvm:     Suppressed debil0-schroot-real identical table reload.
>> > E: 05lvm:     Loading debil0-schroot table (254:5)
>> > E: 05lvm:     Suppressed debil0-schroot identical table reload.
>> > E: 05lvm:     Loading 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
>> > (254:7)
>> > E: 05lvm:     Suppressed 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow 
>> > identical table reload.
>> > E: 05lvm:     Loading 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
>> > E: 05lvm:     Suppressed 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical 
>> > table reload.
>> > E: 05lvm:     Creating 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow
>> > E: 05lvm:     Loading 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
>> > E: 05lvm:     Resuming 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow (254:10)
>> > E: 05lvm:     Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
>> > table (254:9)
>> > E: 05lvm:     Suspending debil0-schroot (254:5) with filesystem sync with 
>> > device flush
>> > E: 05lvm:     Suspending 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4) with 
>> > filesystem sync with device flush
>> > E: 05lvm:     Suspending debil0-schroot-real (254:6) with filesystem sync 
>> > with device flush
>> > E: 05lvm:     Suspending 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7) 
>> > with filesystem sync with device flush
>> > E: 05lvm:     Found volume group "debil0"
>> > E: 05lvm:     Loading debil0-schroot-real table (254:6)
>> > E: 05lvm:     Suppressed debil0-schroot-real identical table reload.
>> > E: 05lvm:     Loading debil0-schroot table (254:5)
>> > E: 05lvm:     Suppressed debil0-schroot identical table reload.
>> > E: 05lvm:     Loading 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
>> > (254:7)
>> > E: 05lvm:     Suppressed 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow 
>> > identical table reload.
>> > E: 05lvm:     Loading 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
>> > E: 05lvm:     Suppressed 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical 
>> > table reload.
>> > E: 05lvm:     Loading 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
>> > E: 05lvm:     Suppressed 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow identical table 
>> > reload.
>> > E: 05lvm:     Resuming debil0-schroot-real (254:6)
>> > E: 05lvm:     Resuming 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7)
>> > E: 05lvm:     Resuming 
>> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4)
>> > E: 05lvm:     Resuming 
>> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df (254:9)
>> > E: 05lvm:     Resuming debil0-schroot (254:5)
>> > E: 05lvm:     Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
>> > 1380).
>> > I: 05lvm:   Logical volume "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df" 
>> > created
>>
>>
>> > I: Executing ‘05lvm setup-stop ok’
>> > I: 05lvm: Removing device lock for 
>> > /dev/debil0/sid-1bb5a5c0-6fe6-4c52-ae4c-31

Bug#592250: [buildd-tools-devel] Bug#592250: schroot: LVM snapshots not fully cleaned up

2010-08-10 Thread James Vega
On Tue, Aug 10, 2010 at 12:09:42PM +0100, Roger Leigh wrote:
> On Sun, Aug 08, 2010 at 01:08:57PM -0400, James Vega wrote:
> > Package: schroot
> > Version: 1.4.7-1
> > Severity: normal
> > 
> > As the attached typescript should show, when schroot is finished running
> > commands in an LVM snapshot chroot, the snapshot is not properly torn
> > down.  This leads to an accumulation of active snapshots.
> 
> > I: Executing ‘05lvm setup-start ok’
> > E: 05lvm: Setting chunksize to 8 sectors.
> > E: 05lvm: Setting logging type to disk
> > E: 05lvm: Finding volume group "debil0"
> > E: 05lvm: Archiving volume group "debil0" metadata (seqno 1378).
> > E: 05lvm: Creating logical volume 
> > sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df
> > E: 05lvm: Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
> > 1379).
> > E: 05lvm: Found volume group "debil0"
> > E: 05lvm: Creating debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df
> > E: 05lvm: Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> > table (254:9)
> > E: 05lvm: Resuming debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> > (254:9)
> > E: 05lvm: Clearing start of logical volume 
> > "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df"
> > E: 05lvm: Creating logical volume snapshot1
> > E: 05lvm: Found volume group "debil0"
> > E: 05lvm: Found volume group "debil0"
> > E: 05lvm: Loading debil0-schroot-real table (254:6)
> > E: 05lvm: Suppressed debil0-schroot-real identical table reload.
> > E: 05lvm: Loading debil0-schroot table (254:5)
> > E: 05lvm: Suppressed debil0-schroot identical table reload.
> > E: 05lvm: Loading 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
> > (254:7)
> > E: 05lvm: Suppressed 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow identical 
> > table reload.
> > E: 05lvm: Loading 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
> > E: 05lvm: Suppressed 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical 
> > table reload.
> > E: 05lvm: Creating 
> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow
> > E: 05lvm: Loading 
> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
> > E: 05lvm: Resuming 
> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow (254:10)
> > E: 05lvm: Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> > table (254:9)
> > E: 05lvm: Suspending debil0-schroot (254:5) with filesystem sync with 
> > device flush
> > E: 05lvm: Suspending 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4) with 
> > filesystem sync with device flush
> > E: 05lvm: Suspending debil0-schroot-real (254:6) with filesystem sync 
> > with device flush
> > E: 05lvm: Suspending 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7) 
> > with filesystem sync with device flush
> > E: 05lvm: Found volume group "debil0"
> > E: 05lvm: Loading debil0-schroot-real table (254:6)
> > E: 05lvm: Suppressed debil0-schroot-real identical table reload.
> > E: 05lvm: Loading debil0-schroot table (254:5)
> > E: 05lvm: Suppressed debil0-schroot identical table reload.
> > E: 05lvm: Loading 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
> > (254:7)
> > E: 05lvm: Suppressed 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow identical 
> > table reload.
> > E: 05lvm: Loading 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
> > E: 05lvm: Suppressed 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical 
> > table reload.
> > E: 05lvm: Loading 
> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
> > E: 05lvm: Suppressed 
> > debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow identical table 
> > reload.
> > E: 05lvm: Resuming debil0-schroot-real (254:6)
> > E: 05lvm: Resuming 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7)
> > E: 05lvm: Resuming 
> > debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4)
> > E: 05lvm: Resuming debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> > (254:9)
> > E: 05lvm: Resuming debil0-schroot (254:5)
> > E: 05lvm: Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
> > 1380).
> > I: 05lvm:   Logical volume "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df" 
> > created
> 
> 
> > I: Executing ‘05lvm setup-stop ok’
> > I: 05lvm: Removing device lock for 
> > /dev/debil0/sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df, owned by pid 31620
> > E: 05lvm: Using logical volume(s) on command line
> > E: 05lvm:   Can't remove open logical volume 
> > "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df"
> 
> The question here is why did the lvremove command above fail?  What
>

Bug#592250: [buildd-tools-devel] Bug#592250: schroot: LVM snapshots not fully cleaned up

2010-08-10 Thread Roger Leigh
On Sun, Aug 08, 2010 at 01:08:57PM -0400, James Vega wrote:
> Package: schroot
> Version: 1.4.7-1
> Severity: normal
> 
> As the attached typescript should show, when schroot is finished running
> commands in an LVM snapshot chroot, the snapshot is not properly torn
> down.  This leads to an accumulation of active snapshots.

> I: Executing ‘05lvm setup-start ok’
> E: 05lvm: Setting chunksize to 8 sectors.
> E: 05lvm: Setting logging type to disk
> E: 05lvm: Finding volume group "debil0"
> E: 05lvm: Archiving volume group "debil0" metadata (seqno 1378).
> E: 05lvm: Creating logical volume sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df
> E: 05lvm: Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
> 1379).
> E: 05lvm: Found volume group "debil0"
> E: 05lvm: Creating debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df
> E: 05lvm: Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> table (254:9)
> E: 05lvm: Resuming debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> (254:9)
> E: 05lvm: Clearing start of logical volume 
> "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df"
> E: 05lvm: Creating logical volume snapshot1
> E: 05lvm: Found volume group "debil0"
> E: 05lvm: Found volume group "debil0"
> E: 05lvm: Loading debil0-schroot-real table (254:6)
> E: 05lvm: Suppressed debil0-schroot-real identical table reload.
> E: 05lvm: Loading debil0-schroot table (254:5)
> E: 05lvm: Suppressed debil0-schroot identical table reload.
> E: 05lvm: Loading 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
> (254:7)
> E: 05lvm: Suppressed 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow identical 
> table reload.
> E: 05lvm: Loading 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
> E: 05lvm: Suppressed 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical table 
> reload.
> E: 05lvm: Creating 
> debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow
> E: 05lvm: Loading 
> debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
> E: 05lvm: Resuming 
> debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow (254:10)
> E: 05lvm: Loading debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> table (254:9)
> E: 05lvm: Suspending debil0-schroot (254:5) with filesystem sync with 
> device flush
> E: 05lvm: Suspending 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4) with 
> filesystem sync with device flush
> E: 05lvm: Suspending debil0-schroot-real (254:6) with filesystem sync 
> with device flush
> E: 05lvm: Suspending 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7) 
> with filesystem sync with device flush
> E: 05lvm: Found volume group "debil0"
> E: 05lvm: Loading debil0-schroot-real table (254:6)
> E: 05lvm: Suppressed debil0-schroot-real identical table reload.
> E: 05lvm: Loading debil0-schroot table (254:5)
> E: 05lvm: Suppressed debil0-schroot identical table reload.
> E: 05lvm: Loading 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow table 
> (254:7)
> E: 05lvm: Suppressed 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow identical 
> table reload.
> E: 05lvm: Loading 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 table (254:4)
> E: 05lvm: Suppressed 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 identical table 
> reload.
> E: 05lvm: Loading 
> debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow table (254:10)
> E: 05lvm: Suppressed 
> debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df-cow identical table 
> reload.
> E: 05lvm: Resuming debil0-schroot-real (254:6)
> E: 05lvm: Resuming 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59-cow (254:7)
> E: 05lvm: Resuming 
> debil0-experimental--dd3bfc99--a737--4a75--a1db--68153d95db59 (254:4)
> E: 05lvm: Resuming debil0-sid--1bb5a5c0--6fe6--4c52--ae4c--31d39cdb48df 
> (254:9)
> E: 05lvm: Resuming debil0-schroot (254:5)
> E: 05lvm: Creating volume group backup "/etc/lvm/backup/debil0" (seqno 
> 1380).
> I: 05lvm:   Logical volume "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df" created


> I: Executing ‘05lvm setup-stop ok’
> I: 05lvm: Removing device lock for 
> /dev/debil0/sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df, owned by pid 31620
> E: 05lvm: Using logical volume(s) on command line
> E: 05lvm:   Can't remove open logical volume 
> "sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df"

The question here is why did the lvremove command above fail?  What
happens if you lvremove sid-1bb5a5c0-6fe6-4c52-ae4c-31d39cdb48df
by hand?  Does this still give you the same error?

Which kernel version are you running?  Some versions do have buggy
LVM support--I've seen myself some time ago a system which would
allow snapshot creation but n