From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE8EFEB64DC for ; Fri, 21 Jul 2023 11:55:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 17837861D9; Fri, 21 Jul 2023 13:55:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="aJSuJS1O"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E3F0861E6; Fri, 21 Jul 2023 13:55:32 +0200 (CEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6231B8556F for ; Fri, 21 Jul 2023 13:55:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 7BA33E0008; Fri, 21 Jul 2023 11:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689940530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m/9XJ174PMgQCLyGgbqriRacW7CfE9Ya6tVAEbUjctg=; b=aJSuJS1OBDcCoCTZitpQRu47p+BTtxtF+JDf64A62eefMQlLpGAvVlTiyiQOVMZtf0bpQh bVZ7H/LJ8pjwlOCuQun/SBABJXmpFXSU91OJn+qCgLPoGdQrjNMhmNj6OMA+H1nBEybXvr 23vZ/gX2t1Uyu97iW5JeYHuDZFDVrhSD03PkEw9fPWEwfHTkoTx8Sbvd5ayaibO9jJ0AO0 G34LJ0gSntl6xUF2qZJKQwF+5eBqLTL7j1hWZSihbMUohLOAxdkYK/UwcIeD+ekTi66gm3 2NK2iGsYb05YlkSBBlMGVKu48T0AmoU3AD0NP3lyAOOyQqgN50gLv1iW1ItFkA== Date: Fri, 21 Jul 2023 13:55:28 +0200 From: Miquel Raynal To: Tom Rini Cc: qianfan , Heinrich Schuchardt , u-boot@lists.denx.de Subject: Re: data abort when run 'dhcp' Message-ID: <20230721135528.612e7ab9@xps-13> In-Reply-To: <20230720183452.GM1670569@bill-the-cat> References: <7536b9e1-de7a-a492-6951-485d4eb75df1@163.com> <2fe3a2a4-ec68-b18f-3446-ae6cb4de6d32@163.com> <23003c48-f525-f886-a241-e7bac7a68643@163.com> <7884d265-3c73-a695-104f-0b34d3e8bc18@163.com> <2930a323-e860-e334-28ee-b0edb524960d@163.com> <20230720183917.74e1a46c@xps-13> <20230720183452.GM1670569@bill-the-cat> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi Tom, trini@konsulko.com wrote on Thu, 20 Jul 2023 14:34:52 -0400: > On Thu, Jul 20, 2023 at 06:39:17PM +0200, Miquel Raynal wrote: > > Hello, > >=20 > > qianfanguijin@163.com wrote on Fri, 25 Mar 2022 18:04:46 +0800: > > =20 > > > It's very strange. And I can't detect it's a bug of usb or dlmalloc. > > >=20 > > > 1. Starting u-boot and dhcp via am335x's ethernet(cpsw driver), it's = ok. > > >=20 > > > 2. Starting u-boot and dhcp via am335x's usb net, data abort. > > >=20 > > > 3. start fastboot, and CTRL C right now, dhcp via am335x's usb net, i= t's ok. =20 > >=20 > > I am sorry to re-open a thread that is one year old but this is > > still an open bug. The BBB is affected. In particular the BBBW > > because there is no Ethernet connector, which makes the Eth-over-USB > > emulation even more important. All U-Boots since 2021 are affected: > > spurious data aborts, usually at the end of network interactions (tftp, > > ping). I could not bisect it because the boot was deeply broken as > > well on a significant range of commits :-/. > >=20 > > On my side I narrowed it down to an env update which fails in malloc as > > well. If I comment the env update, it fails a bit later. It really > > looks like a stack corruption which is either related to the Ethernet > > USB gadget or the USB controller driver itself. Network transfers on > > the BBBW using regular Ethernet does not trigger any error. > >=20 > > I also observe the very strange "fix" mentioned above: starting and > > killing fastboot makes all tftp pass... If anyone has more details to > > share, or perhaps a subsequent thread giving more details, I would > > really like to see this fixed upstream, I suppose I am not the only one > > :-) =20 >=20 > What happens if you increase the malloc pool from say 32MB (current > value, 0x2000000) to 64MB (so 0x4000000) ? Same result. I tried to increment the heap size to 64MB as well as the stack size (16 -> 64MB), same behavior. Thanks, Miqu=C3=A8l