Bug 918180 - Do not leave dangling synchronization udev cookies if pvscan --cache is used
Summary: Do not leave dangling synchronization udev cookies if pvscan --cache is used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 19
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 16:31 UTC by Ondrej Kozina
Modified: 2013-04-25 14:05 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.98-6.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-25 14:05:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lvmetad -l all output (57.15 KB, application/x-bzip2)
2013-03-05 16:31 UTC, Ondrej Kozina
no flags Details
/etc/lvm/archive in time of failure (6.52 KB, application/x-bzip2)
2013-03-05 16:33 UTC, Ondrej Kozina
no flags Details
'dmsetup -c table' output right after the failure (325 bytes, text/plain)
2013-03-05 16:34 UTC, Ondrej Kozina
no flags Details
simple reproducer (335 bytes, text/plain)
2013-03-05 16:35 UTC, Ondrej Kozina
no flags Details
'lvs --all' output right after the failure (969 bytes, text/plain)
2013-03-05 16:36 UTC, Ondrej Kozina
no flags Details
thinp metadata dump (642 bytes, text/plain)
2013-03-05 16:37 UTC, Ondrej Kozina
no flags Details
output from reproducer script: basicaly the only interesting part is the last lvremove -vvvv command (35.41 KB, application/x-bzip2)
2013-03-05 16:38 UTC, Ondrej Kozina
no flags Details

Description Ondrej Kozina 2013-03-05 16:31:47 UTC
Created attachment 705538 [details]
lvmetad -l all output

Description of problem:

I bumped into that bug during testing thinp snapshots on system where lvmetad is activated by default. When lvmetad is turned off, snapshot removal works as intended


Version-Release number of selected component (if applicable): lvm2-2.02.98-5.fc19.x86_64
kernel-3.9.0-0.rc0.git15.1.fc19.x86_64 (but it doesn't matter. using 3.8 series leads into same result)


How reproducible: Always


Steps to Reproduce:
1. Create a thin pool and a thin volume
2. Create few snapshots on top of thin volume
3. Try to remove them
(reproducing script attached)
  
Actual results: Snapshots won't be removed

Expected results: Snapshots are removed

Additional info:

Comment 1 Ondrej Kozina 2013-03-05 16:33:46 UTC
Created attachment 705539 [details]
/etc/lvm/archive in time of failure

Comment 2 Ondrej Kozina 2013-03-05 16:34:48 UTC
Created attachment 705540 [details]
'dmsetup -c table' output right after the failure

Comment 3 Ondrej Kozina 2013-03-05 16:35:52 UTC
Created attachment 705541 [details]
simple reproducer

Comment 4 Ondrej Kozina 2013-03-05 16:36:43 UTC
Created attachment 705542 [details]
'lvs --all' output right after the failure

Comment 5 Ondrej Kozina 2013-03-05 16:37:39 UTC
Created attachment 705544 [details]
thinp metadata dump

Comment 6 Ondrej Kozina 2013-03-05 16:38:49 UTC
Created attachment 705545 [details]
output from reproducer script: basicaly the only interesting part is the last lvremove -vvvv command

Comment 7 Ondrej Kozina 2013-03-05 16:43:03 UTC
dmesg is silent except this line repeated several times:

[ 6250.288694] device-mapper: thin: Deletion of thin device 8 failed.

Comment 8 Petr Rockai 2013-04-03 11:54:30 UTC
This is completely un-reproducible on vanilla 3.7.6. Considering the kernel message you get, it might not be related to lvmetad afterall. See also:

#ioctl/libdm-iface.c:1742   device-mapper: message ioctl on  failed: Device or resource busy

it would seem that something (udev?) is holding your thin device open and hence it can't be removed? If you can still reproduce the problem, can you just add a sleep 1 between the creation and deletion loops to see if it goes away?

Comment 9 Marian Csontos 2013-04-03 13:39:45 UTC
To me looks like a Rawhide version of Bug 889469: check there are no dangling udev cookies left:

    dmsetup udevcookies

This issue is fixed upstream and is present in F19 too.

New lvm2 release is badly wanted.

Comment 10 Marian Csontos 2013-04-03 13:41:12 UTC
To clarify: issue is present in F19.

Comment 11 Ondrej Kozina 2013-04-03 16:49:19 UTC
Thanks Marian! It definitely looks like reincarnation of that bug. I see a dozen of hanging cookies after the failure. Thus, I'll try to sort it out with Peter later

Comment 12 Fedora End Of Life 2013-04-03 17:07:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 13 Peter Rajnoha 2013-04-09 08:18:27 UTC
Here's a scratch build with the patch for the dangling cookies + small fix for autoactivation to not trigger when it should not... Please try if it solves the problem:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=5231336

Comment 14 Fedora Update System 2013-04-09 09:16:23 UTC
lvm2-2.02.98-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lvm2-2.02.98-6.fc19

Comment 15 Fedora Update System 2013-04-19 16:51:35 UTC
Package lvm2-2.02.98-7.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lvm2-2.02.98-7.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6103/lvm2-2.02.98-7.fc19
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2013-04-25 14:05:57 UTC
lvm2-2.02.98-7.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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