From owner-freebsd-current Tue Mar 28 10:43:36 2000 Delivered-To: freebsd-current@freebsd.org Received: from sabre.velocet.net (sabre.velocet.net [198.96.118.66]) by hub.freebsd.org (Postfix) with ESMTP id 3C6A437B5D6 for ; Tue, 28 Mar 2000 10:43:34 -0800 (PST) (envelope-from dgilbert@office.tor.velocet.net) Received: from office.tor.velocet.net (trooper.velocet.net [216.126.82.226]) by sabre.velocet.net (Postfix) with ESMTP id B7E0013801B; Tue, 28 Mar 2000 13:42:47 -0500 (EST) Received: (from dgilbert@localhost) by office.tor.velocet.net (8.9.3/8.9.3) id NAA20901; Tue, 28 Mar 2000 13:42:46 -0500 (EST) (envelope-from dgilbert) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14560.64806.608659.960815@trooper.velocet.net> Date: Tue, 28 Mar 2000 13:42:46 -0500 (EST) To: freebsd-current@freebsd.org, Archie Cobbs Subject: Kernel trace question (kernel doesn't compile _without_ -O) X-Mailer: VM 6.75 under 20.4 "Emerald" XEmacs Lucid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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