Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Mar 2001 02:51:21 -0500
From:      "Ed Wynn" <edwynn42@hotmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: D-Link problem
Message-ID:  <F116VApwOLZCHusMjQH00009f19@hotmail.com>

next in thread | raw e-mail | index | archive | help
>Well, you're on the right track.  More than likely the D-Link card has some
>flags that aren't being properly set during the driver init.
>
>In the meantime, it would be best if you built a debug kernel and enabled
>crashdumps.  This would give you (and us) more details on where (and why)
>this thing is crashing.

Okay, I've managed to get the debug kernel built and save the core file.  
I'll include the output of some basic debugging below.  If there's anything 
else that would be helpful, let me know.  The D-Link driver disk includes C 
source for a Linux driver, so when the problem gets narrowed down, I or 
someone more familiar with the code might be able to use this to determine 
the correct settings.

First, though, I should have included this before, but I didn't notice it 
until much later.  Here's an excerpt from the boot messages that gets shown 
before the crash.  During a GENERIC boot:

pci0: <unknown card> (vendor=0x1186, dev=0x1300) at 11.0 irq 11

During my customized boot (I think this is right, but had to write it down 
and type it in, so there may be minor errors) this turns into:

rl0: <D-Link 8139 10/100BaseTX> port 0xd800-0xd8ff
  mem 0xe5800000-0xe58000ff irq 11 at device 11.0 on pci0
rl0: Ethernet address xx:xx:xx:xx:xx:xx
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0: no media present

It then proceeds through the normal boot sequence to the crash.  Here's the 
gdb log I threatened above.  Warning: it's long.

GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd".
(kgdb) symbol-file /sys/compile/MARSA/kernel.debug
Reading symbols from /sys/compile/MARSA/kernel.debug...done.
(kgdb) exec-file /var/crash/kernel.2
(kgdb) core-file /var/crash/vmcore.2
IdlePTD 4661248
initial pcb at 3b56c0
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0x8
fault code		= supervisor read, page not present
instruction pointer	= 0x8:0xc0458007
stack pointer	        = 0x10:0xc4110d1c
frame pointer	        = 0x10:0xc4110d28
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 56 (ifconfig)
interrupt mask		= net tty
trap number		= 12
panic: page fault

syncing disks... 11 11 4
done
Uptime: 3s

dumping to dev #ad/0x20001, offset 196608
dump ata0: resetting devices .. done
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 
5 4 3 2 1
---
#0  dumpsys () at ../../kern/kern_shutdown.c:469
469		if (dumping++) {

(kgdb) bt
#0  dumpsys () at ../../kern/kern_shutdown.c:469
#1  0xc01a5aeb in boot (howto=256) at ../../kern/kern_shutdown.c:309
#2  0xc01a5e68 in poweroff_wait (junk=0xc037910f, howto=-1007868864)
    at ../../kern/kern_shutdown.c:556
#3  0xc0314fb9 in trap_fatal (frame=0xc4110cdc, eva=8)
    at ../../i386/i386/trap.c:951
#4  0xc0314c91 in trap_pfault (frame=0xc4110cdc, usermode=0, eva=8)
    at ../../i386/i386/trap.c:844
#5  0xc031484b in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
      tf_edi = -1061251648, tf_esi = 0, tf_ebp = -1005515480,
      tf_isp = -1005515512, tf_ebx = -1061251712, tf_edx = -1061251648,
      tf_ecx = 0, tf_eax = -1069187080, tf_trapno = 12, tf_err = 0,
      tf_eip = -1069187065, tf_cs = 8, tf_eflags = 66178,
      tf_esp = -1061251712, tf_ss = -1061251648}) at 
