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 F1803EB64DD for ; Fri, 21 Jul 2023 22:27:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1291A86384; Sat, 22 Jul 2023 00:26:59 +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="iwm6iQ6V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A2CC1865EB; Sat, 22 Jul 2023 00:26:57 +0200 (CEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) (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 0EFB6862B9 for ; Sat, 22 Jul 2023 00:26:55 +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 26077FF803; Fri, 21 Jul 2023 22:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689978414; 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=WdukMnbgrKgu3+1jxTxC/mCXpy6t9C3+u3NyqjCDZF8=; b=iwm6iQ6VIxVuK0dRJtrvVhJHFXLKp89CPKVb3tbKUy1f2tOPGcfwo+4kAmaWsWtBnHnet2 /CDxqOku2Su4npnoH1bRpX951p4rGSdQdPaEJU934W0wq6jTzYipGPaK+Vwe577Zyxu+aT enGyLb26PbWaTjVcb5uRHB3/t06k2/0B28PLwY8gqXgnCVI79Gqe5PUTSU9M/5zArIBF5q Ckr6TWEsiW4UW8ZaF5uUQ3gkxe0TR8rDV64eJmOvhsp+WoRS20RFC4WB6Svst1miadXVIl CLwbdDs4Fch5PNT3RkfGUohuHGX+9dH0ZmVb8Ra/O2F+oW/jWaxnwCowSBBUCw== Date: Sat, 22 Jul 2023 00:26:52 +0200 From: Miquel Raynal To: qianfan Cc: Heinrich Schuchardt , u-boot@lists.denx.de, Tom Rini Subject: Re: data abort when run 'dhcp' Message-ID: <20230722002652.220ae94d@xps-13> In-Reply-To: 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> 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 qianfan, qianfanguijin@163.com wrote on Fri, 21 Jul 2023 08:31:17 +0800: > =E5=9C=A8 2023/7/21 0:39, Miquel Raynal =E5=86=99=E9=81=93: > > Hello, > > > > 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. > >> > >> 1. Starting u-boot and dhcp via am335x's ethernet(cpsw driver), it's o= k. > >> > >> 2. Starting u-boot and dhcp via am335x's usb net, data abort. > >> > >> 3. start fastboot, and CTRL C right now, dhcp via am335x's usb net, it= 's ok. =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 :-/. > > > > 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. > > > > 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 > Hi: >=20 > Could you please try this two patches? >=20 > http://patchwork.ozlabs.org/project/uboot/patch/20220402025836.19374-1-qi= anfanguijin@163.com/ >=20 > http://patchwork.ozlabs.org/project/uboot/patch/20220402025836.19374-2-qi= anfanguijin@163.com/ Indeed these patches work. I ended up rewriting one of them to propose a different approach. I also found two other proposals for the same issue which are still pending around. I hope this submission will make it to avoid more time to be spent on this :-) Thanks a lot for the pointers, I've Cc'ed you on the submissions. Kind regards, Miqu=C3=A8l