All of lore.kernel.org
 help / color / mirror / Atom feed
* The segment fault with NULL point using when recovering failure
@ 2010-09-15 15:59 Mike Gao
  2010-09-17  1:44 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gao @ 2010-09-15 15:59 UTC (permalink / raw)
  To: xfs, Dave Chinner


[-- Attachment #1.1: Type: text/plain, Size: 679 bytes --]

xlog_recover_process_iunlinks(
    xlog_t        *log)
{
                /*
                 * Reacquire the agibuffer and continue around
                 * the loop. This should never fail as we know
                 * the buffer was good earlier on.
                 */
                error = xfs_read_agi(mp, NULL, agno, &agibp);
                ASSERT(error == 0);
                agi = XFS_BUF_TO_AGI(agibp);

}
If no defined DEBUG, ASSERT will not work and agibp could be ZERO if there
is a error in xfs_read_agi.
And the comment shouldn't say it never fail because  xfs_read_agi will
return error in function and it does when there is forced shutdown.

Thanks,
Mike Gao

[-- Attachment #1.2: Type: text/html, Size: 756 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The segment fault with NULL point using when recovering failure
  2010-09-15 15:59 The segment fault with NULL point using when recovering failure Mike Gao
@ 2010-09-17  1:44 ` Dave Chinner
  2010-09-24 15:53   ` Mike Gao
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2010-09-17  1:44 UTC (permalink / raw)
  To: Mike Gao; +Cc: xfs

On Wed, Sep 15, 2010 at 10:59:07AM -0500, Mike Gao wrote:
> xlog_recover_process_iunlinks(
>     xlog_t        *log)
> {
>                 /*
>                  * Reacquire the agibuffer and continue around
>                  * the loop. This should never fail as we know
>                  * the buffer was good earlier on.
>                  */
>                 error = xfs_read_agi(mp, NULL, agno, &agibp);
>                 ASSERT(error == 0);
>                 agi = XFS_BUF_TO_AGI(agibp);
> 
> }
> If no defined DEBUG, ASSERT will not work and agibp could be ZERO if there
> is a error in xfs_read_agi.
> And the comment shouldn't say it never fail because  xfs_read_agi will
> return error in function and it does when there is forced shutdown.

Have you seen a failure here?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The segment fault with NULL point using when recovering failure
  2010-09-17  1:44 ` Dave Chinner
@ 2010-09-24 15:53   ` Mike Gao
  2010-09-29  6:05     ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gao @ 2010-09-24 15:53 UTC (permalink / raw)
  To: xfs, Dave Chinner, Christoph Hellwig, Eric Sandeen


[-- Attachment #1.1: Type: text/plain, Size: 1356 bytes --]

I am curious about how this happens.
This error is caused by log recovery when mount try to fill super block. As
super block is protected by log or Journaling, it shouldn't be corrupted or
can't be recovery by journaling.

Anyway, this is reported as XFS INTERNAL ERROR.

XFS internal error XFS_WANT_CORRUPTED_GOTO at line 4147 of file
fs/xfs/xfs_bmap.c.  Caller 0x871b9c26


Thanks,
Mike

On Thu, Sep 16, 2010 at 8:44 PM, Dave Chinner <david@fromorbit.com> wrote:

> On Wed, Sep 15, 2010 at 10:59:07AM -0500, Mike Gao wrote:
> > xlog_recover_process_iunlinks(
> >     xlog_t        *log)
> > {
> >                 /*
> >                  * Reacquire the agibuffer and continue around
> >                  * the loop. This should never fail as we know
> >                  * the buffer was good earlier on.
> >                  */
> >                 error = xfs_read_agi(mp, NULL, agno, &agibp);
> >                 ASSERT(error == 0);
> >                 agi = XFS_BUF_TO_AGI(agibp);
> >
> > }
> > If no defined DEBUG, ASSERT will not work and agibp could be ZERO if
> there
> > is a error in xfs_read_agi.
> > And the comment shouldn't say it never fail because  xfs_read_agi will
> > return error in function and it does when there is forced shutdown.
>
> Have you seen a failure here?
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>

[-- Attachment #1.2: Type: text/html, Size: 1961 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The segment fault with NULL point using when recovering failure
  2010-09-24 15:53   ` Mike Gao
@ 2010-09-29  6:05     ` Dave Chinner
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2010-09-29  6:05 UTC (permalink / raw)
  To: Mike Gao; +Cc: Christoph Hellwig, Eric Sandeen, xfs

[Mike, please don't top-post responses - it makes it really hard to
quote properly. ]

On Fri, Sep 24, 2010 at 10:53:43AM -0500, Mike Gao wrote:
> On Thu, Sep 16, 2010 at 8:44 PM, Dave Chinner <david@fromorbit.com> wrote:
> > On Wed, Sep 15, 2010 at 10:59:07AM -0500, Mike Gao wrote:
> > > xlog_recover_process_iunlinks(
> > >     xlog_t        *log)
> > > {
> > >                 /*
> > >                  * Reacquire the agibuffer and continue around
> > >                  * the loop. This should never fail as we know
> > >                  * the buffer was good earlier on.
> > >                  */
> > >                 error = xfs_read_agi(mp, NULL, agno, &agibp);
> > >                 ASSERT(error == 0);
> > >                 agi = XFS_BUF_TO_AGI(agibp);
> > >
> > > }
> > > If no defined DEBUG, ASSERT will not work and agibp could be ZERO if
> > there
> > > is a error in xfs_read_agi.
> > > And the comment shouldn't say it never fail because  xfs_read_agi will
> > > return error in function and it does when there is forced shutdown.
> >
> > Have you seen a failure here?
>
> I am curious about how this happens.

What, how a failure happens there? The ASSERT is saying that a
failure should never happen there....

> This error is caused by log recovery when mount try to fill super block. As
> super block is protected by log or Journaling, it shouldn't be corrupted or
> can't be recovery by journaling.

I'm not sure I follow you here - the above is reading an AGI, not a
superblock. What is the stack trace that you've seen?

> Anyway, this is reported as XFS INTERNAL ERROR.
> 
> XFS internal error XFS_WANT_CORRUPTED_GOTO at line 4147 of file
> fs/xfs/xfs_bmap.c.  Caller 0x871b9c26

That is from a corrupted bmap btree, which has no connection to
the AGI. I'm confused by what problems you are trying to report.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-29  6:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 15:59 The segment fault with NULL point using when recovering failure Mike Gao
2010-09-17  1:44 ` Dave Chinner
2010-09-24 15:53   ` Mike Gao
2010-09-29  6:05     ` Dave Chinner

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.