Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 2004 08:13:08 -0700
From:      Bosko Milekic <bmilekic@FreeBSD.org>
To:        Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Cc:        current@freebsd.org
Subject:   Re: uipc_socket2.c panic
Message-ID:  <20040602151308.GA43008@freefall.freebsd.org>

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

>P.S. I have a bad feeling that this happend even BEFORE mbuma... (a day
>or two before you commited that).

  Why do you have this feeling?  Was it occuring before?

  I've had one report of a similar-nature problem which I believe
  I fixed in rev 1.2 of kern_mbuf.c.  But this might be different.

  Try backing out the mbuma changes (i.e., going to -CURRENT the day
  before mbuma) to confirm whether this still occurs.

  If so, I'd also recommend trying to disable pre-emption, just so
  we can rule that out as a possibility.  To disable pre-emption:

  - edit src/sys/kern/kern_intr.c
  - go down to ithread_schedule()
  - spot this code (around line 412):

                if (do_switch &&
                    (ctd->td_critnest == 1) ) {
                        KASSERT((TD_IS_RUNNING(ctd)),
                            ("ithread_schedule: Bad state for curthread."));
                        if (ctd->td_flags & TDF_IDLETD)
                                ctd->td_state = TDS_CAN_RUN; /* XXXKSE */
                        mi_switch(SW_INVOL);
                } else {
                        curthread->td_flags |= TDF_NEEDRESCHED;
                }

  - Change above code to this:

#if 0
                if (do_switch &&
                    (ctd->td_critnest == 1) ) {
                        KASSERT((TD_IS_RUNNING(ctd)),
                            ("ithread_schedule: Bad state for curthread."));
                        if (ctd->td_flags & TDF_IDLETD)
                                ctd->td_state = TDS_CAN_RUN; /* XXXKSE */
                        mi_switch(SW_INVOL);
                } else {
#endif
                        curthread->td_flags |= TDF_NEEDRESCHED;
      /*        } */

   (leaving only the curthread->td_flags |= TDF_NEEDRESCHED line
    uncommented).

  - rebuild and install new kernel.

  I'd recommend trying to backout to JUST before mbuma before trying
  the pre-emption disable.  Let me know how it goes.

  -Bosko
 



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