../../i386/i386/trap.c:443
#6  0xc0458007 in ?? ()
#7  0xc01739b1 in mii_mediachg (mii=0xc0be95c0) at ../../dev/mii/mii.c:293
#8  0xc045061d in ?? ()
#9  0xc01e6fda in ether_ioctl (ifp=0xc0becc00, command=-2145359604,
    data=0xc0c2cb80 "ÈËÂÀØËÂÀèËÂÀ") at ../../net/if_ethersubr.c:711
#10 0xc045073f in ?? ()
#11 0xc01f4afa in in_ifinit (ifp=0xc0becc00, ia=0xc0c2cb80, sin=0xc4110ebc,
    scrub=0) at ../../netinet/in.c:660
#12 0xc01f4675 in in_control (so=0xc3ce6f00, cmd=2151704858,
    data=0xc4110eac "rl0", ifp=0xc0becc00, p=0xc3ed2440)
    at ../../netinet/in.c:412
#13 0xc01e6113 in ifioctl (so=0xc3ce6f00, cmd=2151704858,
    data=0xc4110eac "rl0", p=0xc3ed2440) at ../../net/if.c:972
#14 0xc01b6bde in soo_ioctl (fp=0xc0c3fdc0, cmd=2151704858,
    data=0xc4110eac "rl0", p=0xc3ed2440) at ../../kern/sys_socket.c:141
#15 0xc01b3c16 in ioctl (p=0xc3ed2440, uap=0xc4110f80) at 
../../sys/file.h:174
#16 0xc0315265 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
      tf_edi = 0, tf_esi = -1077936720, tf_ebp = -1077936956,
      tf_isp = -1005514796, tf_ebx = 134668824, tf_edx = 3,
      tf_ecx = 134748144, tf_eax = 54, tf_trapno = 12, tf_err = 2,
      tf_eip = 134529396, tf_cs = 31, tf_eflags = 663, tf_esp = -1077937096,
      tf_ss = 47}) at ../../i386/i386/trap.c:1150
#17 0xc0306da5 in Xint0x80_syscall ()
#18 0x80486e1 in ?? ()
#19 0x8048135 in ?? ()

(kgdb) up 5
#5  0xc031484b in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
      tf_edi = -1061251648, tf_esi = 0, tf_ebp = -1005515480,
      tf_isp = -1005515512, tf_ebx = -1061251712, tf_edx = -1061251648,
      tf_ecx = 0, tf_eax = -1069187080, tf_trapno = 12, tf_err = 0,
      tf_eip = -1069187065, tf_cs = 8, tf_eflags = 66178,
      tf_esp = -1061251712, tf_ss = -1061251648}) at 
../../i386/i386/trap.c:443
443				(void) trap_pfault(&frame, FALSE, eva);

(kgdb) info frame
Stack level 5, frame at 0xc4110cd4:
eip = 0xc031484b in trap (../../i386/i386/trap.c:443); saved eip 0xc0458007
called by frame at 0xc4110d28, caller of frame at 0xc4110c90
source language c.
Arglist at 0xc4110cd4, args: frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
      tf_edi = -1061251648, tf_esi = 0, tf_ebp = -1005515480,
      tf_isp = -1005515512, tf_ebx = -1061251712, tf_edx = -1061251648,
      tf_ecx = 0, tf_eax = -1069187080, tf_trapno = 12, tf_err = 0,
      tf_eip = -1069187065, tf_cs = 8, tf_eflags = 66178,
      tf_esp = -1061251712, tf_ss = -1061251648}
Locals at 0xc4110cd4, Previous frame's sp is 0x0
Saved registers:
  ebx at 0xc4110ca4, ebp at 0xc4110cd4, esi at 0xc4110ca8, edi at 
0xc4110cac,
  eip at 0xc4110cd8

