Fasinating...

From: Michael O'Reilly <michael@dont-contact.us>
Date: 25 Feb 1998 09:52:36 +0800

Using aio on s1.2b15..

Got an assertion failure

squid: disk.c: diskHandleWriteComplete: Assertion `q->buf_offset <= q->len' failed.

Cache.log is....

1998/02/24 22:49:21| diskHandleWriteComplete: q->buf_offset > q->len (0xd1086a8,135, 48, 135 FD 42)
1998/02/24 22:49:21| diskHandleWriteComplete: desc /w5/s/swap.state, type 2, open 1, flags 0x2
1998/02/24 22:49:22| Starting Squid Cache version 1.2.beta15 for i686-pc-linux-gnu...

What's interesting is that my WriteComplete function starts off as
below.

So the F->write_q is actually the same one that was there when the
aioWrite started. Either the contents got changed, or the aioWrite
request got fubared along the way.

Michael.

static void
diskHandleWriteComplete(void *data, int len, int errcode)
{
    disk_ctrl_t *ctrlp = data;
    int fd = ctrlp->fd;
    fde *F = &fd_table[fd];
    struct _fde_disk *fdd = &F->disk;
    dwrite_q *q = fdd->write_q, *p;
    int status = DISK_OK;
    errno = errcode;

    if (!EBIT_TEST(F->flags, FD_WRITE_DAEMON)) {
        debug(50,0) ("KARMA: diskHandleWriteComplete called by no DAEMON set\n");
    }

    if (q && q != ctrlp->data) {
        p = ctrlp->data;
        debug(50,0) ("KARMA: q != data (%p, %p)\n", q, p);
        debug(50,0) ("KARMA: (%d, %d, %d FD %d)\n",
                q->buf_offset, q->len, len, fd);
        debug(50,0) ("KARMA: desc %s, type %d, open %d, flags 0x%x\n",
                 F->desc, F->type, F->open, F->flags);

        debug(50,0) ("KARMA: (%d, %d)\n", p->buf_offset, p->len);

        len = -1;
        errcode = EFAULT;
    }
Received on Tue Jul 29 2003 - 13:15:46 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:43 MST