Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2525024yba; Mon, 15 Apr 2019 13:34:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyybT/VNY5E2D52aiHTob6xAj5940bcL5hGyYyMn2mWuAwU09DH3USCmiD4wRVOEQEj1jgn X-Received: by 2002:a63:5854:: with SMTP id i20mr70508632pgm.171.1555360456159; Mon, 15 Apr 2019 13:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555360456; cv=none; d=google.com; s=arc-20160816; b=nMWI4geciJka+ZzLNa2HRLdNo7WC9PNCTIfQU43v9ORTssSaUdfXN64wV/VGZl2x+9 Qt6b2mNEfitHKNlcOqr2dcZQ/MHfv3Yuo//hav9nrmV8ctEWW9NunFp3doPCQCLMqKU2 H0qYO5knc8Ged6BV1eX3mzeqNTnbpsKn7o9NL+nkLR5X9AO3v/YtPqEkblYz/YBNSXP9 9ab6npt5183nz8/lsTvCUQWkBP2GBbLgdL46T2mnB+pkKhqJtWg8+CZVRizKuss2iixN 9lZ9jrm7Af2ii332N34BF8US/Da4C5srTP20i0C8L+wHQvF8KoLNKM+snQuQD4o8TxUL toUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+ls/GUTFHxmWqNfbL8nZPHO/mEsZK+0BWBT3eOnQ4Qs=; b=GI93rfK26Kk1EBSLj4pw84VTSly435GIt4tJce/7p88uelJ1jtS9LljoooOpBj1IFH z7cBImBeZHqH4xO/LrQim3NzEYl56v0SUDyRjIL8Hr1lmk7G0JBjIbj55RexizQc68C4 4kcsEch2ieNeBSOr5Do+vtSMN7GtZ0D2Vmd89IAMgAJhdwZEtAyn4zh7hvS0Z90k0j0c IKpFL9OmCZ35mzVvhwF1/38KtwFs2j4p/v3a7q4H9kugCeiSF9hBjQQgqLE3nd42L6To tg0vmopDymTDbzMjmZ/vS5jCwY7Iny7NUXhuTVp6B7pjIk2DYbrWcrHE6qTFHkIXqvgz 1BIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="h3/ILorc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si32844655pgc.304.2019.04.15.13.33.59; Mon, 15 Apr 2019 13:34:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="h3/ILorc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728628AbfDOTfV (ORCPT + 99 others); Mon, 15 Apr 2019 15:35:21 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43864 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfDOTfU (ORCPT ); Mon, 15 Apr 2019 15:35:20 -0400 Received: by mail-pl1-f195.google.com with SMTP id n8so9051715plp.10 for ; Mon, 15 Apr 2019 12:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+ls/GUTFHxmWqNfbL8nZPHO/mEsZK+0BWBT3eOnQ4Qs=; b=h3/ILorcTzTxllmLWIGP0BOGGDDA73Gwspt4hAlZrWzW4MCVkvokEi/eeXwp+0WPpc +p/MQ30G89WjUmX/muWwWpO1A9Wdj1RfY5YT0NEqXpDTikCPGj2pKFb8ssUkh6BrI0cJ DiIU4TsB+ko2elGnsPnQIvdPVe7Yg95X2PlCQpAowzj/O3O/nX96gb9cRP17TGlUh00G 9skfECkbRINt6+ZjxPpanM+V/udpVtXOym01rAqSLLOpebeAC2Do+s1fEgVzArIGiKev 8sE/CJBZ/76iZEIfaPOe9haJzcX10esIBCaF9tjwMciYa+iblqnvN5+P7ZbW29pDrHsb VJRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+ls/GUTFHxmWqNfbL8nZPHO/mEsZK+0BWBT3eOnQ4Qs=; b=LTXO6ud7nYlK9SrIhRqEPaozE84DePZzuzOGM2cKP6FB7UyJMaL1NzuqNGLpeKgxz2 1FXx3SpnH447nD4td5elf+veH7i93w/KtaG5HOSnurT8PAUBETHw//+55Q8mPjJnqRjc HEI4Y3CYnEYV2X9OsBz047H8WgMhKTUnHmigfE/75LPzcPLRcf/FNGmTwLvrfkw4gmmC rsPjLjIfdnQTexPbiAGV2IUL8NF4PlJLlZbiAjazVWpEX3qCvi4+K/lz1ZMsXNNX80Mm EB/cWrDYle1Qh0jH16VqCrA3VZQvPhLhXNkEUAuz34yXq+6SCj4gWFDx/Q9zcP/ede7i oc6Q== X-Gm-Message-State: APjAAAXKWJES0oT3vxnx8EAKHk6Aae25BvEvqvygATsdxE6yVGVIZmvp ahjAPmdbEqSIClYRuEpBIl6LS13ud22VS7/2vqYJjg== X-Received: by 2002:a17:902:b48c:: with SMTP id y12mr75396478plr.280.1555356919335; Mon, 15 Apr 2019 12:35:19 -0700 (PDT) MIME-Version: 1.0 References: <0000000000006f1596058653d991@google.com> <52ac871b-ac61-432e-3a85-47b8e97233d2@embeddedor.com> <20190415190054.GA10359@kroah.com> In-Reply-To: <20190415190054.GA10359@kroah.com> From: Andrey Konovalov Date: Mon, 15 Apr 2019 21:35:08 +0200 Message-ID: Subject: Re: INFO: task hung in usb_kill_urb To: Greg Kroah-Hartman Cc: "Gustavo A. R. Silva" , Alan Stern , Kernel development list , USB list , syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 15, 2019 at 9:09 PM Greg Kroah-Hartman wrote: > > On Mon, Apr 15, 2019 at 01:39:57PM -0500, Gustavo A. R. Silva wrote: > > > > > > On 4/15/19 12:48 PM, Andrey Konovalov wrote: > > > On Fri, Apr 12, 2019 at 9:46 PM Alan Stern wrote: > > >> > > >> Andrey: > > >> > > >> It's really hard to tell just what's going on here. > > >> > > >> On Fri, 12 Apr 2019, syzbot wrote: > > >> > > >>> Hello, > > >>> > > >>> syzbot found the following crash on: > > >>> > > >>> HEAD commit: 9a33b369 usb-fuzzer: main usb gadget fuzzer driver > > >>> git tree: https://github.com/google/kasan/tree/usb-fuzzer > > >>> console output: https://syzkaller.appspot.com/x/log.txt?x=14c4c1af200000 > > >>> kernel config: https://syzkaller.appspot.com/x/.config?x=23e37f59d94ddd15 > > >>> dashboard link: https://syzkaller.appspot.com/bug?extid=d919b0f29d7b5a4994b9 > > >>> compiler: gcc (GCC) 9.0.0 20181231 (experimental) > > >>> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14410dbb200000 > > >>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12f0acd3200000 > > >>> > > >>> IMPORTANT: if you fix the bug, please add the following tag to the commit: > > >>> Reported-by: syzbot+d919b0f29d7b5a4994b9@syzkaller.appspotmail.com > > >>> > > >>> usb-fuzzer-gadget dummy_udc.0: failed to start USB fuzzer: -22 > > >>> usb-fuzzer-gadget dummy_udc.0: failed to start USB fuzzer: -22 > > >>> usb-fuzzer-gadget dummy_udc.0: failed to start USB fuzzer: -22 > > >>> usb-fuzzer-gadget dummy_udc.0: failed to start USB fuzzer: -22 > > >>> usb-fuzzer-gadget dummy_udc.0: failed to start USB fuzzer: -22 > > >>> INFO: task kworker/0:2:532 blocked for more than 143 seconds. > > >>> Not tainted 5.1.0-rc4-319354-g9a33b36 #3 > > >>> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > > >>> kworker/0:2 D26656 532 2 0x80000000 > > >>> Workqueue: usb_hub_wq hub_event > > >>> Call Trace: > > >>> schedule+0x8f/0x180 kernel/sched/core.c:3562 > > >>> usb_kill_urb drivers/usb/core/urb.c:695 [inline] > > >>> usb_kill_urb+0x22a/0x2c0 drivers/usb/core/urb.c:687 > > >>> usb_start_wait_urb+0x257/0x4d0 drivers/usb/core/message.c:63 > > >>> usb_internal_control_msg drivers/usb/core/message.c:101 [inline] > > >>> usb_control_msg+0x321/0x4a0 drivers/usb/core/message.c:152 > > >> > > >> It looks like something is stuck waiting for usb_kill_urb() to finish. > > >> But what happened before that? > > > > > > This crash is somewhat special. It happens quite often during USB > > > fuzzing, but at the same time it's a hang, which makes it a bit harder > > > debug. I initially thought that is somehow related to my custom USB > > > fuzzing kernel patches, but then I saw that someone else hit this > > > issue while doing USB fuzzing in a completely different way that > > > doesn't require kernel modifications. So it might be an actual issue > > > in the kernel. > > > > > > The full console output is provided by the syzbot, but I guess it's > > > not very useful in this case. I've just made sure that this issue is > > > manually reproducible, so we can easily retest it with debug patches > > > (syzbot should be also able to do that via the syz test command). Or > > > is there a way to turn on some verbose mode to see some USB debug > > > messages? > > > > > >> > > >> I can't tell from the reproducer source, because it uses a bunch of > > >> special stuff you added in your usb-fuzzer tree. > > >> > > >> Alan Stern > > >> > > > > > > I understand, for now I guess the simpler way to debug this is to run > > > the reproducer. I'll write you and Greg a separate email regarding all > > > that special stuff that I added. > > > > > > > Hi Andrey, > > > > Please, CC me on that email too. > > Please cc: all of linux-usb@vger.kernel.org, no need to keep anything > private. Sure! > > thanks, > > greg k-h >