Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp597928imm; Fri, 31 Aug 2018 08:19:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY41CJ6BSc4EWlYzepyoyIY3QmUcM/S29AG9XCWselaUtlJWdtVYDOy/RkXTxnLL/qgzwUD X-Received: by 2002:a17:902:8481:: with SMTP id c1-v6mr15947671plo.177.1535728782330; Fri, 31 Aug 2018 08:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535728782; cv=none; d=google.com; s=arc-20160816; b=WU3StrAMdcKE8pDtI44N66ymkQ18ZP4zN5zQFA7Mn/jRQpOOKKaxhQj/Hh8mklismW Lni242nKX/8AkYW2jq23hXcBC6zKAYJ0TM7FKhCBfITWdh8KFQeknimSLgouVaSBPBNg 0xTPVbIEWsaDK3VojTDLchwpt2QCc3k+MNi8Cw/on9nYFEqPD/i1GHGQFxKuPK72NWmF dHbh72rO8J+giOqdSjXuFSjScySn2E6gG4cW46k3BQ/44gMomrfFHuXnAkKfga9yLwvf MSDOt8oN++m7cq0eA0qUs89JYPYLdbnGCv33SMFYBM4Km0CCNXcyzTzu9t7yZpUJNPxo j7Dg== 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:arc-authentication-results; bh=FYEDYOJ/BI1K4Ba3Jx7tD5KInnv7qmblNEitfg1drHk=; b=merdfYxZdij3oN56EHoB531uBMLcV5GTpyouwk8q/iW+Ui3IOxYIJNkDDlwmz9fqZw SPHhOuFK0jdC5qmX92REd88nrc+SbCCUj9qV2ad3ualow6wcaO3BRsvgC9zIABSlLFFJ 2+vlvNl1H2sZgxX2K/Tlo/wwAIuauEneW72a3CVoO3WaMqUJedPTBFT2tAzui2zdor3b kL1jPzQ2VXbeuchY1r1BbVnTYtE+qvGJhALGAOFLJ7dtEsFzwiPrwUCca9n9+Yg6ZNES SdGUH9gusvQwWsGChyP7TSE7CF6UwrlYqMm5OURsZNyIdqktutCp86Nlin+XTP43i7Ft mKAg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si10159547pla.84.2018.08.31.08.19.27; Fri, 31 Aug 2018 08:19:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728183AbeHaT0T (ORCPT + 99 others); Fri, 31 Aug 2018 15:26:19 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:47025 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727303AbeHaT0T (ORCPT ); Fri, 31 Aug 2018 15:26:19 -0400 Received: by mail-lf1-f68.google.com with SMTP id e23-v6so10246755lfc.13 for ; Fri, 31 Aug 2018 08:18:21 -0700 (PDT) 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=FYEDYOJ/BI1K4Ba3Jx7tD5KInnv7qmblNEitfg1drHk=; b=PZfo/IGKGc3CCE7kSOGOsQQ5hgk3WBGtffhD8fx5S766EiEiH6pf8idfFVvPxsmHnE Sqb0EFgUq3mN1w/Th4rr0W7SbNoS00lbeuSdveAcR8ObNirlWhYB7g57cWlefy2szNcG uR83D3Ymsb3VfpcodN1bXhPJYl6n/DDhyFTgDJA2Mh5Kt561oOy+1Ui9RHGZoSUzZDBt NceKGRKBoGHzR/WZDBQcrgYwA61OAcwYz1E0fEYmglFkr717LMtn9kXFwSHmp2Qb7g8x b98VIZd7/IDsdpHGqMZa+NpO07FrRibXZcauX/3JryDt6vh3mn69++PokxV2Xdwq0KoX fr9Q== X-Gm-Message-State: APzg51BpvH3kTf0mzg2l98vKeZ1+JA72w2fuL9ow8hJCNXx14QKwe/Oy 5YjtCp6XJkCaP2WFDs/wQn9HAlCgWhOefroeLttpVA== X-Received: by 2002:a19:9941:: with SMTP id b62-v6mr5051400lfe.63.1535728700291; Fri, 31 Aug 2018 08:18:20 -0700 (PDT) MIME-Version: 1.0 References: <20180829003539.668e514c@roar.ozlabs.ibm.com> <20180831134943.7f516fed@roar.ozlabs.ibm.com> In-Reply-To: <20180831134943.7f516fed@roar.ozlabs.ibm.com> From: Matteo Croce Date: Fri, 31 Aug 2018 15:17:44 +0000 Message-ID: Subject: Re: VirtIO console hangs To: Nicholas Piggin Cc: Greg Kroah-Hartman , Jiri Slaby , Michael Ellerman , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Lorenzo Bianconi 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 Fri, Aug 31, 2018 at 3:49 AM Nicholas Piggin wrote: > > On Tue, 28 Aug 2018 15:00:14 +0000 > Matteo Croce wrote: > > > On Tue, Aug 28, 2018 at 2:35 PM Nicholas Piggin wrote: > > > > > > On Tue, 28 Aug 2018 12:54:08 +0000 > > > Matteo Croce wrote: > > > > > > > With kernel 4.19.0-rc1 virtio_console hangs very often. > > > > I can always trigger the bug by pasting some characters in the > > > > terminal window, the console will stop receiving keypresses, but I can > > > > still see output from the console. > > > > Stangely, logging in the VM via SSH and sending lot of data to hvc0, > > > > like 'dmesg >/dev/hvc0' will fix the issue until the next paste. > > > > > > > > I did a git bisect and I've found that this is the offending commit, > > > > reverting it fixes it. > > > > > > > > Cheers, > > > > > > > > commit ec97eaad1383ab2500fcf9a07ade6044fbcc67f5 > > > > Author: Nicholas Piggin > > > > Date: Tue May 1 00:55:54 2018 +1000 > > > > > > > > tty: hvc: hvc_poll() break hv read loop > > > > > > Thanks for the report. I can't immediately see what the problem > > > is. Can you try get a stack trace of where it is stuck? > > > > > > > I tried but didn't get one. > > > > > Perhaps try this patch if you have time (it's a bit of a shot > > > in the dark). > > > > > > > Yes it seems to fix. Thanks! > > Okay sorry for the delay, I can reproduce it here and found a better > fix, if I could trouble you to test again. > > [PATCH] tty: hvc: hvc_poll() fix read loop hang > Hi Nicholas, the patch works, but now pasting text inside the terminal is extremely slow, it feels worse than a 9600 baud serial line. Btw, I had to apply the patch by hand as it was corrupted, some lines were collapsed into one. Cheers, -- Matteo Croce per aspera ad upstream