From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Genes Lists <lists@sapience.com>
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
Date: Thu, 30 May 2024 15:04:53 +0100 [thread overview]
Message-ID: <ZliHhebSGQYZ/0S0@shell.armlinux.org.uk> (raw)
In-Reply-To: <15a0bbd24cd01bd0b60b7047958a2e3ab556ea6f.camel@sapience.com>
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!
next prev parent reply other threads:[~2024-05-30 14:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 12:53 6.9.3 Hung tasks Genes Lists
2024-05-30 13:36 ` Genes Lists
2024-05-30 14:04 ` Russell King (Oracle) [this message]
2024-05-30 16:23 ` Genes Lists
2024-05-31 8:39 ` Hung tasks due to a AB-BA deadlock between the leds_list_lock rwsem and the rtnl mutex (was: 6.9.3 Hung tasks) Linux regression tracking (Thorsten Leemhuis)
2024-05-31 9:50 ` Hung tasks due to a AB-BA deadlock between the leds_list_lock rwsem and the rtnl mutex Hans de Goede
2024-05-31 10:22 ` Hans de Goede
2024-06-01 20:05 ` Hans de Goede
2024-05-31 11:55 ` Genes Lists
2024-05-31 12:54 ` Andrew Lunn
2024-05-31 13:11 ` Hans de Goede
2024-05-31 13:29 ` Andrew Lunn
2024-05-31 13:36 ` Hans de Goede
2024-06-06 12:01 ` Hans de Goede
2024-06-06 13:12 ` Andrew Lunn
2024-06-06 13:39 ` Jakub Kicinski
2024-06-06 14:25 ` Genes Lists
2024-06-07 10:22 ` Hans de Goede
2024-06-07 11:27 ` Genes Lists
2024-06-07 10:19 ` Hans de Goede
2024-06-24 19:57 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZliHhebSGQYZ/0S0@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=johanneswueller@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@sapience.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).