From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756513AbYAEQyK (ORCPT ); Sat, 5 Jan 2008 11:54:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755573AbYAEQx5 (ORCPT ); Sat, 5 Jan 2008 11:53:57 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:53122 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755512AbYAEQx4 (ORCPT ); Sat, 5 Jan 2008 11:53:56 -0500 Subject: Re: 2.6.24-rc6: possible recursive locking detected From: Peter Zijlstra To: Herbert Xu Cc: Ingo Molnar , "Rafael J. Wysocki" , Christian Kujau , linux-kernel@vger.kernel.org, jfs-discussion@lists.sourceforge.net, Davide Libenzi , Johannes Berg , Oleg Nesterov In-Reply-To: <20080105071205.GA28936@gondor.apana.org.au> References: <200801040006.47979.rjw@sisk.pl> <20080104083049.GC22803@elte.hu> <20080105071205.GA28936@gondor.apana.org.au> Content-Type: text/plain Date: Sat, 05 Jan 2008 17:53:36 +0100 Message-Id: <1199552016.31975.41.camel@lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2008-01-05 at 18:12 +1100, Herbert Xu wrote: > On Fri, Jan 04, 2008 at 09:30:49AM +0100, Ingo Molnar wrote: > > > > > > [ 1310.670986] ============================================= > > > > [ 1310.671690] [ INFO: possible recursive locking detected ] > > > > [ 1310.672097] 2.6.24-rc6 #1 > > > > [ 1310.672421] --------------------------------------------- > > > > [ 1310.672828] FahCore_a0.exe/3692 is trying to acquire lock: > > > > [ 1310.673238] (&q->lock){++..}, at: [] __wake_up+0x1b/0x50 > > > > [ 1310.673869] > > > > [ 1310.673870] but task is already holding lock: > > > > [ 1310.674567] (&q->lock){++..}, at: [] __wake_up+0x1b/0x50 > > > > [ 1310.675267] > > > > [ 1310.675268] other info that might help us debug this: > > > > [ 1310.675952] 5 locks held by FahCore_a0.exe/3692: > > > > [ 1310.676334] #0: (rcu_read_lock){..--}, at: [] net_rx_action+0x60/0x1b0 > > > > [ 1310.677251] #1: (rcu_read_lock){..--}, at: [] netif_receive_skb+0x100/0x470 > > > > [ 1310.677924] #2: (rcu_read_lock){..--}, at: [] ip_local_deliver_finish+0x32/0x210 > > > > [ 1310.678460] #3: (clock-AF_INET){-.-?}, at: [] sock_def_readable+0x1e/0x80 > > > > [ 1310.679250] #4: (&q->lock){++..}, at: [] __wake_up+0x1b/0x50 > > The net part might just be a red herring, since the problem is that > __wake_up is somehow reentering itself. /* * Perform a safe wake up of the poll wait list. The problem is that * with the new callback'd wake up system, it is possible that the * poll callback is reentered from inside the call to wake_up() done * on the poll wait queue head. The rule is that we cannot reenter the * wake up code from the same task more than EP_MAX_POLLWAKE_NESTS times, * and we cannot reenter the same wait queue head at all. This will * enable to have a hierarchy of epoll file descriptor of no more than * EP_MAX_POLLWAKE_NESTS deep. We need the irq version of the spin lock * because this one gets called by the poll callback, that in turn is called * from inside a wake_up(), that might be called from irq context. */ Seems to suggest that the epoll code can indeed recurse into wakeup. Davide, Johannes, any ideas?