| Summary: | endless looping in _free_vginfo | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | James M. Leddy <james.leddy> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| Status: | CLOSED ERRATA | QA Contact: | Corey Marthaler <cmarthal> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 6.0 | CC: | agk, coughlan, dwysocha, gborsuk, heinzm, jbrassow, jrfuller, jwest, mbroz, prajnoha, prockai, thornber, zkabelac |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.83-3.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-19 14:27:23 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 688544 | ||
I'm puzzled that nobody came across this before. At first glance, it looks like you need 4 distinct VGs with the same name to get this condition. I've applied the patch upstream, but not attempted to reproduce it. (In reply to comment #4) > At first glance, it looks like you need 4 distinct VGs with the same name to > get this condition. I've applied the patch upstream, but not attempted to > reproduce it. Yes, which seems a bit weird. I brought this up in the meeting today, they said they had 2 paths to each host, but it isn't clear that they make sure every array has a unique pv/vgname. Hopefully we'll get a core soon so we can verify this for certain. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0772.html |
Description of problem: If you have a machine with multipath and Physical/Logical Volumes on the disk, it'll have multiple entries in lvm. The way lvm deals with this (as far as I can tell) is to use a hash table based on the lvname, and then use a linked list for duplicates, as you'll have if you're using MP. The problem is in _free_vginfo, if vginfo is the fourth node or later, it won't be examined because the traversal stops on the 2nd node, and inspects the 3rd node. static int _free_vginfo(struct lvmcache_vginfo *vginfo) { struct lvmcache_vginfo *primary_vginfo, *vginfo2; int r = 1; _free_cached_vgmetadata(vginfo); vginfo2 = primary_vginfo = vginfo_from_vgname(vginfo->vgname, NULL); if (vginfo == primary_vginfo) { dm_hash_remove(_vgname_hash, vginfo->vgname); if (vginfo->next && !dm_hash_insert(_vgname_hash, vginfo->vgname, vginfo->next)) { log_error("_vgname_hash re-insertion for %s failed", vginfo->vgname); r = 0; } } else do if (vginfo2->next == vginfo) { vginfo2->next = vginfo->next; break; } while ((vginfo2 = primary_vginfo->next)); Here is a hastily written patch diff -c /home/james/rpmbuild/lvm2/2.02.72-8.fc14.4/work/LVM2.2.02.72/lib/cache/lvmcache.c /tmp/buffer-content-2482n5q --- /home/james/rpmbuild/lvm2/2.02.72-8.fc14.4/work/LVM2.2.02.72/lib/cache/lvmcache.c 2010-07-09 11:34:42.000000000 -0400 +++ /tmp/buffer-content-2482n5q 2011-03-09 20:42:39.946008936 -0500 @@ -819,7 +819,7 @@ vginfo2->next = vginfo->next; break; } - while ((vginfo2 = primary_vginfo->next)); + while ((vginfo2 = vginfo2->next)); if (vginfo->vgname) dm_free(vginfo->vgname); Version-Release number of selected component (if applicable): 2.02.72-8.el6.4