From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 5384A3DEAE0 for ; Thu, 16 Apr 2026 14:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776349739; cv=none; b=M8mRBC9i2Tdrj96EoRbo+IyGvLi5qO6QmyfWLJYq6NbdQeIfFE+PslsTVC+lQ4PzowVmVqbpPXOwlSvQIKEQyoj73eeyAQzj/K22lCJzPz13xCazZ23v7ulrO6jm7sQiyEtWDvRbnT2NpYhedzLwus4OIPs0uAr4gjdtqVLrnSw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776349739; c=relaxed/simple; bh=7QjBlFoasFVuVyfHEKmjgjdDzfUHbWoNYyb2immHtF8=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=oyfLTkSGbkrSycQbLqGd1kWFhSwyGDdPXbI5aiZbABr0D6FiA5jLCIJ51jrjNOBQ7Jqci+BG7XmDA0tNU9APq09cUCgqKASbaVeTElIQ3V3s/Z0oLq/VvC5VV+lmApUPOoB8eJlkcR4vKhaU7FvhXGYw8SLVjtwYQ10WKQM/UlE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NySX+J5X; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=WrOvKmGb; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NySX+J5X"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="WrOvKmGb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776349737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W9b12nOaJ9TBf2ueYV1MoRtkDYuJ5D/urTMtLbAxPk4=; b=NySX+J5XSkfnqAteWkQN5KNZjaKErhIkN4tWpC4uSsBmDTOHBnjJ281300Jq+6d8AeolEU dy7eAAS3+4siqGVy4mxFQMRLynN5TUrVmijyuGXB8NEP8uRyid+yEr66iiODHds2Qk7anJ 62XRwY6XBbiFewAFAB4boUszyuw1XEg= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-9vrQAEyBNZensataL_-LIg-1; Thu, 16 Apr 2026 10:28:55 -0400 X-MC-Unique: 9vrQAEyBNZensataL_-LIg-1 X-Mimecast-MFC-AGG-ID: 9vrQAEyBNZensataL_-LIg_1776349735 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8d654ade33aso146543885a.1 for ; Thu, 16 Apr 2026 07:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1776349735; x=1776954535; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=W9b12nOaJ9TBf2ueYV1MoRtkDYuJ5D/urTMtLbAxPk4=; b=WrOvKmGbkpsi9DjM5rinwjehWnzxKffvNz3sR6gtlyYEC75ikO6K+ovwpNEudoqrSu HK3IcvKMBjOTBm4n8pyAAc/Y0LNmVPqTShCwdwOaETE9a4asW5qXfLjy9GIhPheB/B1O iMk6UCV0ZvSNSoN7T+qdlecU3EG5hfZCr7+ABkKuvziOfYBhHJKKHMBlsPtMAJpObXZ7 NpHTmNscoMRN0fGAmZno28cPmpdaRRqNWqcBSs0h8xdWiWET9OFUDgm90j4R9zuXCqsK oR/+KgdvQaRiYW8XKOLcyLzB2lom8LUsUF5oZSv+bOPPhtl0/C2/U/kn9Tg7bqgye66j i/Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776349735; x=1776954535; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W9b12nOaJ9TBf2ueYV1MoRtkDYuJ5D/urTMtLbAxPk4=; b=rJp5/sWyjYcJwWxybOhbcMiWt9wAPKkldkbHB+Ex+2TGeX+N2UDXd3vPrwWh+GjS59 NtSZUTWRkVVqjmolxP65Ojs4NIATWwKv2exHl7TurniN+BSWEq8Q3kc0l/Yjg8wmIudu 8gk5F3rLWaYxR5ka4OtvLoutoxXhDdMxbxKIixDk+vlSyx0KBMWzWDg9AIcCHtjFbojN /MWFfuARKFAmHcoQK9uj1o0DD5FOrKGEDYWHzdnI898uLP65vkg5A036gkUUsiATbxVk fnB4CjN0ItNpfS2OM0tbsl66Qxj7cDX/b42S+cKPBxuyt1EFwiIiZc95/CWAL0FbwEdz 6SJg== X-Forwarded-Encrypted: i=1; AFNElJ/k5QTSCRsr0kdsEohWJ21f+/D4mm1JzUXm5l5NgDMPTgyUbXmY5i6xYWQPg9pjc+2jNKJqUuoBH4jsII4=@vger.kernel.org X-Gm-Message-State: AOJu0Yyo4FssB0rNJpiulgAt9VuJqLbltnkEfRploBxjLyYQdQyvwksw ffsgHMtYX3MeX95OgXKfniow4FdAHUmD45OJAWzWsBRW3HMZC+fND6cVSGWkzxrcGwxcSdmnKsD MnuzP2OFHgQVrKUbQPn2cW0B0+xFoZ7QSHE2zOYk1ZuYbXi7SuqxoRRIEZfPxdyhedMdLJkMjSg == X-Gm-Gg: AeBDietqF/WHanXSiRLfpyeEzVUrlxX7pU9eV9QJHaudtvWYd6gF0pb9nYS9m2ILvVj Ti5zFGjCfFaxxYLEXk0A3Q6u7WI1tYKOwkJe2y9DLNdc5eKI3LamP5HWdnqk0E9yYMhAglvi0oG twdBFIqdXr4czxG4Xb2IxvveCoaGRIT27ch+UqCYyOYQ/Zak40NqMp5mnRGAA/kIPSZKF1g3LTw X42GnqPA9UMxBFx+wWmfe+QPe1N6GbeWBSixufr/Olfc92KBQSRFP0khJQHEvqGxNRpt+KrL8Pi MI+LnlooUXjanFGi31TBPiQeIVRpqRpoP8t4HYUo+fC1CdgjopZgeFZmuo6tsD1+7eoMp94IaVu bvzUzhxV/V7k9cZYzsf7cjkehkcuha5jDcWvs X-Received: by 2002:a05:620a:1992:b0:8d6:6db0:88de with SMTP id af79cd13be357-8e5df03717emr534676985a.44.1776349734738; Thu, 16 Apr 2026 07:28:54 -0700 (PDT) X-Received: by 2002:a05:620a:1992:b0:8d6:6db0:88de with SMTP id af79cd13be357-8e5df03717emr534672085a.44.1776349734191; Thu, 16 Apr 2026 07:28:54 -0700 (PDT) Received: from [192.168.3.252] ([74.75.144.57]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8e4f31f95f9sm445248185a.43.2026.04.16.07.28.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Apr 2026 07:28:53 -0700 (PDT) Message-ID: Date: Thu, 16 Apr 2026 10:28:50 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Tony Camuso Subject: Re: [PATCH] ipmi: Add timeout to unconditional wait in __get_device_id() To: Frederick Lawler Cc: corey@minyard.net, Matt Fleming , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Matt Fleming References: <20260415115930.3428942-1-matt@readmodwrite.com> <9b6af9ab-79f9-4f87-ab7c-8ad6efeb18ed@redhat.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/15/26 5:22 PM, Frederick Lawler wrote: > Hi Corey & Tony, > > On Wed, Apr 15, 2026 at 11:46:27AM -0400, 'Tony Camuso' via kernel-team wrote: >> On Wed, Apr 15, 2026 at 12:59:30PM +0100, Matt Fleming wrote: >>> From: Matt Fleming >>> >>> When the BMC does not respond to a "Get Device ID" command, the >>> wait_event() in __get_device_id() blocks forever in >>> TASK_UNINTERRUPTIBLE while holding bmc->dyn_mutex. Every subsequent >>> sysfs reader then piles up in D state. Replace with >>> wait_event_timeout() to return -EIO after 1 second. >> >> On Wed, Apr 15, 2026 at 12:17:04PM, Corey Minyard wrote: >>> This is the second report I have of something like this. So >>> something is up. I'm adding Tony, who reported something like this >>> dealing with the watchdog. >>> >>> The lower level driver should never not return an answer, it is >>> supposed to guarantee that it returns an error if the BMC doesn't >>> respond. So the bug is not here, the bug is elsewhere. > > This is a bit of a throwback to our previous discussions around [1]. > > I did end up applying [2] based on that discussion, and had limited > success, but we still have external resets that cause us to enter > this undesirable state :( In my testing with updates from the Linus tree, after a BMC cold reset: 1. The KCS driver returned -EBUSY to callers (good) 2. The watchdog daemon received the error and initiated shutdown 3. No D-state hang My tests, conducted on a Dell PER640, verified that Corey's upstream fixes cause the driver to properly return errors instead of blocking. At least on that platform. Which hich low-level driver are you using (KCS, BT, SSIF)? The PER640 uses KCS. # cat /sys/class/ipmi/ipmi0/device/params 2>/dev/null kcs,i/o,0xca8,rsp=4,rsi=1,rsh=0,irq=10,ipmb=32 > [1]: https://lore.kernel.org/all/aJUMlAG17c6lCgFq@mail.minyard.net/ > [2]: https://lore.kernel.org/all/20250807230648.1112569-2-corey@minyard.net/ >> >> I've been tracking a related issue (RHEL customer case) where BMC >> reset while the IPMI watchdog is active causes D-state hangs. This >> appears to be the same root cause Matt is hitting. >> >> I backported the recent upstream KCS/SI fixes to a RHEL 9 test kernel >> (54 patches bringing it to mainline parity) and tested today on a >> Dell R640. > > I assume this patch series: "ipmi:watchdog: Fix panic, D-state hang, and > lost protection on BMC reset" [3]? > > [3]: https://lore.kernel.org/all/20260407175134.3367345-1-tcamuso@redhat.com/ > Actually, no. The 54 commits I backported simply bring my RHEL-9 test kernel to parity with the Linus tree, which includes [2] and ... cae66f1a1dcd 2026-02-13 corey@minyard.net ipmi:si: Fix check for a misbehaving BMC