From nobody Sun Apr 06 19:27:04 2025 X-Original-To: bugs@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 4ZW2Qw5qk8z5sMTP for ; Sun, 06 Apr 2025 19:27:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZW2Qw5Kprz3VQZ for ; Sun, 06 Apr 2025 19:27:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743967624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sOS8QMAhmyjv9liFkxnWf+xst0Q6/iQ5E6WbyHY1M9Q=; b=S2Xg2Ko25eyrPASfHf1fvbaef1I7MhP0ch/zw6Wx0z3m0w4NcqNkUh6Wrg9E9XtqKbIwY1 x2WcPWf3ox+8XkqKWA4YgTHg00N90tD51noaZEzHTZLRnNBScJ88FCv5M6mZonRVO14xls Qf3jAxBpPBNwiY7HfqjHXEBk2ybBlgWh/upB1GH2C52XpSwMe/O2XYkTVSuTc5tE/scKvk V2a9LOozOl8G/fX+54F36omSqqkzcAHzhxSzh09dzT0fCe+i0bW7U8mpU3rAygjgxkM/RA ckXjUFryS5Tbl9HveSH7lDVIovsUKDoV3XOTtZ3O//jz7ZpkHviMIhnX+ioSiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743967624; a=rsa-sha256; cv=none; b=yfwhXmZy6UNfEyyWRMaY9tXSCsR2WmcSv9EdPRDG9M2R5i6UA2YovNQF/w7vYe1wPaYXSy EPATNmQXDALofG62OvWzMQ9pK0+sZwItDcCb+7zxd/H/xgkd8kRXQik70pUaoAZIaP8fXy 7MNCAP2iOa4F/SCpyiu93uyFS5NzmPDWgkFQiUHTzq4KQze2S+dfyAT7295AQiy2Fbt/fk 64NtnGihebrzJqo1Sc+4HGW3YNUZJahUa7H7jEHwpbPqBiEccxL1BqMXSzubHNgWI+hRT9 vNocsdwcK7pYwoaovSsEIKeWGUcSDv8YqKCjcJaVJBUPDA4+7VzaLtI5/VlNcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743967624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sOS8QMAhmyjv9liFkxnWf+xst0Q6/iQ5E6WbyHY1M9Q=; b=aj0CZ8nhO8EPWTdCwZo9U2tJQf5pSDzW00p1dZpCzzc3mNxX8yTA0lTK+ft1hCnEOa4dBp QrhWYp9+2qnhOktoqFuJ5pwcOgjdZCSk70MrpCO/3FY7WKCRVp2g5GLNRFsWgHQFJlj/KD w5y4tQ9gg4qIUgkTyeikVWOJ2nD3rqlDIAfknECvCZq0fpsmej8RYlsGVtcYOIf5+/h+IO /g6on7PQPO7Lm9RoDS73CNQJAH5FVyFB3W7IbVbqOJ0R/3WujaDYqkavAJUC7V3tVCjOIE lAnBHjmjVS81C6lh/xyJSKkuclpZKN6SGszIj73Gg4UXB2lx6hrViaNBeeCn1w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZW2Qw4Ydjz1CZF for ; Sun, 06 Apr 2025 19:27:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 536JR4xG048000 for ; Sun, 6 Apr 2025 19:27:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 536JR4FI047999 for bugs@FreeBSD.org; Sun, 6 Apr 2025 19:27:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 285922] recoverdisk(1) Floating point exception Date: Sun, 06 Apr 2025 19:27:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kwhite.uottawa@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D285922 Bug ID: 285922 Summary: recoverdisk(1) Floating point exception Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: kwhite.uottawa@gmail.com I get a "Floating point exception" when running recoverdisk(1) on a disk th= at does not have a stripesize. e.g.: # recoverdisk /dev/da0 Floating point exception # diskinfo -v /dev/da0 /dev/da0 512 # sectorsize 62914560000 # mediasize in bytes (59G) 122880000 # mediasize in sectors 0 # stripesize 0 # stripeoffset 7648 # Cylinders according to firmware. 255 # Heads according to firmware. 63 # Sectors according to firmware. Generic Flash Disk # Disk descr. 16D4D655 # Disk ident. umass-sim0 # Attachment No # TRIM/UNMAP support Unknown # Rotation rate in RPM Not_Zoned # Zone Mode Possible fix, check that stripesize is greater than zero before using it as sectorsize: # git -C /usr/src diff sbin/recoverdisk diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 446266c36d50..4b106d571f2d 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -482,7 +482,7 @@ main(int argc, char * const argv[]) err(1, "DIOCGSECTORSIZE failed"); error =3D ioctl(fdr, DIOCGSTRIPESIZE, &stripesize); - if (error =3D=3D 0 && stripesize < sectorsize) + if (error =3D=3D 0 && stripesize > 0 && stripesize < sector= size) sectorsize =3D stripesize; minsize =3D sectorsize; --=20 You are receiving this mail because: You are the assignee for the bug.=