Bug 739190

Summary: lvcreate -s throws dlopen errors
Product: Red Hat Enterprise Linux 6 Reporter: Kenaniah Cerny <server_admin>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: agk, coughlan, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.95-2.el6 Doc Type: Bug Fix
Doc Text:
The dmeventd, device-mapper daemon, used e.g. for monitoring LVM based mirrors and snapshots, is now properly restarted during package update to fetch new versions of installed libraries to avoid any code divergencies that could end up with a symbol lookup failure.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:00:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 756082    

Description Kenaniah Cerny 2011-09-16 18:11:23 UTC
Description of problem:
When attempting to create a snapshot using lvm2, the following error is produced:

# lvcreate -L2000M -s -n vmsnap /dev/VolGroup00/lv_root
  Rounding up size to full physical extent 1.97 GiB
  VolGroup00-vmsnap: event registration failed: 24717:3 libdevmapper-event-lvm2snapshot.so dlopen failed: /lib64/liblvm2cmd.so.2.02: symbol dm_event_handler_set_dmeventd_path, version Base not defined in file libdevmapper-event.so.1.02 with link time reference
  VolGroup00/snapshot0: snapshot segment monitoring function failed.
  Logical volume "vmsnap" created


LVM Kickstart settings:
clearpart --all --initlabel
part /boot --fstype=ext4 --size=500
part pv.9 --grow --size=1024

volgroup VolGroup00 --pesize=32768 pv.9
logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024
logvol /snapshots --name=lv_snapshots --vgname=VolGroup00 --size=2048
logvol swap --name=lv_swap --vgname=VolGroup00 --grow --size=1000 --maxsize=2048


Version-Release number of selected component (if applicable):
lvm2.x86_64                    2.02.83-3.el6       @rhel-x86_64-server-6

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Jonathan Earl Brassow 2011-09-16 18:54:27 UTC
lvm2-libs rpm installed?
or
recently upgraded device-mapper-event rpm before doing operation?

Comment 3 Kenaniah Cerny 2011-09-16 19:17:41 UTC
Installed RPMs:

# yum list installed | grep device-mapper
device-mapper.x86_64           1.02.62-3.el6       @rhel-x86_64-server-6
device-mapper-devel.x86_64     1.02.62-3.el6       @rhel-x86_64-server-optional-                                                                             6
device-mapper-event.x86_64     1.02.62-3.el6       @rhel-x86_64-server-6
device-mapper-event-devel.x86_64
device-mapper-event-libs.x86_64
device-mapper-libs.x86_64      1.02.62-3.el6       @rhel-x86_64-server-6
device-mapper-multipath.x86_64 0.4.9-41.el6_1.1    @rhel-x86_64-server-6
device-mapper-multipath-libs.x86_64


# yum list installed | grep lvm2
lvm2.x86_64                    2.02.83-3.el6       @rhel-x86_64-server-6
lvm2-devel.x86_64              2.02.83-3.el6       @rhel-x86_64-server-optional-                                                                             6
lvm2-libs.x86_64               2.02.83-3.el6       @rhel-x86_64-server-6

Comment 4 Jonathan Earl Brassow 2011-09-16 22:13:43 UTC
ok, that answers the first question.  The rpm containing the snapshot event library is installed (lvm2-libs).  Now we need to know if the version just installed can speak properly with the running daemon.  Note that the running daemon may be from an older rpm.  If the daemon wasn't restarted after an upgrade, I could see something like this potentially happening.  I don't know how to have you validate this hypothesis outside of having you reboot the machine.  This will shutdown all the devices and the daemon and restart everything on boot-up - using the newly installed rpms.  Once rebooted, you can test and see if you get the same response from the command.

If, on the other hand, you haven't installed newer rpms since rebooting, then we'll have to ask more questions to figure out what is going on.

Comment 5 Milan Broz 2011-09-16 22:52:20 UTC
Seems we need clone of bug #454618 (dmevent needs to be restarted during update) for RHEL 6.3.

(Infrastructure is in place, dmevent should support restart, it need just some spec hacking.)

Comment 6 Kenaniah Cerny 2011-09-16 23:21:56 UTC
(In reply to comment #4)
> ok, that answers the first question.  The rpm containing the snapshot event
> library is installed (lvm2-libs).  Now we need to know if the version just
> installed can speak properly with the running daemon.  Note that the running
> daemon may be from an older rpm.  If the daemon wasn't restarted after an
> upgrade, I could see something like this potentially happening.  I don't know
> how to have you validate this hypothesis outside of having you reboot the
> machine.  This will shutdown all the devices and the daemon and restart
> everything on boot-up - using the newly installed rpms.  Once rebooted, you can
> test and see if you get the same response from the command.
> 
> If, on the other hand, you haven't installed newer rpms since rebooting, then
> we'll have to ask more questions to figure out what is going on.

As expected, the server has not been rebooted since the RPM updates were made. Rebooting the server fixed the issue and I no longer receive the error message when using lvcreate.

Comment 9 RHEL Program Management 2011-10-07 15:55:44 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 10 Peter Rajnoha 2011-11-01 11:42:17 UTC
The fix is scheduled for 6.3 (calling dmeventd -R on package update) - an rpm spec file change only, moving to POST (see also bug #644905 comment #1).

Comment 12 Corey Marthaler 2011-12-16 22:34:24 UTC
Adding QA ack for 6.3.

Comment 17 Peter Rajnoha 2012-04-24 13:13:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The dmeventd, device-mapper daemon, used e.g. for monitoring LVM based mirrors and snapshots, is now properly restarted during package update to fetch new versions of installed libraries to avoid any code divergencies that could end up with a symbol lookup failure.

Comment 20 errata-xmlrpc 2012-06-20 15:00:00 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-2012-0962.html