Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds

Joerg Wunsch j at uriah.heep.sax.de
Tue Jul 29 22:44:17 UTC 2014


"Kenneth D. Merry" <ken at FreeBSD.ORG> 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: <DEC DLT2000 15/30 GB 840B> 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. ;-)


More information about the freebsd-scsi mailing list