linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
	ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: Re: [PATCH] Fix: Sometimes mdmon throws core dump during reshape
Date: Wed, 7 Sep 2011 14:07:59 +1000	[thread overview]
Message-ID: <20110907140759.6ed12d4d@notabene.brown> (raw)
In-Reply-To: <20110905103955.4372.52448.stgit@gklab-128-013.igk.intel.com>

On Mon, 05 Sep 2011 12:39:55 +0200 Adam Kwolek <adam.kwolek@intel.com> wrote:

> Problem was found during reshaping 2 volumes /raid0 and raid5/ in container.
> Sometimes mdmon throws core dump due to NULL pointer exception.
> 
> Problem occurs in scenario:
> - managemon: is about spare activation (degraded raid4 volume == raid0 under takeover)
> - managemon: detect level change and signals monitor (manage_member() calls replace_array())
> - monitor: detects transition raid4/5->raid0 and sets a->container to NULL
>            to indicate array deactivation
> - managemon : continues his work and tries to activate spare (a->check_degraded is set).
>               NULL pointer is passed to metadata handler activate_spare()
>               Core dump is generated.
> 
> To resolve this situation managemon (after monitor kick) checks again
> a->container pointer to learn if current array is not to be deactivated.

This looks like it might be the same bug as is fixed by
     Lukasz Dorau <lukasz.dorau@intel.com>
in
  Subject: [PATCH] FIX: Mdmon crashes after changing RAID level from 1 to 0

Does that look likely?

Thanks,
NeilBrown


> 
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
> 
>  managemon.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/managemon.c b/managemon.c
> index d020f82..3540dac 100644
> --- a/managemon.c
> +++ b/managemon.c
> @@ -475,6 +475,12 @@ static void manage_member(struct mdstat_ent *mdstat,
>  		}
>  	}
>  
> +	/* we are after monitor kick,
> +	 * so container field can be cleared - check it again
> +	 */
> +	if (a->container == NULL)
> +		return;
> +
>  	/* We don't check the array while any update is pending, as it
>  	 * might container a change (such as a spare assignment) which
>  	 * could affect our decisions.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2011-09-07  4:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05 10:39 [PATCH] Fix: Sometimes mdmon throws core dump during reshape Adam Kwolek
2011-09-06 19:09 ` Williams, Dan J
2011-09-07  6:25   ` Kwolek, Adam
2011-09-07  4:07 ` NeilBrown [this message]
2011-09-07  6:36   ` Kwolek, Adam

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=20110907140759.6ed12d4d@notabene.brown \
    --to=neilb@suse.de \
    --cc=adam.kwolek@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=wojciech.neubauer@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).