From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EA74352FB2 for ; Wed, 14 Jan 2026 20:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768421683; cv=none; b=LZpyCFWWtk0FmVO7jZLpifBIQbhVkomvic45C86UuES6CO6m7W8oFp7GN20bxV5BUP+aZxwXYnKT3j0w2PY5n4iLNaU/069uKpS9Qr48xqJqlu6bICDh7y+GDtZAtPSfLeVQhZMXbjVnypiiGhLpKR6UcCc7wjhHs18fTAuVuLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768421683; c=relaxed/simple; bh=7e8ug4MyTPxAzZNPSdq0A9RvZYJQujn0uRsMiUGqK0k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JiyV6WvO7N9WeTgD0nq+lloIi+JMz7Z5gGduh9aJZAn0jGowcI6mFxOb8FOse2vqc9Ykj+dda/QZVNoVNbjm/wJWN2zVRpPVQqxBZNllqjgRp12tcgkuoHVhvwRd1rt+ezFMM9sRValznCWILU10TZ/KWGvmSICcI7XyMae5mkk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=S949Gp00; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="S949Gp00" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-47ee301a06aso2260885e9.0 for ; Wed, 14 Jan 2026 12:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1768421678; x=1769026478; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+JMBFhEFI8VZYNu9bhqOFrerfTqDOnbdPSOvgMdc/Dc=; b=S949Gp00x/84DSgShgimU4sQfPMjLc7+tl6c7nkPW2bs+18PXEc2MQ9mQiyWjl/fqB Tl9+LPKpVqKHugEGXwGZHC8j3HlPrePoDn1gJLyIexKH+rw1begx92zdQ873dqYGB8aV duEBDY86WdKe1WGQiUDTnyQ4bLaqp1QnBT8OfqGZZQ6L4Q/4JBM9UBuc0Mme7yMh5hls 4/JkgDRH4PyVkQa//X95dgzLIkScKS4SwU98sRdf64W9+nFL2fWJiJ6RZvBnPY9TFiTw oya+QA7v8ZgoHCs5RQm3Up6owfTOAF6dMDyHJaYEjSZJPhsdASd9b52eZw8Ie5Btgimz 6Gng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768421678; x=1769026478; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+JMBFhEFI8VZYNu9bhqOFrerfTqDOnbdPSOvgMdc/Dc=; b=NpG+QeaGTh3FeSzkTymiAhPyw+jG8NxQldEuBboreD1Sbvv5NNfxrxa1TglgL9ITHe e6ZANRQ7jUn7cWRo9NKyGI8PAwcqLShOw09Xly9Z0s1XL+yyNVrIrZgaLI8YjzIuIBN+ Ne4n7JodC90TY2oGpPWzstqo2Iow0l+jSHxUtNcB3rYnarjk9lV5XMdQtkmpP5yu/Hq9 AjoH1rqc5QfAhflzCqJgUKYIT3FXSQlPeB3UvEhlffrfdZBBDRG9VRPwIFWfmt6pjGaD 7wmcevRQ4B+o7rCRf1Hk2+C7ZEllLiBWQCKt5nCipUCzvIrcqr/15CTNMmGy/bjVwIkA aVVQ== X-Forwarded-Encrypted: i=1; AJvYcCWyNRD1EqbEqCkwN7naIsX2nvJWh2vRwZZH0hTyO5NIxzykmTRRsi7YyD+8LmcPunuhhrODtEejNwZyKIs=@vger.kernel.org X-Gm-Message-State: AOJu0YzBJFvb2eCK2P5SId8JsArlI+YZYwDZbs1k8CuWJ1ksLGy4JIp4 aMU2tE1jIXhAvrp8Km8ICYrfR772NLtSNjQ+YOafZ+drhh/itOLfMwsGxfFCteItpqB1RJXvXtE GjcD8ntk= X-Gm-Gg: AY/fxX6I+K1ReE/TfrMzZpgtnBWhR+qKPjI+iSUN6kkhm1uw33AMt3l58ZDb+UaL7DJ 8it/gTi7tUQ/SwGrz+AlxrSDtXREW7es9LF/DCx7o9DNm48XsvO+ldSYRZVYwz8JTDseERTIerZ IxhpSizDrZ8HFUnILHOcN8zhxnVYWErEdugqiLJYzqFTxeim/Cg0+zSZydKs9ZiSeoeALkGYzMD KZZC9GDCFDGUmAvOVMVStEJ71SnC4EDIQnZhcluM8HLHBn9S74NEUqHSrd41hMQBeDfjohvAgf5 9WPYjr3UyfmjcrEloAdFlbz/0aXuNXZBYUCoUmbS+v7oN896nVuMYyL6dWRM0llb3QQT4ZhLkrm odGMUPRDEfa4EjYa0ioT3NZ8Peknkzf2Cg3Hu0cEJRfI+zlQbIEp4rqqJGCVNhgoqN046qgpSYL LhgP6iorDB83iAMyzJA8QSThOSTlERNZlXCgIo3j/i5GzFE9mT3njMfaI= X-Received: by 2002:a5d:5f95:0:b0:42b:4267:83e3 with SMTP id ffacd0b85a97d-4342c3f13ebmr5608098f8f.5.1768421678292; Wed, 14 Jan 2026 12:14:38 -0800 (PST) Received: from ?IPV6:2001:a61:1396:d201:b8d6:862a:5ddc:ffc7? ([2001:a61:1396:d201:b8d6:862a:5ddc:ffc7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af64a65bsm1178355f8f.7.2026.01.14.12.14.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jan 2026 12:14:37 -0800 (PST) Message-ID: <2ea634c6-26a4-48a7-8fcc-ad0ce06af890@suse.com> Date: Wed, 14 Jan 2026 21:14:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Deadlock in usb subsystem on shutdown, 6.18.3+ To: Alan Stern , Ben Greear Cc: Hillf Danton , LKML , linux-usb@vger.kernel.org References: <20260114024506.2210-1-hdanton@sina.com> <2b4c47a5-1a5a-4e94-87d6-152da16a3b9c@rowland.harvard.edu> Content-Language: en-US From: Oliver Neukum In-Reply-To: <2b4c47a5-1a5a-4e94-87d6-152da16a3b9c@rowland.harvard.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14.01.26 20:26, Alan Stern wrote: > On Wed, Jan 14, 2026 at 09:51:48AM -0800, Ben Greear wrote: >> On 1/14/26 07:13, Alan Stern wrote: > ... >>>>>> task:kworker/4:2 state:D stack:0 pid:1520 tgid:1520 ppid:2 task_flags:0x4288060 flags:0x00080000 >>>>>> Workqueue: events __usb_queue_reset_device >>>>>> Call Trace: >>>>>> >>>>>> __schedule+0x46b/0x1140 >>>>>> ? schedule_timeout+0x79/0xf0 >>>>>> schedule+0x23/0xc0 >>>>>> usb_kill_urb+0x7b/0xc0 >>>>>> ? housekeeping_affine+0x30/0x30 >>>>>> usb_start_wait_urb+0xd6/0x160 >>>>>> usb_control_msg+0xe2/0x140 >>>>>> hub_port_init+0x647/0xf70 >>>>>> usb_reset_and_verify_device+0x191/0x4a0 >>>>>> ? device_release_driver_internal+0x4a/0x200 >>>>>> usb_reset_device+0x138/0x280 >>>>>> __usb_queue_reset_device+0x35/0x50 >>>>>> process_one_work+0x17e/0x390 >>>>>> worker_thread+0x2c8/0x3e0 >>>>>> ? process_one_work+0x390/0x390 >>>>>> kthread+0xf7/0x1f0 > >>> Unfortunately, we have no to tell from the log you collected which host >>> controller driver encountered this problem. Nor, unless you can >>> replicate the problem, any way to track down exactly where in that >>> driver the bug is -- or even any way to tell whether a proposed fix >>> actually solves the problem. >>> >>> Alan Stern >> >> The system was in the final stage of shutdown, so all we have in this case is serial >> console output. If we set console to more verbose mode, would that provide what >> you need? > > Maybe; it's hard to tell. You'd have to enable dynamic debugging for > the usbcore module and set the console to show debug-level messages. > >> Or maybe 'dmesg' from when system boots? > > I suspect that nothing from before the start of the shutdown would be > useful. > >> We can try to reproduce, but need some clues about what to provide to make progress. > > The stack dump above shows that a kernel thread get stuck inside of > usb_reset_device(). The first thing we would need to know is which > device the thread is trying to reset. Adding a dev_info() line near the > start of usb_reset_device() would get us that information and you could > capture it in the log. (Along with that, we'd need to see the output > from "lsusb -t".) > > Knowing the device, we would know what host controller the device is > attached to. The trick will then be to figure what's going wrong with > that host controller's driver. It won't be easy, especially if the > problem only occurs while the system is shutting down. Something called usb_queue_reset_device() Workqueue: events __usb_queue_reset_device Call Trace: __schedule+0x46b/0x1140 ? schedule_timeout+0x79/0xf0 schedule+0x23/0xc0 usb_kill_urb+0x7b/0xc0 ? housekeeping_affine+0x30/0x30 usb_start_wait_urb+0xd6/0x160 usb_control_msg+0xe2/0x140 hub_port_init+0x647/0xf70 usb_reset_and_verify_device+0x191/0x4a0 ? device_release_driver_internal+0x4a/0x200 usb_reset_device+0x138/0x280 __usb_queue_reset_device+0x35/0x50 process_one_work+0x17e/0x390 That is a fairly rare method. We also know that "the system was un-plugged from a KVM (usb mouse & keyboard)" One of the few places usb_queue_reset_device() is used is hid_io_error() Do you still know which port that KVM had been plugged into? I usually would not run a chain of logic with so many assumptions, but if you cannot reproduce I see no alternative. Regards Oliver