From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Galbraith Subject: Re: Deadlocks due to per-process plugging Date: Mon, 16 Jul 2012 12:13:05 +0200 Message-ID: <1342433585.7659.46.camel@marge.simpson.net> References: <20120711133735.GA8122@quack.suse.cz> <20120711201601.GB9779@quack.suse.cz> <20120713123318.GB20361@quack.suse.cz> <20120713144622.GB28715@quack.suse.cz> <1342343673.28142.2.camel@marge.simpson.net> <1342405366.7659.35.camel@marge.simpson.net> <1342432094.7659.39.camel@marge.simpson.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Jan Kara , Jeff Moyer , LKML , linux-fsdevel@vger.kernel.org, Tejun Heo , Jens Axboe , mgalbraith@suse.com To: Thomas Gleixner Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 2012-07-16 at 11:59 +0200, Thomas Gleixner wrote: > On Mon, 16 Jul 2012, Mike Galbraith wrote: > > On Mon, 2012-07-16 at 10:59 +0200, Thomas Gleixner wrote: > > > On Mon, 16 Jul 2012, Mike Galbraith wrote: > > > > On Sun, 2012-07-15 at 11:14 +0200, Mike Galbraith wrote: > > > > > On Sun, 2012-07-15 at 10:59 +0200, Thomas Gleixner wrote: > > > > > > > > > > Can you figure out on which lock the stuck thread which did not unplug > > > > > > due to tsk_is_pi_blocked was blocked? > > > > > > > > > > I'll take a peek. > > > > > > > > Sorry for late reply, took a half day away from box. Jan had already > > > > done the full ext3 IO deadlock analysis: > > > > > > > > Again kjournald is waiting for buffer IO on block 4367635 (sector > > > > 78364838) to finish. Now it is dbench thread 0xffff88026f330e70 which > > > > has submitted this buffer for IO and is still holding this buffer behind > > > > its plug (request for sector 78364822..78364846). The dbench thread is > > > > waiting on j_checkpoint mutex (apparently it has successfully got the > > > > mutex in the past, checkpointed some buffers, released the mutex and > > > > hung when trying to acquire it again in the next loop of > > > > __log_wait_for_space()). > > > > > > And what's holding j_checkpoint mutex and not making progress? > > > > Waiting for wakeup from kjournald. > > So kicking the io in __log_wait_for_space() > > spin_unlock(&journal->j_state_lock); > > --> HERE > > mutex_lock(&journal->j_checkpoint_mutex); > > should fix the issue, right ? Should for this scenario. Jan said he could think of ways to likely make the same happen in xfs. -Mike