From nobody Sun Jan 14 01:52:47 2024 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCJFH6WTNz56jFx for ; Sun, 14 Jan 2024 01:52:51 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCJFH3Wywz4vHr; Sun, 14 Jan 2024 01:52:51 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 40E1qmn1023217 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 13 Jan 2024 17:52:48 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 40E1qlfk023216; Sat, 13 Jan 2024 17:52:47 -0800 (PST) (envelope-from fbsd) Date: Sat, 13 Jan 2024 17:52:47 -0800 From: bob prohaska To: bugzilla-noreply@freebsd.org Cc: fs@freebsd.org Subject: Re: [Bug 205166] OS craching on USB connection. Message-ID: References: List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4TCJFH3Wywz4vHr X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US] On Sat, Jan 13, 2024 at 11:39:42PM +0000, bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205166 > > Warner Losh changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|New |Closed > CC| |imp@FreeBSD.org > Resolution|--- |Overcome By Events > > --- Comment #3 from Warner Losh --- > This sure looks weird.... > However, it's against a version of FreeBSD that has gone out of support. > If this problem can be reproduced on FreeBSD 13 or newer, please file a new bug > so our triage processes get it on our radar. I just crashed a Pi3 running FreeBSD 14.0-RELEASE-p4 #0 releng/14.0-n265400-4edf3b80733e: Wed Dec 27 20:21:26 PST 2023 bob@pelorus:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 by plugging in a microSD to USB adapter with an old Rasbian Buster microSD card installed. The machine rebooted immediately, from the newly-inserted Buster installation. Plugging in an FT232 usb-serial adapter was followed by: FreeBSD/arm64 (pelorus.zefox.org) (ttyu0) login: ugen1.4: at usbus1 (disconnected) (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 27 e0 b0 28 00 00 18 00 uhub2: at uhub1, port 2, addr 4 (disconnected) (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain ugen1.5: at usbus1 (disconnected) (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 27 e0 b0 28 00 00 18 00 umass0: at uhub2, port 2, addr 5 (disconnected) (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command, 2 more tries remain da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: s/n 000000000000A detached g_vfs_done(): da0p2 converting all errors to ENXIO g_vfs_done():da0p2[WRITE(offset=342274080768, length=12288)]error = 6 supressing further ENXIO panic: UFS: root fs would be forcibly unmounted cpuid = 0 time = 1705223363 KDB: stack backtrace: #0 0xffff00000050d52c at kdb_backtrace+0x58 #1 0xffff0000004b9044 at vpanic+0x19c #2 0xffff0000004b8ea4 at panic+0x44 #3 0xffff0000007fd290 at ffs_fsfail_cleanup+0x178 #4 0xffff0000007d1748 at ffs_update+0x300 #5 0xffff00000080534c at ffs_syncvnode+0x62c #6 0xffff000000803ce4 at ffs_fsync+0x28 #7 0xffff0000005cdd84 at kern_fsync+0x1b0 #8 0xffff000000896628 at do_el0_sync+0x5b0 #9 0xffff000000874110 at handle_el0_sync+0x44 Uptime: 6m28s Resetting system ... It's stuck there. Pulling the plug brought it back up. Prior to those failures, connecting a usb hard drive similar to the boot drive caused no problem, just a console message announcing its presence. Admittedly, I didn't wait very long before the next experiment. All three tests were done via a powered usb hub. Do these count as fair tests? I'll add that even Pi4 RasPiOS isn't immune to such mischief. Plugging in the same usb-microSD adapter with a card inserted stops the mouse and keyboard working, with power cycling the easiest recovery. Plugging in the adapter without a card and then inserting the card allows normal recognition. Haven't tried that with FreeBSD recently, it used to work also. The FT232 also crashed RasPiOS, disabling keyboard and mouse. The RasPiOS experiments didn't use a powerd hub, but neither device draws much power. USB still seems a work in progress. Thanks for reading, please indicate if a bug is warranted. bob prohaska