All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: Internal error: Pool read_vg crc mismatch only when running in test environment
Date: Wed, 26 Jun 2013 09:49:37 +0200	[thread overview]
Message-ID: <51CA9D11.90007@redhat.com> (raw)
In-Reply-To: <51CA27AC.4040900@redhat.com>

Dne 26.6.2013 01:28, Tony Asleson napsal(a):
> On 06/21/2013 08:53 AM, Zdenek Kabelac wrote:
>> Dne 21.6.2013 01:18, Tony Asleson napsal(a):
>>> Writing some new unit test cases for my latest liblvm patch set and at
>>> the moment I am running into a case where I can run the unit test case
>>> against real disk and it works, but if I run it in the test environment
>>> with loop back devices I am getting an abort with:
>>>
>>> "Internal error: Pool read_vg crc mismatch."
>>>
>>> Any ideas why this error isn't occurring on both?
>>>
>>
>> This happens - if you have requested 'read-only'  VG struct,
>> and you have modifed something in this vgmem pool
>> (either writing to struct, or just using vgmem pool for allocation)
>
> My original inquiry was for ideas why I see this on loop back devices
> and not actual devices.  This response doesn't seem to match what I am
> seeing.

It's hard to give advice if I do not see the actual code.


>
> The stack trace shows that we are getting this error during an
> lvm_vg_open.  I can re-create the error regardless if I open the vg
> struct as read-only or read-write.
>
>  From my initial debug it appears that if the vginfo->vg_use_count > 1
> (in this case 3) we pass 1 as the second parameter to dm_pool_unlock
> which is a crc check of the pool which it finds to be different.  At
> this point it would seem I am exacerbating some type of caching bug or
> that somewhere along the path I am inadvertently changing the contents
> of the vg struct pointer with my latest patches.

There is internal debug support for this kind of problems which mprotects
vg structure, so any write access to locked vg structure crashes the 
application and you may look at stack trace.

But it needs some hand modification of make.tmpl file (no configure option)
Uncomment #DEFS += -DDEBUG_ENFORCE_POOL_LOCKING  and rebuild and retest with
unlimited coredump size.

Zdenek



  reply	other threads:[~2013-06-26  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 23:18 Internal error: Pool read_vg crc mismatch only when running in test environment Tony Asleson
2013-06-21 13:53 ` Zdenek Kabelac
2013-06-25 23:28   ` Tony Asleson
2013-06-26  7:49     ` Zdenek Kabelac [this message]
2013-06-26 22:49       ` Tony Asleson
2013-06-28  9:14         ` Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CA9D11.90007@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.