Re: PROBLEM: cdrecord fails with "Cannot send SCSI command via IOCTL" with Kernel 2.2.1

Kurt Garloff (K.Garloff@ping.de)
Mon, 22 Feb 1999 09:55:12 +0100


--7ZAtKRhVyVSsbBD2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 22, 1999 at 12:53:37AM +0000, Daniel SILVERSTONE wrote:
> cdrecord dev=3D0,3,0 -v fs=3D1024k -dummy speed=3D4 -eject mooo.image
>=20
> Cdrecord release 1.6.1 Copyright (C) 1995-1998 Jvrg Schilling
> Starting new track at sector: 0
> cdrecord: Cannot allocate memory. Cannot send SCSI cmd via ioctl

cdrecord uses the sg device to talk to your CDR and tries to get a 32k
physically continuous buffer (SG_BIG_BUF). After your system is up and
running for a while, this allocation is likely to fail because of memory
fragmentation. It might help to compile sg into the kernel or to manually
load sg right after booting. You could also try some tricks, such as running
a memory hog program, having your machine swap a lot, finishing it and
loading sg then.=20

> cdrecord leaves an extra process running which after a long while comes up
> with the message:
> cdrecord: faio_wait_on_buffer for writer timed out.
> and then closes the other process
> The drive remains locked and unmountable

=2E.. which appears to be a kernel bug.

> /proc/slabinfo (as it has something to do with memory)
> slabinfo - version: 1.0
> size-131072 0 0
> size-65536 0 0
> size-32768 0 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> size-16384 1 1
> size-8192 7 7
> size-4096 0 2
> size-2048 32 40
> size-1024 11 16
> size-512 24 32
> size-256 14 28
> size-128 373 400
> size-64 74 84
> size-32 257 315
> slab_cache 25 63

Seems to agree with my theory with failing allocation of SG_BIG_BUF

Hope this helps,
--=20
Kurt Garloff <kurt@garloff.de> [Dortmund, FRG]
Plasma physics, high perf. computing [Linux-ix86,-axp, DUX]
PGP key: see mailheader [Linux SCSI driver: DC390]

--7ZAtKRhVyVSsbBD2
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in

iQCVAwUBNtEbbxaQN/7O/JIVAQF+9AQAhqr86DXjvE625yjo4J7S3ddDgSgHVPD+
tpVDxfAQYRWY+joJDe2z4/v3YOkWgBNz8HMchZrELYeR//Rxm7EzkxZkxLZ4V1GN
q1NaEshtUDZ3+ipGcabzJFTrfWzFChK6x9wpve3L9XX+itIfgxxTWZu2HaA3jxJf
NVcNfQYN3Dk=
=U5ax
-----END PGP SIGNATURE-----

--7ZAtKRhVyVSsbBD2--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/