ata_alloc_request() failure?!

Pentarh Udi pentarh at
Sun Nov 25 13:17:59 PST 2007

FreeBSD 6.2-RELEASE amd64

1. How it appears
I dont know why but it appeared when i configured geom_stripe on two
ata disks and made a heavy load.
So i get the tons of kernel messages:
ad4: FAILURE - out of memory in start
ad6: FAILURE - out of memory in start
ad6: FAILURE - out of memory in start
ad6: FAILURE - out of memory in start

I did some research and didnt found any answers on this problem, but i
found a source of this error:
/sys/dev/ata/ata-disk.c: line 215

static void
ad_strategy(struct bio *bp)
    device_t dev =  bp->bio_disk->d_drv1;
    struct ata_device *atadev = device_get_softc(dev);
    struct ata_request *request;

    if (!(request = ata_alloc_request())) {
        device_printf(dev, "FAILURE - out of memory in start\n");
        biofinish(bp, NULL, ENOMEM);

Also that is another point to see the problem:
# vmstat -z | egrep "LIMIT|ata"
ITEM                     SIZE     LIMIT      USED      FREE  REQUESTS  FAILURES
ata_request:              336,        0,        0,     1298,  1769922,        4

As you can see there are ata_request failures.

I even tryed to increase kmem_size up to 1Gb instead of 400+M default.
There was no effect. When I make a heavy load on this disk, i get
failures and broken files.

I saw this error on other machine (also FreeBSD 6.2 RELEASE amd64)
with geom_mirrror configured (under heavy load) - but not so much -
one or two kernel messages during "life".

So... what should i do?
Regards, Pentarh Udi

More information about the freebsd-bugs mailing list