From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 29 22:44:17 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35B26FB2; Tue, 29 Jul 2014 22:44:17 +0000 (UTC) Received: from uriah.heep.sax.de (uriah.heep.sax.de [213.240.137.9]) by mx1.freebsd.org (Postfix) with ESMTP id E936220E6; Tue, 29 Jul 2014 22:44:16 +0000 (UTC) Received: by uriah.heep.sax.de (Postfix, from userid 107) id E2AAE276; Wed, 30 Jul 2014 00:44:14 +0200 (CEST) Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <20140729090724.GA26577@uriah.heep.sax.de> <201407291823.s6TINAad032318@higson.cam.lispworks.com> <20140729191829.GK3121@uriah.heep.sax.de> <20140729204354.GA78616@nargothrond.kdm.org> In-Reply-To: <20140729204354.GA78616@nargothrond.kdm.org> From: j@uriah.heep.sax.de (Joerg Wunsch) Subject: Re: Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds X-Original-Newsgroups: local.freebsd.scsi To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=us-ascii Message-Id: <20140729224414.E2AAE276@uriah.heep.sax.de> Date: Wed, 30 Jul 2014 00:44:14 +0200 (CEST) Cc: ken@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2014 22:44:17 -0000 "Kenneth D. Merry" wrote: > Can you put a printf in the above code snippet, and print out the count, > fileno, and last_ctl_resid before fileno is set? That might tell us > something. Incidently, I had exactly the same idea just before you wrote it. ;-) I had to do a full kernel rebuild though, so it took a while to complete. My old FreeBSD 8.2 hardware is also still around, and I could reproduce the problem on an elderly DLT2000 drive I've got, which could easily be swapped between both machines. In each case, the drive was attached to a sym(4) driver (just in case). On the FreeBSD 10 machine, I get the following: sym2: <810a> port 0xc000-0xc0ff mem 0xfe920000-0xfe9200ff irq 21 at device 7.0 on pci4 sym2: No NVRAM, ID 7, Fast-10, SE, parity checking sa0 at sym2 bus 0 scbus5 target 3 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: Serial Number JF74130050 sa0: 5.000MB/s transfers (5.000MHz, offset 8) (sa0:sym2:0:3:0): 10240-byte tape record bigger than supplied buffer saspace(): fileno 0, count 32767, resid 0 (The "bigger than supplied buffer" message is probably from "mt stat".) On the FreeBSD 8.2 machine, the printout for the same tape was saspace(): fileno 0, count 32767, resid 32762 (The tape has 5 filemarks on it.) So we are probably on the right track. > Another possibility here is that the driver is setting the sense residual > incorrectly. I've seen that CAM debugging can now be turned on the fly. Maybe that would be of some help here? It's already past midnight, so I'm heading for bed now. Thanks for the responses so far! -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)