Debian Bug report logs - #736173
lvextend segfault

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <[email protected]>; Source for lvm2 is src:lvm2 (PTS, buildd, popcon).

Reported by: Ian Jackson <[email protected]>

Date: Mon, 20 Jan 2014 18:12:01 UTC

Severity: normal

Found in version lvm2/2.02.95-8

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], Debian LVM Team <[email protected]>:
Bug#736173; Package lvm2. (Mon, 20 Jan 2014 18:12:05 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], Debian LVM Team <[email protected]>. (Mon, 20 Jan 2014 18:12:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Ian Jackson <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lvextend segfault
Date: Mon, 20 Jan 2014 18:08:45 +0000
Package: lvm2
Version: 2.02.95-8
Severity: normal

I have a reproducible segfault in lvextend.

The crashing command is this:
  lvextend -i1 -l +5492 /dev/gall-mite/root /dev/sdb

If reportbug doesn't include it by itself, I will send a copy of the 
output of lvdisplay, vgdisplay and pvdisplay.

-- System Information:
Debian Release: 7.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lvm2 depends on:
ii  dmsetup                   2:1.02.74-8
ii  initscripts               2.88dsf-41+deb7u1
ii  libc6                     2.13-38
ii  libdevmapper-event1.02.1  2:1.02.74-8
ii  libdevmapper1.02.1        2:1.02.74-8
ii  libreadline5              5.2+dfsg-2~deb7u1
ii  libudev0                  175-7.2
ii  lsb-base                  4.1+Debian8+deb7u1

lvm2 recommends no packages.

lvm2 suggests no packages.

-- no debconf information



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#736173; Package lvm2. (Mon, 20 Jan 2014 18:30:08 GMT) (full text, mbox, link).


Acknowledgement sent to Ian Jackson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Mon, 20 Jan 2014 18:30:08 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Ian Jackson <[email protected]>
To: <[email protected]>
Subject: lvextend segfault
Date: Mon, 20 Jan 2014 18:14:31 +0000
Here's that *display output I promised.

I have the system where this occurs ready and waiting for debugging
steps.  If I don't get useful suggestions here I may get out a
debugger :-).

BTW I'm aware of #561931 but (a) that's very old and (b) supplying the
pv name doesn't help:

root@gall-mite:~# lvextend -i1 -l +5492 /dev/gall-mite/root /dev/sdb
  Extending logical volume root to 453.52 GiB
  Segmentation fault

Thanks,
Ian.

root@gall-mite:~# lvdisplay -a
  --- Logical volume ---
  LV Path                /dev/gall-mite/root
  LV Name                root
  VG Name                gall-mite
  LV UUID                ieotHT-FTgL-3WX2-4Vlq-BVRq-GLNB-yoE7Uh
  LV Write Access        read/write
  LV Creation host, time gall-mite, 2014-01-20 17:34:34 +0000
  LV Status              available
  # open                 1
  LV Size                432.06 GiB
  Current LE             110608
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     512
  Block device           254:0
   
  --- Logical volume ---
  LV Path                /dev/gall-mite/swap_1
  LV Name                swap_1
  VG Name                gall-mite
  LV UUID                h1s6rg-WgvL-MceO-QEmU-TwKj-zOwa-twWTtF
  LV Write Access        read/write
  LV Creation host, time gall-mite, 2014-01-20 17:34:34 +0000
  LV Status              available
  # open                 2
  LV Size                1.86 GiB
  Current LE             476
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
   
  --- Logical volume ---
  LV Path                /dev/gall-mite/swap_osstest_build
  LV Name                swap_osstest_build
  VG Name                gall-mite
  LV UUID                nuzgsT-yToV-ERtT-qvwH-l0Lt-cuZA-yQfjLg
  LV Write Access        read/write
  LV Creation host, time gall-mite, 2014-01-20 17:46:10 +0000
  LV Status              available
  # open                 2
  LV Size                10.00 GiB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2
   
