All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH] Relax journal trim_finish assertion to pass when (to == trimmed_pos).
Date: Tue, 12 Apr 2011 08:40:44 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1104120839390.12198@cobra.newdream.net> (raw)
In-Reply-To: <or62qjxzq3.fsf@livre.localdomain>

On Tue, 12 Apr 2011, Alexandre Oliva wrote:
> I'm getting relatively frequent MDS crashes.  I believe this happens as
> a replay-standby node is about to take over once the MDS it follows is
> restarted, most often because it stopped making progress for a long
> time.  In the core files I checked, waitfor_trim was empty, so this
> shouldn't have ill effects.  Since I'm not sure how to trigger this
> particular assertion failure, I can't say that I've tested this patch
> thoroughly, but unless the purpose of the assertion is to catch the ==
> case, I think it's safe to put it in.

The assertion is that way on purpose.. we shouldn't be trimming to a 
offset we've already trimmed to.  Looking at the code it's not obvious how 
we're getting into that particular corner, though.  Can you reproduce the 
problem with

	debug journaler = 20

?  That should have enough information to track down exactly where things 
are going awry.

Thanks!
sage


> 
> ---
> Relax journal trim_finish assertion to pass when (to == trimmed_pos).
> 
> Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
> ---
>  src/osdc/Journaler.cc |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/osdc/Journaler.cc b/src/osdc/Journaler.cc
> index f3241c4..4f4811c 100644
> --- a/src/osdc/Journaler.cc
> +++ b/src/osdc/Journaler.cc
> @@ -960,7 +960,7 @@ void Journaler::_trim_finish(int r, uint64_t to)
>    assert(r >= 0);
>    
>    assert(to <= trimming_pos);
> -  assert(to > trimmed_pos);
> +  assert(to >= trimmed_pos);
>    trimmed_pos = to;
>  
>    // finishers?
> -- 
> 1.7.4.2
> 
> -- 
> Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/   FSF Latin America board member
> Free Software Evangelist      Red Hat Brazil Compiler Engineer
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

      reply	other threads:[~2011-04-12 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 15:21 [PATCH] Relax journal trim_finish assertion to pass when (to == trimmed_pos) Alexandre Oliva
2011-04-12 15:40 ` Sage Weil [this message]

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=Pine.LNX.4.64.1104120839390.12198@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=oliva@lsd.ic.unicamp.br \
    /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.