Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1319354lqb; Thu, 30 May 2024 07:05:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqXHolMNvWNPVEFhzeopwO1ImutI19pq3R7J5F9SjOgsKT6m+2hQ+2fXesmHw2k+x/G9WQmglz0MKSyGw7ofNHSSaKuRvYx3/GwY+m5A== X-Google-Smtp-Source: AGHT+IG9E7YHKyLDcSpPMtwVsMaGdAmL2TaJ8sXpYiHDxAliJTuKuA3NDw3qchZHRy22O0XiAlnJ X-Received: by 2002:a05:6214:460f:b0:6ad:8316:4cb7 with SMTP id 6a1803df08f44-6ae0ccb0c0dmr28949986d6.41.1717077909707; Thu, 30 May 2024 07:05:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717077909; cv=pass; d=google.com; s=arc-20160816; b=stPSgSiS5HI/OEAg8eaJXIhcoolwQzw0DcyVqHOjCnhvnDN2RGprg8MrC49D7GF9TL utASAgxoiG9pakQaEGp1w4k2Jz5w3BW/yM8DG7yOEPwpCGpO2MBK4Por6OhMhNVxdvYJ 5Kqz2FHHqgmEkLdhPt1u/Oxi3m+zv/nNiwSRHH5zBE7JeVm3LZn11dnl7OOeAaQ4W499 W9wRN9oRp5EsZAQuUNgawMLe9bHmK+dmXixl9UENDfTNOXuS9e6W/gzFBqG6HrSJujnx DQskRYcNyQSNXeJ5ZB8403IhBTAxvZUARx/9fNV2SNtielRqF1DuYlTtw7lj00Zxlyv1 0n+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=YExquJyePSJqGdpvuFBG7W8z98CXju9/UOTlH9NVOl8=; fh=JZXu3Ci/vuDpKZKEk3v5J2eahU71QanqpqdgXhm4ZMQ=; b=AZUi5ABNoSnQcxPlGYnt9Qh69E5l2Nv4P52IDZLTYP7p5bkOEpNrhltSjcNAIjCRhm CWov9tynLt+4pbw0/iwSiBh7LDpuNX8cWQuJmVIw+Kxt6P2saExXGhfR6DGZP+NmyZOi VG9JZmDDALvJ/L0gRYjko0NCa87JygvAnIIdSQMsLYnjqRjJyiulWGjAEMm8ELh1tCFK H89cmzadDiBExKNK4jnQaVhZ3jYH6Si+PmeXnCMUlFZm3UAHfyGWUCZ9C13Jl/koJ2l9 kYQ1c+xYpBRuDL2zvUvEqOk38oW7OWbat0VhSrqyOg8xWgG8DUngZ9x5oM8Sm7qHRPIN tkYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=cofttuqi; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-195482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac162b52ebsi151574306d6.468.2024.05.30.07.05.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 07:05:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=cofttuqi; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-195482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6E4FF1C23141 for ; Thu, 30 May 2024 14:05:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DBF5186E5B; Thu, 30 May 2024 14:05:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="cofttuqi" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A85186E3F; Thu, 30 May 2024 14:04:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077900; cv=none; b=ot4vzJKP1rBCwNXCRrQ3T45Ik4TbPeIRdqeSViIkEjIzaBGEwepayGda1vQ/i4q2YcPa1+ej9ElDjIRmIEZe5t3GI2iJ/L16m6PTFo2iInfTEuL0Jz0FF6tcWc1hE4cUtHPtf58SFZ6tuVSaTYA9ld0BI6w17AjdlbB9idIB6Ic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077900; c=relaxed/simple; bh=pkETTqo1L5i6dCsPGWBv/kZtFquPctFL/nrgQUNQSpA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GrDfj9ayhW/+p3iwHZ1OdCl5fAHrusSZT3wnD/ShoGJZMn/AcsWY8bZHOLUAA7pPmZRsSJWcsBYu0xaYEVLSdkhy8k9bNPILAhIW2fW1SGpUN5O9Cbvq0LSwt6w+ZpB3bS+CMzor3wLSDyjjGL5S7mi/O5YLc9H0rgW2kxrYQqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=cofttuqi; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YExquJyePSJqGdpvuFBG7W8z98CXju9/UOTlH9NVOl8=; b=cofttuqiyGIhomNYnWGBSr8MmL 6mIBkRfYIdUFvXTqWwoX/drO71MRJc83E1wB85RV/he+IGneNJXatZV/KrGzA5SFVZoButqjbUoBI XA3cmjY9gKKwl3U30gWj/pIj641RzXMK1WM8xJ46Q/bu1zItiyBmg5M7csBgiETK/J//0UPTxVdSH LiEMd/ZdwcXn6A2+/6G5m1GluM0H1bExOvVRlYAPeCzV3slsJWB2y24VUWCVTvxkabfaMzCH99F7d LmPE9kIzWqnNRiJaN00kQfTWXxYLR5B4PMCxX2ylqRzUaQNHoMxguxBLViAlwUX6rnH0+x+zHiEv/ zbS9eOww==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49300) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sCgOh-0007Sx-1f; Thu, 30 May 2024 15:04:51 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sCgOj-0005C4-5L; Thu, 30 May 2024 15:04:53 +0100 Date: Thu, 30 May 2024 15:04:53 +0100 From: "Russell King (Oracle)" To: Genes Lists Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, johanneswueller@gmail.com Subject: Re: 6.9.3 Hung tasks Message-ID: References: <9d189ec329cfe68ed68699f314e191a10d4b5eda.camel@sapience.com> <15a0bbd24cd01bd0b60b7047958a2e3ab556ea6f.camel@sapience.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15a0bbd24cd01bd0b60b7047958a2e3ab556ea6f.camel@sapience.com> Sender: Russell King (Oracle) On Thu, May 30, 2024 at 09:36:45AM -0400, Genes Lists wrote: > On Thu, 2024-05-30 at 08:53 -0400, Genes Lists wrote: > > > > > This report for 6.9.1 could well be the same issue: > > https://lore.kernel.org/lkml/e441605c-eaf2-4c2d-872b-d8e541f4cf60@gmail.com/ The reg_check_chans_work() thing in pid 285 is likely stuck on the rtnl lock. The same is true of pid 287. That will be because of the thread (pid 663) that's stuck in __dev_open()...led_trigger_register(), where the rtnl lock will have been taken in that path. It looks to me like led_trigger_register() is stuck waiting for read access with the leds_list_lock rwsem. There are only two places that take that rwsem in write mode, which are led_classdev_register_ext() and led_classdev_unregister(). None of these paths are blocking in v6.9. Pid 641 doesn't look significant (its probably waiting for either pid 285 or 287 to complete its work.) Pid 666 looks like it is blocked waiting for exclusive write-access on the leds_list_lock - but it isn't holding that lock. This means there must already be some other reader or writer holding this lock. Pid 722 doesn't look sigificant (same as pid 641). Pid 760 is also waiting for the rtnl lock. Pid 854, 855 also doesn't look sigificant (as pid 641). And then we get to pid 858. This is in set_device_name(), which was called from led_trigger_set() and led_trigger_register(). We know from pid 663 that led_trigger_register() can take a read on leds_list_lock, and indeed it does and then calls led_match_default_trigger(), which then goes on to call led_trigger_set(). Bingo, this is why pid 666 is blocked, which then blocks pid 663. pid 663 takes the rtnl lock, which blocks everything else _and_ also blocks pid 858 in set_device_name(). Lockdep would've found this... this is a classic AB-BA deadlock between the leds_list_lock rwsem and the rtnl mutex. I haven't checked to see how that deadlock got introduced, that's for someone else to do. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!