Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 2008 14:44:34 +0100
From:      Mike Clarke <jmc-freebsd@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Non aligned DMA transfer errors with k3b
Message-ID:  <200805261444.34278.jmc-freebsd@milibyte.co.uk>
In-Reply-To: <200805252122.40636.jmc-freebsd@milibyte.co.uk>
References:  <200805252122.40636.jmc-freebsd@milibyte.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 25 May 2008, I wrote:

> Suddenly today all my attempts to burn DVDs with k3b result in a
> continuous stream of the following error messages.
>
> May 25 18:04:40 kestrel kernel: ata1: FAILURE - non aligned DMA
> transfer attempted
> May 25 18:04:40 kestrel kernel: acd0: setting up DMA failed
>
> Quiting k3b doesn't stop the flood of errors, reboots hang and the
> only solution is to hit the reset switch.
>
> I'm running 7.0 RELEASE and if I reboot into my 6.3 partition k3b
> works just fine, confirming that it's not a media or hardware fault.
> I've also replaced the DVD writer but I still get the problem with
> 7.0.
>
> I can burn the same data to the same DVD with growisofs with no
> problem which suggests that the problem lies with k3b so this got me
> wondering if it was related to the massive portupgrade I did
> yesterday (affecting 156 ports) but that seems unlikely because when
> portupgrade finished last night I rebooted and burnt that day's
> backup to DVD+RW without problem. This morning I burnt 3 DVD+Rs
> without problem, then about an hour later the problem suddenly
> appeared when I started to burn another DVD+RW, and there'd been
> absolutely no software or hardware changes since the previous
> successful run.
>
> Although I don't think upgrading the ports is responsible I've tried
> downgrading k3b from 1.0.4_1 to 1.0.4 but that had no effect, nor did
> downgrading dvd+rw-tools-7.1 to 7.0. I don't think any of the other
> upgraded ports would have been significant.
>
> Turning off DMA by setting hw.ata.ata_dma and hw.ata.atapi_dma to
> zero stops the errors but with a big performance hit so that's not an
> option for a permanent fix.
>
> I've now run out of ideas for what to try next so any suggestions
> would be welcome.

The mystery thickens although I've found a workaround.

It certainly doesn't look like a portupgrade issue, I've temporarily 
restored both /usr and /usr/local to their state before I ran 
portupgrade and I still have the problem. The mystery remains as to why 
the behaviour should have suddenly changed over a period of just a few 
hours during which there were no known changes to the software or 
hardware. I've also checked for files in the base system with 
timestamps more recent than when things were working OK and none of 
them seem relevant to writing DVDs.

I noticed that, by default, k3b tries to create multisession DVDs and 
that the problem arises when it examines the contents of the DVD before 
it starts to run growisofs. I don't need multisession DVDs so I've 
changed the default multisession mode to "No Multisession" and things 
work OK now.

As I said previously, everything works fine when running from my 6.3 
partition. I see some error messages which might be relevant when 
booting 7.0 which don't appear with 6.3:

With 7.0 I see:

Waiting 5 seconds for SCSI devices to settle
ad0: 152627MB <Seagate ST3160023A 8.01> at ata0-master UDMA100
acd0: DVDR <NEC DVD RW ND-3550A/1.05> at ata1-master UDMA33
acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x21 ascq=0x00
GEOM_LABEL: Label for provider acd0 is iso9660/K3b data project.
cd0 at ata1 bus 0 target 0 lun 0
cd0: <_NEC DVD_RW ND-3550A 1.05> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: cd present [2295104 x 2048 byte records]
acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x21 ascq=0x00
(cd0:ata1:0:0:0): READ(10). CDB: 28 0 0 23 5 3f 0 0 1 0
(cd0:ata1:0:0:0): CAM Status: SCSI Status Error
(cd0:ata1:0:0:0): SCSI Status: Check Condition
(cd0:ata1:0:0:0): ILLEGAL REQUEST asc:21,0
(cd0:ata1:0:0:0): Logical block address out of range
(cd0:ata1:0:0:0): Unretryable error
(cd0:ata1:0:0:0): cddone: got error 0x16 back
Trying to mount root from ufs:/dev/ad0s4a

... while 6.3 is much cleaner with:

ad0: 152627MB <Seagate ST3160023A 8.01> at ata0-master UDMA100
acd0: DVDR <NEC DVD RW ND-3550A/1.05> at ata1-master UDMA33
Waiting 5 seconds for SCSI devices to settle
cd0 at ata1 bus 0 target 0 lun 0
cd0: <_NEC DVD_RW ND-3550A 1.05> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: cd present [2295104 x 2048 byte records]
Trying to mount root from ufs:/dev/ad0s2a

The same DVD was in the tray for each boot, how do I fix the error 
messages?
Could the "GEOM_LABEL" line be significant, it's something that crept in 
when I installed 7.0, perhaps I don't need it, in which case how do I 
remove it?

-- 
Mike Clarke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805261444.34278.jmc-freebsd>