Return-Path: Received: from rcsinet10.oracle.com ([148.87.113.121]:63478 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757651Ab1ANQJY convert rfc822-to-8bit (ORCPT ); Fri, 14 Jan 2011 11:09:24 -0500 Subject: Re: NFS dio aio bug Content-Type: text/plain; charset=us-ascii From: Chuck Lever In-Reply-To: Date: Fri, 14 Jan 2011 11:08:52 -0500 Cc: Trond Myklebust , linux-fsdevel , Linux NFS Mailing List Message-Id: <4E70BD9B-DB23-42EC-B28D-998E16FEC189@oracle.com> References: To: Nick Piggin Sender: linux-nfs-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Hi Nick- On Jan 13, 2011, at 8:29 PM, Nick Piggin wrote: > Hi Trond, > > I'm getting use after frees in aio code in NFS Can you describe how to reproduce this? > [ 2703.396766] Call Trace: > [ 2703.396858] [] ? native_sched_clock+0x27/0x80 > [ 2703.396959] [] ? put_lock_stats+0xe/0x40 > [ 2703.397058] [] ? lock_release_holdtime+0xa8/0x140 > [ 2703.397159] [] lock_acquire+0x95/0x1b0 > [ 2703.397260] [] ? aio_put_req+0x2b/0x60 > [ 2703.397361] [] ? get_parent_ip+0x11/0x50 > [ 2703.397464] [] _raw_spin_lock_irq+0x41/0x80 > [ 2703.397564] [] ? aio_put_req+0x2b/0x60 > [ 2703.397662] [] aio_put_req+0x2b/0x60 > [ 2703.397761] [] do_io_submit+0x2be/0x7c0 > [ 2703.397895] [] sys_io_submit+0xb/0x10 > [ 2703.397995] [] system_call_fastpath+0x16/0x1b > > Adding some tracing, it is due to nfs completing the request then > returning something other than -EIOCBQUEUED, so aio.c > also completes the request. Is this with reads, writes, or both? Are the I/O requests smaller than, equal to, or larger than rsize or wsize? We have a related bug report: hitting the BUG at fs/aio.c:552 (OEL5) and similar for more recent kernels. Looks like dreq refcounting is faulty somehow. -- Chuck Lever chuck[dot]lever[at]oracle[dot]com