Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2000 13:42:46 -0500 (EST)
From:      David Gilbert <dgilbert@velocet.ca>
To:        freebsd-current@freebsd.org, Archie Cobbs <archie@whistle.com>
Subject:   Kernel trace question (kernel doesn't compile _without_ -O)
Message-ID:  <14560.64806.608659.960815@trooper.velocet.net>

next in thread | raw e-mail | index | archive | help
I'm puzzled over the following kernel trace.  'm' in frame 6 is
clearly not null... but in frame 5, it is.  I have compiled the
ng_l2tp module without -O... just in case that was the problem, but
line 391 (the for loop) explicitly tests m for NULLness anyways.

Also... I have noticed that several modules don't want to compile in
the kernel without -O, including kern_synch.c (undefined reference to
__cursig) and atomic.c (inconsistent operand constraints in an `asm').

(kgdb) bt
#0  boot (howto=256) at ../../kern/kern_shutdown.c:304
#1  0xc0155ed5 in panic (fmt=0xc026010f "page fault")
    at ../../kern/kern_shutdown.c:554
#2  0xc022557a in trap_fatal (frame=0xc0269d58, eva=16)
    at ../../i386/i386/trap.c:924
#3  0xc022522d in trap_pfault (frame=0xc0269d58, usermode=0, eva=16)
    at ../../i386/i386/trap.c:817
#4  0xc0224db3 in trap (frame={tf_fs = -1071251440, tf_es = 9502736, 
      tf_ds = 16, tf_edi = 96, tf_esi = 1, tf_ebp = -1071211080, 
      tf_isp = -1071211132, tf_ebx = 0, tf_edx = 0, tf_ecx = 0, tf_eax = 0, 
      tf_trapno = 12, tf_err = 0, tf_eip = -1072237390, tf_cs = 8, 
      tf_eflags = 66054, tf_esp = -1038559808, tf_ss = -1072044908})
    at ../../i386/i386/trap.c:423
#5  0xc016f4b2 in m_dup (m=0x0, how=1) at ../../kern/uipc_mbuf.c:763
#6  0xc019e4f3 in ngl2tp_ctrlq_timeout (arg=0xc218d5c0)
    at ../../netgraph/ng_l2tp.c:393
#7  0xc015b245 in softclock () at ../../kern/kern_timeout.c:131
(kgdb) frame 6
#6  0xc019e4f3 in ngl2tp_ctrlq_timeout (arg=0xc218d5c0)
    at ../../netgraph/ng_l2tp.c:393
393             n = m_dup(m, M_NOWAIT);
(kgdb) l
388         int i, error = 0;
389         u_char *d;
390         
391         for(m=p->ctrlq, i=0; m && i < p->Swin; m = m->m_nextpkt, i++)
392         {
393             n = m_dup(m, M_NOWAIT);
394             if(n)
395             {
396                 d = mtod(n, u_char *);
397                 *((u_int16_t *)(d+10)) = htons(p->Nr); /* update window recd */
(kgdb) p m
$1 = (struct mbuf *) 0xc0752280

-- 
============================================================================
|David Gilbert, Velocet Communications.       | Two things can only be     |
|Mail:       dgilbert@velocet.net             |  equal if and only if they |
|http://www.velocet.net/~dgilbert             |   are precisely opposite.  |
=========================================================GLO================


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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