root@gall-mite:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               gall-mite
  PV Size               232.55 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              59532
  Free PE               0
  Allocated PE          59532
  PV UUID               MMfWnJ-G0PD-oHFD-T8Jc-7W8f-76El-9qfOHS
   
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               gall-mite
  PV Size               232.83 GiB / not usable 2.58 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              59604
  Free PE               5492
  Allocated PE          54112
  PV UUID               UV94be-oNne-I5n8-FL3U-FxVI-kbSp-AQpMsM
   
root@gall-mite:~# vgdisplay 
  --- Volume group ---
  VG Name               gall-mite
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               465.38 GiB
  PE Size               4.00 MiB
  Total PE              119136
  Alloc PE / Size       113644 / 443.92 GiB
  Free  PE / Size       5492 / 21.45 GiB
  VG UUID               G7KYvx-Al7G-tob3-nZY6-IFXs-IAR3-7UVYoK
   
root@gall-mite:~# 



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#736173; Package lvm2. (Wed, 17 Sep 2014 21:03:10 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Bird <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Wed, 17 Sep 2014 21:03:10 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Mike Bird <[email protected]>
To: [email protected]
Subject: lvextend segfault - narrowing it down
Date: Wed, 17 Sep 2014 13:44:52 -0700
Version: 2.02.95-8

No errors from badblocks, pvck, vgck, lvck, fsck.

I have to use -i1 and specify PV /dev/sdb6 as LVM wants to use
PV /dev/sda6 which doesn't have the 64 free extents I need.

However if I ask for only 1 extent the lvextend works with sda6
but still segfaults with sdb6.

Tried all alloc policies - no change.

Tried --noudevsync - no change.

Tried creating new empty /etc/lvm/{backup,archive} - no change.

The segfault occurs even with -t.

Here's the last part of -vvv output before the segfault.  The
"leaving 0" seems to be an unrelated logging error as it is also
shown when lvextend is successful


  Extending logical volume IMS+++ to 130.00 GiB
      Extending segment type, striped
        Allowing allocation on /dev/sda6 start PE 2048 length 683
        Trying allocation using contiguous policy.
        Still need 64 total extents:
          1 (1 data/0 parity) parallel areas of 64 extents each
          0 mirror logs of 0 extents each
        Considering allocation area 1 as /dev/sda6 start PE 2048 length 683 
leaving 0.
        Trying allocation using cling policy.
        Still need 64 total extents:
          1 (1 data/0 parity) parallel areas of 64 extents each
          0 mirror logs of 0 extents each
        Considering allocation area 1 as /dev/sda6 start PE 2048 length 683 
leaving 0.
        Trying allocation using normal policy.
        Cling_to_allocated is set
        Still need 64 total extents:
          1 (1 data/0 parity) parallel areas of 64 extents each
          0 mirror logs of 0 extents each
        Considering allocation area 1 as /dev/sda6 start PE 2048 length 683 
leaving 0.
Segmentation fault


If you need more info pls let me know.  Backuping up a giant LV, removing
it, creating a larger LV, and restoring is what LVM normally helps me avoid.



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#736173; Package lvm2. (Wed, 17 Sep 2014 21:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Alasdair G Kergon <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Wed, 17 Sep 2014 21:33:04 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Alasdair G Kergon <[email protected]>
To: Mike Bird <[email protected]>
Cc: [email protected]
Subject: Re: Bug#736173: lvextend segfault - narrowing it down
Date: Wed, 17 Sep 2014 22:31:46 +0100
On Wed, Sep 17, 2014 at 01:44:52PM -0700, Mike Bird wrote:
> Version: 2.02.95-8
 
From an upstream point of view, that's a pretty old release now
and there have been numerous improvements and fixes to the
relevant allocation code.

Two choices:

  Use a more up-to-date version and there's a good chance you'll find the bug
  got fixed.

  Extend the metadata manually using vgcfgbackup, editing the text file
  to add the segment you need, and vgcfgrestore.

Alasdair




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:50:10 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.