From nobody Fri Nov 28 05:22:16 2025 X-Original-To: freebsd-current@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 4dHhWM2QKnz6J4bp for ; Fri, 28 Nov 2025 05:22:23 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [85.220.129.31]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHhWJ6PZdz3ZNB for ; Fri, 28 Nov 2025 05:22:20 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=walstatt-de.de header.s=DKIM001 header.b="G/yDRqdi"; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@walstatt-de.de designates 85.220.129.31 as permitted sender) smtp.mailfrom=freebsd@walstatt-de.de Received: from hub1.goneo.de (hub1.goneo.de [85.220.129.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id C1047240570; Fri, 28 Nov 2025 06:22:18 +0100 (CET) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 398B62403DB; Fri, 28 Nov 2025 06:22:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1764307337; 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=t4m/awSiJRHBFPc0zwCGnvAL+mGmMs97YpGpPB0p0rU=; b=G/yDRqdipqg3MJ8usfqcwaDszqvhclCmEEoa5otcJYLUPdnbcX/CpDPBmT59tzgIYCrCyH vqkreaErU0ezzd75yIITtIrV/5/UekNfLEsRIdz1TBY4LQXtPxxtaqB79LH7LylsIFTSJ4 3Pj7nE02ZFWMkLMY0pnKpG+tUjYuOa1Rj0WcWbPrLN+pfUNU8sFKseNsN8OZEDLcarYzbZ BQeejM4w7g8MFuxuno5pfjxCXuzqBZeVmfXovw+IaFU93cGGxMzZBWNjuOlp4tLnVfONab NmikcZK9yqN5lPcjGRK10cQfyQTtBRQgP30DqLPyw3IHoGWXKuBz0ya/dszeiA== Received: from hermann (dynamic-2a02-3100-2d64-3302-10ac-6fd2-c671-be48.310.pool.telefonica.de [IPv6:2a02:3100:2d64:3302:10ac:6fd2:c671:be48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id D89DB2402EB; Fri, 28 Nov 2025 06:22:16 +0100 (CET) Date: Fri, 28 Nov 2025 06:22:16 +0100 From: FreeBSD User To: Warner Losh Cc: FreeBSD CURRENT Subject: Re: freezing on unmountin ext2fs USB device Message-ID: <20251128062140.120e8369@hermann> In-Reply-To: References: <20251123151439.361dd84c@thor.sb211.local> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-UID: db1705 X-Rspamd-UID: 919526 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.58 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_HAM_SHORT(-0.48)[-0.479]; R_SPF_ALLOW(-0.20)[+ip4:85.220.129.0/25]; R_DKIM_ALLOW(-0.20)[walstatt-de.de:s=DKIM001]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[85.220.129.31:from]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[walstatt-de.de]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[walstatt-de.de:+] X-Rspamd-Queue-Id: 4dHhWJ6PZdz3ZNB On Tue, 25 Nov 2025 21:03:01 -0700 Warner Losh wrote: > On Sun, Nov 23, 2025 at 7:15=E2=80=AFAM A FreeBSD User > wrote: >=20 > > Hello, > > > > running FreeBSD 16.0-CURRENT #4 master-n282101-c8cf5a99f82b: Sun Nov 23 > > 13:56:23 CET > > 2025 amd64 I'm running into a serious problem when mounting an ext2fs > > formated USB Flash > > device (512GB). The devince contains files written by a Linux system, > > mounting the USB Flash > > via extended4fs, the size of the written datafiles is > 128GB. Deleting > > those files larger > > than some 20GB results in an I/O error reported by FReeBSD (# sudo rm > > /mnt/USB/filename). > > Unmounting the ext2fs after deletion (sudo umount /mnt) results in a to= tal > > freeze of the box. > > No crash, no core dump, nothing. I waited almost an hour hoping for > > recover. I have to > > physically switch off the box. > > > > I checked with other USB flash I have at hand, one Samsung 256 GB, ZFS - > > no problem, another > > 128GB, UFS, no problem and several much smaller (4 - 64GB) with FAT or = UFS > > filesystems, all no > > problem. > > > > I can not figure out whether it is the USB flash drive itself, the size= or > > the ext2fs itself > > causing the problem. > > > > Does anybody see similar problems or do have an tip to investigate with= out > > risking my box' > > health switching it on/off on failure? > > =20 >=20 > I've not seen this on the smaller tests I've been able to run. >=20 > So can you share the error messages that you get when you say you get I/O > errors? I'd like to see if this is due to an error in ext2fs or on the USB > drive. It's kinda sounding a little like the particular USB is triggering > some kind of issue that at the very least we should work around. Given th= at > it's not happening on all ext2fs drives you try to access, I'm leaning > towards the drive, but you never know. >=20 > Thanks Plugging the USB flash gives the following hardware information on the cons= ole: [...] ugen1.5: at usbus1 umass0 on uhub6 umass0: on usbus1 (probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10 = 00 00=20 (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI status: Check Condition (probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid co= mmand operation code) (probe0:umass-sim0:0:0:0): Error 22, Unretryable error da4 at umass-sim0 bus 0 scbus11 target 0 lun 0 da4: Removable Direct Access SPC-4 SCSI device da4: Serial Number somer serial numbers da4: 400.000MB/s transfers da4: 475000MB (972800000 512 byte sectors) da4: quirks=3D0x2 [...] Trying to mount via: # mount -t ext2fs /dev/da4p1 /mnt/image [...] (da4:umass-sim0:0:0:0): got CAM status 0x444 (da4:umass-sim0:0:0:0): fatal error, failed to attach to device da4 at umass-sim0 bus 0 scbus11 target 0 lun 0 da4: s/n some serial numbers detached (da4:umass-sim0:0:0:0): Periph destroyed mount: /dev/da4p1: Device not configured [...] [...] # /compat/linux/sbin/fsck.ext4 /dev/da4p1 e2fsck 1.46.5 (30-Dec-2021) SINA was not cleanly unmounted, check forced. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Error writing file system info: Invalid argument XXXX: ***** FILE SYSTEM WAS MODIFIED ***** [...] detaching and attaching to another USB slot on the same (external) HUB: [...] ugen1.5: at usbus1 umass0 on uhub6 umass0: on usbus1 (probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10 = 00 00=20 (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI status: Check Condition (probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid co= mmand operation code) (probe0:umass-sim0:0:0:0): Error 22, Unretryable error da4 at umass-sim0 bus 0 scbus11 target 0 lun 0 da4: Removable Direct Access SPC-4 SCSI device da4: Serial Number some serial numbers da4: 400.000MB/s transfers da4: 475000MB (972800000 512 byte sectors) da4: quirks=3D0x2 linux: jid 0 pid 5087 (fsck.ext4): linux_ioctl_fallback fd=3D3, cmd=3D0x127= c ('\^R',124) is not implemented linux: jid 0 pid 5087 (fsck.ext4): linux_ioctl_fallback fd= =3D3, cmd=3D0x125e ('\^R',94) is not implemented (da4:umass-sim0:0:0:0): got CAM status 0x444 (da4:umass-sim0:0:0:0): fatal error, failed to attach to device da4 at umass-sim0 bus 0 scbus11 target 0 lun 0 da4: s/n some serial numbers detached (da4:umass-sim0:0:0:0): Periph destroyed [...] I can not even mount the device on CURRENT (FreeBSD 16.0-CURRENT #1 master-n282217-34d66b0c96d5: Fri Nov 28 05:15:56 CET 2025 amd64). Package used for linux operation: emulators/linux-rl9