RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 858874 - Segmentation fault after performing lvconvert --thinpool vg/thick
Summary: Segmentation fault after performing lvconvert --thinpool vg/thick
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
: 858129 860848 (view as bug list)
Depends On: 858129
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-19 21:28 UTC by Corey Marthaler
Modified: 2013-02-21 08:13 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.98-1.el6
Doc Type: Bug Fix
Doc Text:
This bug was introduced between releases and never appeared in an actual LVM release, RHEL or otherwise. No documentation needed.
Clone Of: 858129
Environment:
Last Closed: 2013-02-21 08:13:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0501 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2013-02-20 21:30:45 UTC

Comment 1 Corey Marthaler 2012-09-19 21:32:00 UTC
This exits in rhel6 as well.

2.6.32-279.el6.x86_64
lvm2-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
lvm2-libs-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
lvm2-cluster-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
udev-147-2.41.el6    BUILT: Thu Mar  1 13:01:08 CST 2012
device-mapper-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-libs-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-event-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-event-libs-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
cmirror-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012


[root@taft-04 ~]# lvcreate -l10 -n vg/thick
  Logical volume "thick" created
[root@taft-04 ~]# lvs -a -o +devices
  LV      VG        Attr     LSize  Pool Origin Devices
  thick   vg        -wi-a--- 40.00m             /dev/sdb1(0)
[root@taft-04 ~]# lvconvert --thinpool vg/thick
  Converted vg/thick_tmeta to thin pool.
Segmentation fault (core dumped)


[root@taft-04 core_files]# gdb /sbin/lvconvert core
[...]
Core was generated by `lvconvert --thinpool vg/thick'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000045f4c8 in print_log ()
Missing separate debuginfos, use: debuginfo-install lvm2-2.02.97-3.el6.x86_64
(gdb) bt
#0  0x000000000045f4c8 in print_log ()
#1  0x00000030460283cb in dm_task_run () from /lib64/libdevmapper.so.1.02
#2  0x00000000004968b6 in ?? ()
#3  0x0000000000496a74 in ?? ()
#4  0x0000000000496c2b in ?? ()
#5  0x0000000000497010 in ?? ()
#6  0x00000000004971b4 in ?? ()
#7  0x00000000004971b4 in ?? ()
#8  0x00000000004971b4 in ?? ()
#9  0x00000000004971b4 in ?? ()
#10 0x00000000004971b4 in ?? ()
#11 0x00000000004971b4 in ?? ()
#12 0x00000000004971b4 in ?? ()
#13 0x00000000004971b4 in ?? ()
#14 0x00000000004971b4 in ?? ()
#15 0x00000000004971b4 in ?? ()
#16 0x00000000004971b4 in ?? ()
#17 0x00000000004971b4 in ?? ()
#18 0x00000000004971b4 in ?? ()
#19 0x00000000004971b4 in ?? ()
#20 0x00000000004971b4 in ?? ()
#21 0x00000000004971b4 in ?? ()
#22 0x00000000004971b4 in ?? ()
#23 0x00000000004971b4 in ?? ()
#24 0x00000000004971b4 in ?? ()
#25 0x00000000004971b4 in ?? ()
#26 0x00000000004971b4 in ?? ()
#27 0x00000000004971b4 in ?? ()
#28 0x00000000004971b4 in ?? ()
#29 0x00000000004971b4 in ?? ()
#30 0x00000000004971b4 in ?? ()
#31 0x00000000004971b4 in ?? ()
#32 0x00000000004971b4 in ?? ()
#33 0x00000000004971b4 in ?? ()
#34 0x00000000004971b4 in ?? ()
#35 0x00000000004971b4 in ?? ()
#36 0x00000000004971b4 in ?? ()
#37 0x00000000004971b4 in ?? ()
#38 0x00000000004971b4 in ?? ()
#39 0x00000000004971b4 in ?? ()
#40 0x00000000004971b4 in ?? ()

Comment 2 Mike Snitzer 2012-09-19 21:40:29 UTC
(In reply to comment #1)

> [root@taft-04 core_files]# gdb /sbin/lvconvert core
> [...]
> Core was generated by `lvconvert --thinpool vg/thick'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x000000000045f4c8 in print_log ()
> Missing separate debuginfos, use: debuginfo-install lvm2-2.02.97-3.el6.x86_64
> (gdb) bt
> #0  0x000000000045f4c8 in print_log ()
> #1  0x00000030460283cb in dm_task_run () from /lib64/libdevmapper.so.1.02
> #2  0x00000000004968b6 in ?? ()

