Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp588982img; Wed, 20 Mar 2019 06:59:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbwDZLbqqb62jruPJpOtWtCyUFylcaZ7zEu2bnDwKws8mh+kdrKoxkcW7aFQ6OytwylBmN X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr8392201plo.274.1553090378319; Wed, 20 Mar 2019 06:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553090378; cv=none; d=google.com; s=arc-20160816; b=Khl/6jzYfaFBlMe0g9tTYQ7aznmO36FO+wANhSKxmY1VmgKEJMP73qMZKj4t3Y3pFQ l3VO182uDoFZvJshrKSSMalRaDIdnHX2tnk1sU33tmRvF1LTn0B+DL0hoN3YQpQKyZP0 MGhRAYATrQ2A8T6pwb4O/UIZs9hibM0ernZ+y3LEmtFKz5uwrAlh2zeUNpCNgmo5v8r6 BZGSN+4mvcuoovDvsps6kOUoBKbdju4NceA+D5E2UNMmWiBQun/GkDs5PuUcvhzkYhRZ 7XYLf6MrmHNmeRSzZ0a3AdM0r2uek1y32Vn8og1flwwajM8hM8vrY8vbTw//MFJEvDQl nkFg== 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=CvlQrhVNZGltu5KQzuGmLoTLALk87KzB9BrSGatvLTs=; b=nFunssNnhpU/Ak+9KoJlWtWOwxbHHL/f02crn7Wiq55kxRnGSDiw9u1NT4iQaSYzIr 3eqsEExZDCBCXYJ8TC//aFsFS6bkt6aAOjk2nQWTnCSxpf5X3dHkmIi7kiAc6sjDaQ6a MZnfGCqb3xyUesKBpHmINx5OiNfVqGgZ0Ya0K6gLXrOta14kK9u0esVMwqDx+KqelNgo AStGtpitvnjmi3wet5xEk3CgJrryejnslrjYQpo6aG5X3HhEdfq7RW4gYeA3wk4b8Z/2 HPHayueLPJ1uhssRgKjlBkPadBEMRctviG2tXd5hQRbs/6KRN3G0p7sGTim8Fd+YGU3E xO0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=bXNPB7zv; 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 r66si1723438pfr.196.2019.03.20.06.59.22; Wed, 20 Mar 2019 06:59:38 -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=bXNPB7zv; 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 S1727882AbfCTN5R (ORCPT + 99 others); Wed, 20 Mar 2019 09:57:17 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:51957 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfCTN5O (ORCPT ); Wed, 20 Mar 2019 09:57:14 -0400 Received: by mail-it1-f195.google.com with SMTP id e24so31592119itl.1 for ; Wed, 20 Mar 2019 06:57:13 -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=CvlQrhVNZGltu5KQzuGmLoTLALk87KzB9BrSGatvLTs=; b=bXNPB7zvPkRgcOAPSdlMSVdFMXKiD4p7E6PFK0UazdmwlGIGsVM969QA2CwMUo9N/n obbqOhB4/UpqWlegShtLyImJKsquRqfqgO39N7IbLXzxPbDy8K2PHAEsF0DUssKOXnBv sIxvubYhUf3W0NnOugvcVe0dFeNe1YUUwBj9/Yk8QATccjDtqjdO7mswCld32ebhE9Qp jjUFJ9PKczP385NR7ngZkXQ8DDGhEY5BMwvCP1GiWitdUjoOsduwk70+ykWyV2D5RmjK 46vSp82W0e+1OlkPxUcisjVLwQd47j0ICHede79NSGhjSLBJoDTCC8SEqY0VVOqMJYGm 29Nw== 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=CvlQrhVNZGltu5KQzuGmLoTLALk87KzB9BrSGatvLTs=; b=djyEgw7g9P5evT5JlQiOmNuhPo3G77zHLQHc5BGDSIsKgYI0Ze0BFVqLVMycmEDVvm Ytx4x1JiEDF5nfu4Mi0iNIUxqTL8QoyOpOcCr2HXGgGhQ0z32yAruDI6nkDGAku9pHqa fKoEOSytrAIkclM8hK8QMlGKy/A4bfnoWkDi+kMff38f0Jf5OnvFXudpj2MKamm05gSq EINJdLyhU4j37cRcqRzIqSo+C558CZm77B2k4Rqw47AVBR94PYgNDTIU0Z91tRt8Zmya vOgktdNjhoXPhlmQaxrZCY+fwHzYpR0LyCoE0lq7VrNVC5lBMZj5fqwQfkn8wLJ350IS uCXw== X-Gm-Message-State: APjAAAWjSzSxC9nPk7a6b60zoUcu9I9ov9/XVG0A27u0huOEjbJ79Q9R lIeLWo8AdTgu+mH1nZJbYugQIjY2uqFiXaAy60v5bg== X-Received: by 2002:a24:3b01:: with SMTP id c1mr4319010ita.144.1553090233000; Wed, 20 Mar 2019 06:57:13 -0700 (PDT) MIME-Version: 1.0 References: <000000000000db3d130584506672@google.com> <426293c3-bf63-88ad-06fb-83927ab0d7c0@I-love.SAKURA.ne.jp> <315c8ff3-fd03-f2ca-c546-ca7dc5c14669@virtuozzo.com> In-Reply-To: <315c8ff3-fd03-f2ca-c546-ca7dc5c14669@virtuozzo.com> From: Dmitry Vyukov Date: Wed, 20 Mar 2019 14:57:01 +0100 Message-ID: Subject: Re: kernel panic: corrupted stack end in wb_workfn To: Andrey Ryabinin Cc: Tetsuo Handa , syzbot , Andrew Morton , Qian Cai , David Miller , guro@fb.com, Johannes Weiner , Josef Bacik , Kirill Tkhai , LKML , Linux-MM , linux-sctp@vger.kernel.org, Mel Gorman , Michal Hocko , netdev , Neil Horman , Shakeel Butt , syzkaller-bugs , Al Viro , Vladislav Yasevich , Matthew Wilcox , Xin Long 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 Wed, Mar 20, 2019 at 2:33 PM Andrey Ryabinin wrote: > > > > On 3/20/19 1:38 PM, Dmitry Vyukov wrote: > > On Wed, Mar 20, 2019 at 11:24 AM Tetsuo Handa > > wrote: > >> > >> On 2019/03/20 18:59, Dmitry Vyukov wrote: > >>>> From bisection log: > >>>> > >>>> testing release v4.17 > >>>> testing commit 29dcea88779c856c7dc92040a0c01233263101d4 with gcc (GCC) 8.1.0 > >>>> run #0: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #1: crashed: kernel panic: corrupted stack end in worker_thread > >>>> run #2: crashed: kernel panic: Out of memory and no killable processes... > >>>> run #3: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #4: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #5: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #6: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #7: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> run #8: crashed: kernel panic: Out of memory and no killable processes... > >>>> run #9: crashed: kernel panic: corrupted stack end in wb_workfn > >>>> testing release v4.16 > >>>> testing commit 0adb32858b0bddf4ada5f364a84ed60b196dbcda with gcc (GCC) 8.1.0 > >>>> run #0: OK > >>>> run #1: OK > >>>> run #2: OK > >>>> run #3: OK > >>>> run #4: OK > >>>> run #5: crashed: kernel panic: Out of memory and no killable processes... > >>>> run #6: OK > >>>> run #7: crashed: kernel panic: Out of memory and no killable processes... > >>>> run #8: OK > >>>> run #9: OK > >>>> testing release v4.15 > >>>> testing commit d8a5b80568a9cb66810e75b182018e9edb68e8ff with gcc (GCC) 8.1.0 > >>>> all runs: OK > >>>> # git bisect start v4.16 v4.15 > >>>> > >>>> Why bisect started between 4.16 4.15 instead of 4.17 4.16? > >>> > >>> Because 4.16 was still crashing and 4.15 was not crashing. 4.15..4.16 > >>> looks like the right range, no? > >> > >> No, syzbot should bisect between 4.16 and 4.17 regarding this bug, for > >> "Stack corruption" can't manifest as "Out of memory and no killable processes". > >> > >> "kernel panic: Out of memory and no killable processes..." is completely > >> unrelated to "kernel panic: corrupted stack end in wb_workfn". > > > > > > Do you think this predicate is possible to code? > > Something like bellow probably would work better than current behavior. > > For starters, is_duplicates() might just compare 'crash' title with 'target_crash' title and its duplicates titles. Lots of bugs (half?) manifest differently. On top of this, titles change as we go back in history. On top of this, if we see a different bug, it does not mean that the original bug is also not there. This will sure solve some subset of cases better then the current logic. But I feel that that subset is smaller then what the current logic solves. > syzbot has some knowledge about duplicates with different crash titles when people use "syz dup" command. This is very limited set of info. And in the end I think we've seen all bug types being duped on all other bugs types pair-wise, and at the same time we've seen all bug types being not dups to all other bug types. So I don't see where this gets us. And again as we go back in history all these titles change. > Also it might be worth to experiment with using neural networks to identify duplicates. > > > target_crash = 'kernel panic: corrupted stack end in wb_workfn' > test commit: > bad = false; > skip = true; > foreach run: > run_started, crashed, crash := run_repro(); > > //kernel built, booted, reproducer launched successfully > if (run_started) > skip = false; > if (crashed && is_duplicates(crash, target_crash)) > bad = true; > > if (skip) > git bisect skip; > else if (bad) > git bisect bad; > else > git bisect good;