From nobody Tue Mar 29 13:47:11 2022 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 6DEB41A3C9BF for ; Tue, 29 Mar 2022 13:47:11 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KSW8H0wCJz3G6l for ; Tue, 29 Mar 2022 13:47:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 CB94B1F5E9 for ; Tue, 29 Mar 2022 13:47:10 +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 22TDlAs4018317 for ; Tue, 29 Mar 2022 13:47:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22TDlACN018316 for bugs@FreeBSD.org; Tue, 29 Mar 2022 13:47:10 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 262904] Write errors when writing to LTO tape with dd, tar, btape etc. after upgrade to 13.0-RELEASE Date: Tue, 29 Mar 2022 13:47:11 +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: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: b.ecker@bitteeinbyte.de 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-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648561631; 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=JTAVYZu3IQvdYKrnbAt36C9Ip8cSQV08ZnAi68RevqE=; b=KpaGUME0B6oCSqYFtlIJDrO8VCSVmCYenacctLM2PrGUUkw443R+GDvFm/K4Cx1d4Aj0iz hRK8xQgaO6mTmgWksnVrmmomW88jAZZ1/J7QCm5j8AwtTFCgm7GzcU4YmCMkrEVx7pt0Oo RUCO6JOVeeNojkP4l0I1/DFXh3g7C5fY++nl+utlw5R/i2V5PNptqkNcwB+0Bdz2SiL/2/ BeS7CL0x/4VhNdNatBj0iwb17XUtHuHOgXrtSkwfTDPJr4pEcHovl2eumx0uYaJg66d3Ml Wzu8SOTTsH16lml72bjtCfNewTs2LRKg6YFWNSdKz605cEzlEX64cWEcANZr7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648561631; a=rsa-sha256; cv=none; b=lPMkX4GLW4W9AuHuQ2k0QxMr3EPPuY3CFlV6O9YZUaD4wtQEvWARMKNLgPLMCjaS2O773Y +wPKyO/UFqZekeK4g6u/lsd1jrIlUcogK+Bhi6aB/qbpMoAp79VZl9mZWc2y0Vt4l00r6h t/c0p+cn2d94vbbQzITvyll09yUV4MUsSXcBjg3TB66bAo5aEwHlxBPmFEuE/XnJgm2gYm FJQw+/S8RIzjNNMsHTiOM1dqGTpi43EIDpl5sIfHYhV+2RcEcL5ij6n8RF3ivWx9dfblk7 RvywDbajrG8BbEYag1PSnx8ezE3CWGxg8i7DIL6ZPAYDeAFB+16hcMlBdrTcHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262904 Bug ID: 262904 Summary: Write errors when writing to LTO tape with dd, tar, btape etc. after upgrade to 13.0-RELEASE Product: Base System Version: 13.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: b.ecker@bitteeinbyte.de I have a HP Storeworks Ultrium 960 LTO-3 drive, which is connected to a LSI Logic Ultra320 SCSI Controller Card. I tested it a while ago, still running FreeBSD 12.2-RELEASE, by writing a few peaces of data to tape with tar and = dd and it worked absolutely fine. That is not the case after upgrading to Free= BSD 13.0-RELEASE. When something is about to be written to tape, that is at least a few MB in size, the drive exits with errors. It tells the writing program, that it has reached the end of medium or the end of device, which can't be the case aft= er a few megabytes. I tested it with three brand new tapes and I also used a cleaning tape twice. Upon invoking the mt-command for the first time after rebooting, /var/log/messages says the following: (sa0:mpt0:0:3:0): 64512-byte tape record bigger than supplied buffer However positioning, rewinding and querying the status of the drive with mt= is all working fine. I tried writing to the tape device with dd, tar, btape and piping the outpu= t to the device. All yield similar results. I tried writing to /dev/nsa0 and /dev/sa0. In every case the invoked command always fails. A few examples wi= th output: Running dd: dd if=3D/dev/urandom of=3D/dev/nsa0 bs=3D128k count=3D8192 dd: /dev/nsa0: end of device 2002+0 records in 2001+0 records out 262275072 bytes transferred in 5.069271 secs (51738220 bytes/sec) Running tar: tar cvf /dev/nsa0 /tmp/testfile a tmp/testfile tar: Write error Running btape test btape -v /dev/nsa0 Tape block granularity is 1024 bytes. btape: stored/butil.cc:306-0 Using device: "/dev/nsa0" for writing. btape: stored/btape.cc:490-0 open device "TapeDrive" (/dev/nsa0): OK *test =3D=3D=3D Write, rewind, and re-read test =3D=3D=3D I'm going to write 10000 records and an EOF then write 10000 records and an EOF, then rewind, and re-read the data to verify that it is correct. This is an *essential* feature ... btape: stored/btape.cc:1119-0 Wrote 10000 blocks of 64412 bytes. btape: stored/btape.cc:599-0 Wrote 1 EOF to "TapeDrive" (/dev/nsa0) btape: stored/btape.cc:1133-0 Wrote 10000 blocks of 64412 bytes. btape: stored/btape.cc:599-0 Wrote 1 EOF to "TapeDrive" (/dev/nsa0) btape: stored/btape.cc:599-0 Wrote 1 EOF to "TapeDrive" (/dev/nsa0) btape: stored/btape.cc:1169-0 Rewind OK. 10000 blocks re-read correctly. Got EOF on tape. Got EOF on tape. btape: stored/btape.cc:1187-0 Read block 19123 failed! ERR=3DNo error: 0 I also tried to reduce the size of kern.maxphys, because I got the impressi= on, that too much data is being send to the drive and overflows the buffer. But= no effect either. I live-booted FreeBSD 12.3-RELEASE for diagnosing the problem further. Runn= ing the same commands now yields perfect results out of the box. Everything wor= ks as expected. I filled two tapes with over 200GB of data without a single hickup. I further confirmed this with a Debian live boot, with the same positive results. My guess is, that some change made in the process between 12.3 and 13.0 is responsible. Thus I put the report in the bin category. I am thankful for every insight. Benedict --=20 You are receiving this mail because: You are the assignee for the bug.=