<snip>

like agk said:

(make sure all the relevant debuginfo packages are installed, and run gdb <command> <corefile> then 'bt')

Comment 3 Corey Marthaler 2012-09-19 21:46:29 UTC
You're too fast for me Mike! ;) I got the mid-air collision when attempting this again.


[root@taft-01 ~]# lvconvert --thinpool vg/thick
  Converted vg/thick_tmeta to thin pool.
Segmentation fault (core dumped)


lvconvert[2115]: segfault at 7fff9ed74ffc ip 000000000045ef2b sp 00007fff9ed74fd0 error 6 in lvm[400000+e2000]


[root@taft-01 ~]# gdb /sbin/lvconvert core

Core was generated by `lvconvert --thinpool vg/thick'.
Program terminated with signal 11, Segmentation fault.
#0  print_log (level=7, file=0x30b3a2f221 "ioctl/libdm-iface.c", line=1687, dm_errno=0, format=0x30b3a2f928 "dm %s %s%s %s%s%s %s%.0d%s%.0d%s%s%c%c%s%s%s%s%s%s %.0lu %s [%u] (*%u)")
    at log/log.c:187
187     {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 libsepol-2.0.41-4.el6.x86_64 libudev-147-2.41.el6.x86_64 ncurses-libs-5.7-3.20090208.el6.x86_64 readline-6.0-4.el6.x86_64
(gdb) bt
#0  print_log (level=7, file=0x30b3a2f221 "ioctl/libdm-iface.c", line=1687, dm_errno=0, format=0x30b3a2f928 "dm %s %s%s %s%s%s %s%.0d%s%.0d%s%s%c%c%s%s%s%s%s%s %.0lu %s [%u] (*%u)")
    at log/log.c:187
#1  0x00000030b3a283cb in _do_dm_ioctl (dmt=0x265c610) at ioctl/libdm-iface.c:1666
#2  dm_task_run (dmt=0x265c610) at ioctl/libdm-iface.c:1802
#3  0x00000000004968b6 in _info_run (name=<value optimized out>, dlid=<value optimized out>, info=0x7fff9ed76780, read_ahead=0x0, mknodes=<value optimized out>, with_open_count=1, 
    with_read_ahead=0, major=0, minor=0) at activate/dev_manager.c:120
#4  0x0000000000496a74 in _info (dlid=0x4da0358 "LVM-NUE1wRcawGPX2us4QFh1N0KBDK0Ss2KLE0dJJqcyuXZHYJdasbq2xqiIxbTAa7CY", with_open_count=1, with_read_ahead=0, info=0x7fff9ed76780, 
    read_ahead=0x0) at activate/dev_manager.c:251
#5  0x0000000000496c2b in _add_dev_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, layer=0x0) at activate/dev_manager.c:1080
#6  0x0000000000497010 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=0) at activate/dev_manager.c:1322
#7  0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#8  0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#9  0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#10 0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#11 0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#12 0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369
#13 0x00000000004971b4 in _add_lv_to_dtree (dm=0x266add0, dtree=0x2653d30, lv=0x26678e8, origin_only=<value optimized out>) at activate/dev_manager.c:1369

Comment 4 Corey Marthaler 2012-09-27 21:40:28 UTC
FWIW, same issue when converting a striped volume.

[root@taft-04 ~]# lvcreate -i 2 -n stripe_pool -L 100M taft
  Using default stripesize 64.00 KiB
  Rounding size (25 extents) up to stripe boundary size (26 extents)
  Logical volume "stripe_pool" created

[root@taft-04 ~]# lvs -a -o +devices
  LV          VG    Attr     LSize   Devices
  stripe_pool taft  -wi-a--- 104.00m /dev/sdb1(0),/dev/sdc1(0)

[root@taft-04 ~]# lvconvert --thinpool taft/stripe_pool
  Converted taft/stripe_pool_tmeta to thin pool.
Segmentation fault (core dumped)

[root@taft-04 core_files]# gdb /sbin/lvconvert core
[...]
Core was generated by `lvconvert --thinpool taft/stripe_pool'.
Program terminated with signal 11, Segmentation fault.
#0  print_log (level=7, file=0x304602f221 "ioctl/libdm-iface.c", line=1687, dm_errno=<value optimized out>, format=<value optimized out>) at log/log.c:279
279                     if (verbose_level() > _LOG_DEBUG)
(gdb) bt
#0  print_log (level=7, file=0x304602f221 "ioctl/libdm-iface.c", line=1687, dm_errno=<value optimized out>, format=<value optimized out>) at log/log.c:279
#1  0x00000030460283cb in _do_dm_ioctl (dmt=0x1f20580) at ioctl/libdm-iface.c:1666
#2  dm_task_run (dmt=0x1f20580) at ioctl/libdm-iface.c:1802
#3  0x00000000004968b6 in _info_run (name=<value optimized out>, dlid=<value optimized out>, info=0x7fffb6e337b0, read_ahead=0x0, mknodes=<value optimized out>, with_open_count=1, 
    with_read_ahead=0, major=0, minor=0) at activate/dev_manager.c:120