(kgdb) list
438	kernel_trap:
439			/* kernel trap */
440
441			switch (type) {
442			case T_PAGEFLT:			/* page fault */
443				(void) trap_pfault(&frame, FALSE, eva);
444				return;
445
446			case T_DNA:
447	#if NNPX > 0

(kgdb) up
#6  0xc0458007 in ?? ()

(kgdb) info frame
Stack level 6, frame at 0xc4110d28:
eip = 0xc0458007; saved eip 0xc01739b1
called by frame at 0xc4110d44, caller of frame at 0xc4110cd4
Arglist at 0xc4110d28, args:
Locals at 0xc4110d28, Previous frame's sp is 0x0
Saved registers:
  ebp at 0xc4110d28, eip at 0xc4110d2c

(kgdb) up
#7  0xc01739b1 in mii_mediachg (mii=0xc0be95c0) at ../../dev/mii/mii.c:293
293			rv = (*child->mii_service)(child, mii, MII_MEDIACHG);

(kgdb) info frame
Stack level 7, frame at 0xc4110d44:
eip = 0xc01739b1 in mii_mediachg (../../dev/mii/mii.c:293);
    saved eip 0xc045061d
called by frame at 0xc4110d68, caller of frame at 0xc4110d28
source language c.
Arglist at 0xc4110d44, args: mii=0xc0be95c0
Locals at 0xc4110d44, Previous frame's sp is 0x0
Saved registers:
  ebx at 0xc4110d3c, ebp at 0xc4110d44, esi at 0xc4110d40, eip at 0xc4110d48

(kgdb) list
288		mii->mii_media_status = 0;
289		mii->mii_media_active = IFM_NONE;
290
291		for (child = LIST_FIRST(&mii->mii_phys); child != NULL;
292		     child = LIST_NEXT(child, mii_list)) {
293			rv = (*child->mii_service)(child, mii, MII_MEDIACHG);
294			if (rv)
295				return (rv);
296		}
297		return (0);

(kgdb) print child
$1 = (struct mii_softc *) 0x67089a

(kgdb) print *child->mii_service
Cannot access memory at address 0x6708ae.

(kgdb) print mii
$2 = (struct mii_data *) 0x0

(kgdb) up
#8  0xc045061d in ?? ()

(kgdb) info frame
Stack level 8, frame at 0xc4110d68:
eip = 0xc045061d; saved eip 0xc01e6fda
called by frame at 0xc4110d80, caller of frame at 0xc4110d44
Arglist at 0xc4110d68, args:
Locals at 0xc4110d68, Previous frame's sp is 0x0
Saved registers:
  ebp at 0xc4110d68, eip at 0xc4110d6c

(kgdb) up
#9  0xc01e6fda in ether_ioctl (ifp=0xc0becc00, command=-2145359604,
    data=0xc0c2cb80 "ÈËÂÀØËÂÀèËÂÀ") at ../../net/if_ethersubr.c:711
711				ifp->if_init(ifp->if_softc);	/* before arpwhohas */

(kgdb) info frame
Stack level 9, frame at 0xc4110d80:
eip = 0xc01e6fda in ether_ioctl (../../net/if_ethersubr.c:711);
    saved eip 0xc045073f
called by frame at 0xc4110da8, caller of frame at 0xc4110d68
source language c.
Arglist at 0xc4110d80, args: ifp=0xc0becc00, command=-2145359604,
    data=0xc0c2cb80 "ÈËÂÀØËÂÀèËÂÀ"
Locals at 0xc4110d80, Previous frame's sp is 0x0
Saved registers:
  ebx at 0xc4110d74, ebp at 0xc4110d80, esi at 0xc4110d78, edi at 
0xc4110d7c,
  eip at 0xc4110d84

(kgdb) list
706			ifp->if_flags |= IFF_UP;
707
708			switch (ifa->ifa_addr->sa_family) {
709	#ifdef INET
710			case AF_INET:
711				ifp->if_init(ifp->if_softc);	/* before arpwhohas */
712				arp_ifinit(IFP2AC(ifp), ifa);
713				break;
714	#endif
715	#ifdef IPX


Greg Schmidt (writing from edwynn42@hotmail.com until this is working)
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




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