From owner-freebsd-arm@freebsd.org Mon Jun 12 08:48:07 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E62BF6FCD for ; Mon, 12 Jun 2017 08:48:07 +0000 (UTC) (envelope-from tvijlbrief@gmail.com) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E05DA2B0F for ; Mon, 12 Jun 2017 08:48:06 +0000 (UTC) (envelope-from tvijlbrief@gmail.com) Received: by mail-yw0-x235.google.com with SMTP id e142so25708329ywa.1 for ; Mon, 12 Jun 2017 01:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=x5y1LZJzyWOndKqtbVi2TAENMZ/unrmGmRniYDzQbR4=; b=YbTh6YxWGQ9w4Xm3OfhT0RiLr1tJKDc3j2J7x8M3bwawHPjSXg3mZ2Hq09Gi5HT8Vy Yh5hN+/MgCBZRNarlHBKEk1EQyaifhuD20BhLAdeCr4WhRCU9d1WQngFlVvY5tHcu746 wGxq5iEZOSbsbdBHVF0M0pjIfkIPIM+bt1EgSoY+wzTJg/ZbzBm6Rf1A8Ua4R1bNsmPh yZDhgTsCSjXxZ7tsdPYiNEX2Nvv+R2MWy5wzjgwmfx8O+dmRkeEc6pskDqUmmmHb1Ya4 Q2M2H0FljYmPDbKiBOCl9/7rscyqHdCtUAViRiJW8T96nKBrSJ1lsQtVkdjAXiI6UdES L7dA== 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; bh=x5y1LZJzyWOndKqtbVi2TAENMZ/unrmGmRniYDzQbR4=; b=GEYMkH2TfFgzzt09atuSQSE3q6V1TRQLW8PJBfDbyfx0spc9oXPdPULIMSphoEWIoS yt8qxQdgXSBgH0PfupFL3LdnF2SXFCW6+ClekfSaF1xjzkSL/grdwHxaJDFDVjn/Or2l 1Exkl42fqLY4QjZ/qZIXzOAigQuz5WYvElliwU8f7ngqlZl98AOp3Zism+03Q93InCTb vgQNfa0310klM/hru5FJBRCHZKASILOg8KXC2EEdEZZQBRZJAMTmjFFDQd8CTE/0SHJa 2Iye9RYn/FDdp+WCGwj65Jtt/LIIfP45vu3g6zugRPhuFyRCKRIzTqKY9+w/1pMPAiTk Nmew== X-Gm-Message-State: AODbwcB/OvnCCaUnwroUCTaRpIA6DEazLM8g7Fv/1RrwFUlIB/jBIDQd VDwPBj+b8RxXM7xgdvZvRNN8JBPfJg== X-Received: by 10.129.76.14 with SMTP id z14mr23509837ywa.20.1497257286097; Mon, 12 Jun 2017 01:48:06 -0700 (PDT) MIME-Version: 1.0 References: <158994e0-9f53-e64a-2b81-b554894571c6@restart.be> In-Reply-To: <158994e0-9f53-e64a-2b81-b554894571c6@restart.be> From: Tom Vijlbrief Date: Mon, 12 Jun 2017 08:47:55 +0000 Message-ID: Subject: Re: [Bug 219927] awg0 stops working after a long output under ssh To: Henri Hennebert , freebsd-arm Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 08:48:07 -0000 Op ma 12 jun. 2017 09:59 schreef Henri Hennebert : > On 06/11/2017 17:54, Tom Vijlbrief wrote: > > > > Op zo 11 jun. 2017 om 16:23 schreef > >: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219927 > > > > Bug ID: 219927 > > Summary: awg0 stops working after a long output under ssh > > Product: Base System > > Version: CURRENT > > Hardware: arm64 > > OS: Any > > Status: New > > Severity: Affects Only Me > > Priority: --- > > Component: arm > > Assignee: freebsd-arm@FreeBSD.org > > Reporter: hlh@restart.be > > > > Environment: pine64+ 2GB > > FreeBSD norquay.restart.bel 12.0-CURRENT FreeBSD 12.0-CURRENT #0 > > r318945M: Sat > > Jun 10 11:47:44 CEST 2017 > > root@norquay.restart.bel:/usr/obj/usr/src/sys/NORQUAY arm64 > > > > If I connect from a wireless computer (FreeBSD 11.1-PRERELEASE #0 > > r318860) and > > run a command with a big output (eg `find /`) the awg0 stops working > > quickly > > (under 20 seconds of output). > > > > If I do the same with telnet from the same computer, the output is > > much longer > > but awg0 stops working. > > > > If I do the same from a wired computer then I must run `find /` 2 or > > 3 times > > before awg0 stops working. > > > > I can rsync through ssh 12GB without problem in both directions > > (from and to > > the pine64 and the wireless computer). > > > > I have a `tcpdump -w ssh.data port 22`. (8.3 MB) > > > > I can connect with a serial console to the pine64 after awg0 stop > > working. > > ifconfig awg0 down > > ifconfig awg0 up > > don't restore the connectivity. I must reboot to restore connectvity. > > > > > > That's a coincidence, today I'm investigating the same issue. > > > > You could try increasing TX_MAX_SEGS in sys/arm/allwinner/if_awg.c line > 95. > > > > I'm currently testing TX_MAX_SEGS set to 40 and no lock up yet.... > > Bingo. Your solution solved the problem. > > Thanks a lot. > Good to hear! Increasing from 10 to 20 is probably sufficient. It is not clear to me what the adverse effects are of a too high value. The root cause is that the driver tries to call m_collapse with this limit and this will fail. The tcp stack will resent the package and the m_collapse will fail again and again and ...