#4  0x0000000000496a74 in _info (dlid=0x4978288 "LVM-Lujmrlz1MIu5coMf3LtedmeribBhfZGMnRTvRfaz1cH4ZAypouV0bz7mSkMRsgoh", with_open_count=1, with_read_ahead=0, info=0x7fffb6e337b0, 
    read_ahead=0x0) at activate/dev_manager.c:251
#5  0x0000000000496c2b in _add_dev_to_dtree (dm=0x1f3bed0, dtree=0x1f20ea0, lv=0x1f369d8, layer=0x0) at activate/dev_manager.c:1080
#6  0x0000000000497010 in _add_lv_to_dtree (dm=0x1f3bed0, dtree=0x1f20ea0, lv=0x1f369d8, origin_only=0) at activate/dev_manager.c:1322
[...]

Comment 5 Zdenek Kabelac 2012-10-08 12:06:22 UTC
lvconvert functionality has been updated upstream.

https://www.redhat.com/archives/lvm-devel/2012-October/msg00015.html


lvcreate  lv1 &&  lv2  (i.e. mirrors) and use them for thinpool:

lvconvert   --thinpool  vg/lv1  --poolmetadata vg/lv2

Comment 6 Zdenek Kabelac 2012-10-08 12:07:11 UTC
*** Bug 858129 has been marked as a duplicate of this bug. ***

Comment 7 Zdenek Kabelac 2012-10-11 15:19:09 UTC
*** Bug 860848 has been marked as a duplicate of this bug. ***

Comment 9 Nenad Peric 2012-10-31 09:17:39 UTC
Is there any special reason that lvconvert has different arguments allowed than lvcreate (for thinp)? It does not make life much easier if different switches are used for the similar functionality. 

lvcreate supports -T, --thin and --thinpool

lvcreate supports only --thinpool



Other than that, the error displayed while using the commadn without --poolmetadata is not too descriptive:

lvconvert --thinpool vg_forthin/mirror 
  Uknown metadata.

This sound as if it read metadata which is not in the correct format or something (at least to me, and I would guess to most system admins). 

Could be written maybe as:

You must supply thin pool metadata LV for conversion

or 

--poolmetadata is a mandatory field/option/argument 


That said, I am marking this BZ as verified with following software versions:

lvm2-libs-2.02.98-2.el6.x86_64
lvm2-devel-2.02.98-2.el6.x86_64
lvm2-cluster-2.02.98-2.el6.x86_64
lvm2-2.02.98-2.el6.x86_64
device-mapper-libs-1.02.77-2.el6.x86_64
device-mapper-event-libs-1.02.77-2.el6.x86_64
device-mapper-event-1.02.77-2.el6.x86_64
device-mapper-1.02.77-2.el6.x86_64
cmirror-2.02.98-2.el6.x86_64

Comment 10 errata-xmlrpc 2013-02-21 08:13:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0501.html


Note You need to log in before you can comment on or make changes to this bug.