Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1175576imm; Wed, 19 Sep 2018 13:30:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdawHBslANQ13yf/45gTz7PEdygfLQbCfDaspQkbp1P43rYl8wXW9TpvwFeRd/8x8Lm9HbzW X-Received: by 2002:a63:4b25:: with SMTP id y37-v6mr812655pga.14.1537389008593; Wed, 19 Sep 2018 13:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537389008; cv=none; d=google.com; s=arc-20160816; b=NA+QItrQGMBo+f8LEzhQ4dDG0/aMgCYoj9fVoDr1J7RduOmft1Jru1GToj92QeRnFQ kB6WrBur5+xtfRiKj1c3QelcD0WkF1Or7EzBM4yMskWX/5ghGjlgsWNWMHs8Zgbd6DNa TINb5QWl8ik/y2wIoF2CRNFHeNivmh0E6s963X+wPDuJEFt8be4c7FJW6Znz0hwCCZi+ dQ99D19ZWDgBWt16Osg7lpupEGXqx1bGSO0TnGLekddRnMMEkluAxj05cRCHJGDhl9h0 7gYP8iNrK7rOdvMi/KZFxQmm/RuQWi/pB3zjjtZr3j/6RHvUv2RS0DhhNtBFyb+k5F3x uVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=S3RM4PCkDBbIRlWoN/Z43uGICSNCsaxORDR7oRanAZc=; b=YXLAitHhnqz8dNBIO384jnytWvn9QxRZ2ZRx70jHLmTscr143cTeNeOBhH9iBD2j3A tj5Zo7gx87cJ9BioyaouZTKukKipx76JuIVERRyR+ESBiD7vqIWJmTrJl9BqaRHJHM9R EmYlyYR6lXatzbCWAuGz02oARBOpHYfenI225fn73/eWlJtaDSxA935TzMmL13Z7ST3y OSP84KXN21Tmfa0Mt+oStv4+BIUvVucTHA2tATQz34+whb7CXI/aKtBErV4F88FYq2LX zdWFteBljyXjcOwmFs8BuBHUnwht2Uq0NduaOGFk9Ao3fHjBpMAdasqadQbNfAjeuQDK YHcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=S8ZWMske; 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=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11-v6si22390442plg.237.2018.09.19.13.29.52; Wed, 19 Sep 2018 13:30:08 -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=@arista.com header.s=googlenew header.b=S8ZWMske; 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=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732362AbeITCB3 (ORCPT + 99 others); Wed, 19 Sep 2018 22:01:29 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:36902 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732211AbeITCB3 (ORCPT ); Wed, 19 Sep 2018 22:01:29 -0400 Received: by mail-ed1-f65.google.com with SMTP id a20-v6so5981460edd.4 for ; Wed, 19 Sep 2018 13:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=S3RM4PCkDBbIRlWoN/Z43uGICSNCsaxORDR7oRanAZc=; b=S8ZWMskeYFGjf4S/d888l7Kdgdgj8nxyOBqzJlz75D8f9KXzvATs6nqwuCH4I0oJ5V ck6S40Rt47SuvTWxMNefbHsQB+BX2ISItz3lD+jYaFd6fIshZBucHEEtTZ2zMS6w+DGY iqyfK3hu14SzzhWIjI+QGtSqYhGsIDKJuMyDs1ZKZAMYYyvwloHy77x92gHgi2+Lr1Td TmkUUQQ8dLjqV/oIykS8H9+zRV0WnXHTPdjREq1VGhj5Rw0AxdDig+hgGEHOCNAGDyAG S/uiJj48owrubW/GhtzB/fIiq/G2ao9gXxGRzPISsPFIyuVhVAABZo02x+kGZcabz0uM DRFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=S3RM4PCkDBbIRlWoN/Z43uGICSNCsaxORDR7oRanAZc=; b=RyB66nXVhgxB0KHpUwM/B+rhOHrC7MkPXIu6F1ZZIWdqG+d7ZIYq9xKO8hLzMX6mJk 2Fn9wcfDKu3fbtyLPvx05H/RbkacNllnGv903NMAaptIexKIoVp7/Ve4T7fasNNCK2wA FZogbeNJq2+pHYMklSLKDqhEh9XlNgdHk5dcH+FIgwdMs+PJE3+h5RYi93ejUXdfFGc/ fbsZSoRN9yxmGjWzu0utkRj5f5pRCS/uLHkza1DB9FuAeudcbI5JpAXdRlfyGPSiwuRv xffVQ8z8zWWgflweR70lbirB25Cp6Y0omjZXGTvnGFQ2w/r+19xnzS5Kiln51nYJ6uOY Nxrg== X-Gm-Message-State: APzg51DwNZeljLPdOkj01oW+NL8lMloHv06QmxhNwgKWifJKWF/8s3FL rxk41WsgayugHpsV+HtaDyVqpA== X-Received: by 2002:a50:ad5a:: with SMTP id z26-v6mr62449991edc.142.1537388514570; Wed, 19 Sep 2018 13:21:54 -0700 (PDT) Received: from dhcp.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id h8-v6sm1742077edi.68.2018.09.19.13.21.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Sep 2018 13:21:53 -0700 (PDT) Message-ID: <1537388512.21380.44.camel@arista.com> Subject: Re: [PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen() From: Dmitry Safonov To: Mikulas Patocka Cc: linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Daniel Axtens , Dmitry Vyukov , Mark Rutland , Michael Neuling , Nathan March , Pasi =?ISO-8859-1?Q?K=E4rkk=E4inen?= , Peter Hurley , Peter Zijlstra , "Rong, Chen" , Sergey Senozhatsky , Tan Xiaojun , Tetsuo Handa , stable@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Jiri Slaby , syzbot+3aa9784721dfb90e984d@syzkaller.appspotmail.com Date: Wed, 19 Sep 2018 21:21:52 +0100 In-Reply-To: References: <20180917235258.5719-1-dima@arista.com> <1537379148.21380.16.camel@arista.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-09-19 at 16:03 -0400, Mikulas Patocka wrote: > > On Wed, 19 Sep 2018, Dmitry Safonov wrote: > > Thanks much for the testing, Mikulas. > > Could you try to bisect which of the patches causes it? > > The most important are 1,2,3 - probably, one of them caused it.. > > I'll stare a bit into the code. > > The patch 3 causes it. > > The hangs during reboot take either 80 seconds, 3 minutes or 3:25. Thanks much for that again. Any chance you have sysrq enabled and could print: locks held in system and kernel backtraces for applications? I suppose, userspace hangs in n_tty_receive_buf_common(), which is better of cause than null-ptr dereference, but I believe we can improve it by stopping a reader earlier if there is any writer pending. -- Thanks, Dmitry