Re: [PATCH 00/37] xfs: current 3.4 patch queue

Dave Chinner
2012-04-30T23:20:19Z

On Mon, Apr 30, 2012 at 09:34:34AM -0500, Ben Myers wrote:
> While testing this patchset without Jan's freeze work, I hit this assert.
>
> This one rings bells for me, but I can't find where it's been reported.
>
> -Ben
>
>
> [56571.411824] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
> [56571.412798] IP: [<ffffffffa00bf477>] xfs_log_space_wake+0x17/0x140 [xfs]

Which is failing on this:

(gdb) l *(xfs_log_space_wake+0x17)
0xffffffff81482cb7 is in xfs_log_space_wake (fs/xfs/xfs_log.c:844).
839 struct xfs_mount *mp)
840 {
841 struct log *log = mp->m_log;
842 int free_bytes;
843
844 >>>>>>> if (XLOG_FORCED_SHUTDOWN(log))
845 return;

On this offset:

$ pahole fs/xfs/xfs_log.o |grep -A 6 "^struct log"
struct log {
struct xfs_mount * l_mp; /* 0 8 */
struct xfs_ail * l_ailp; /* 8 8 */
struct xfs_cil * l_cilp; /* 16 8 */
struct xfs_buf * l_xbuf; /* 24 8 */
struct xfs_buftarg * l_targ; /* 32 8 */
uint l_flags; /* 40 4 */
^^^^^^^^^^^^^^^^^

So the log pointer passed is NULL. That's the first definite sign
that the problems you are seeing are all a result of log buffer IO
completing after the log has been torn down.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com