Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 1997 06:38:32 -0400 (EDT)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!root.com!dg, ponds!freefall.cdrom.com!freebsd-hackers, ponds!lakes.water.net!rivers
Subject:   Re: Some insight on "dup alloc" problems.....
Message-ID:  <199704081038.GAA06263@lakes.water.net>

next in thread | raw e-mail | index | archive | help

 Here's today's installment :-)

 See what you think about this.

 I've added a global variable and sprinkled checks for it in the
kernel... this is from aha1542.c:

    in_region=1;
    
            scsi_uto3b(0, ccb->link_addr);
            /*
             * Put the scsi command in the ccb and start it
             */
            if (!(flags & SCSI_ESCAPE))
                    bcopy(xs->cmd, &ccb->scsi_cmd, ccb->scsi_cmd_length);
            if (!(flags & SCSI_NOMASK)) {
    if(debug) break_tdr4();
                    s = splbio();   /* stop instant timeouts */
                    timeout(aha_timeout, (caddr_t)ccb, (xs->timeout * hz) / 1000);
                    aha_startmbx(ccb->mbx);
                    /*
                     * Usually return SUCCESSFULLY QUEUED
                     */
                    splx(s);
                    SC_DEBUG(xs->sc_link, SDEV_DB3, ("sent\n"));
    in_region=0;
    if(debug) break_tdr3();
    debug = 0;
                    return (SUCCESSFULLY_QUEUED);
            }
    in_region=0;
            aha_startmbx(ccb->mbx);

[Recall that a break at _break_tdr4 masks the problem; while one at 
_break_tdr3 does not.]
    
    
note the variable "in_region".

I added checks that looked like:

    if(in_region) { 
    printf("XXXX while in_region!!!\n");
    }

to:
 aha_free_ccb(), aha_get_ccb(), aha_done(), aha_scsi_cmd(), aha_timeout(),
 get_xs(), and free_xs().

My thought was that if; somehow, the timeout got run (aha_timeout), 
it would call scsi_done which would eventually call aha_done; mucking
around with the ccb free list and causing my problem.

But - none of this happened... (no wonderfully diagnosing printf() got
hit...)

Does anyone have any other potential functions to check into (that is,
what could be run in my small region that could cause the problem.)
[I note that aha_intr() isn't in the list above - I assumed that since
we were at splbio(); I wouldn't need to check on that.]

	- Dave Rivers -



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