Date: Thu, 16 Jun 2005 17:49:24 +0200 From: "Norbert Koch" <NKoch@demig.de> To: "Julian Elischer" <julian@elischer.org> Cc: "Freebsd-Hackers@Freebsd.Org" <freebsd-hackers@freebsd.org> Subject: RE: kernel panic in usb0; was: RE: using vkbd device Message-ID: <000001c5728a$f854fda0$4801a8c0@ws-ew-3.W2KDEMIG> In-Reply-To: <42B084DA.7040702@elischer.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
> >In gdb "bt" only shows two entries. The function where the panic
> >occurred and 0x0!
> >
> >
>
> that is normal
> you don't want to jump into gdb that soon.
> there is hardly anything set up.
>
> use the sysctl to enter gdb later.
>
> >BTW, after boot -gd, when gdb attaches I have a kernel panic too.
> >But I can just enter "continue" and the kernel continues booting.
> >Is that ok?
> >
> >
>
> what do you mean "panic"?
> I never use -gd, just -g
>
> then hitting ^ALT-ESC or using th esysctl makes me enter the debugger
> when I need to.
>
>
>
Ok,
may be, I am doing something stupidly wrong.
1. Added DIAGNOSTIC, USB_DEBUG, INVARIANT_SUPPORT, INVARIANTS to my
configuration
and installed a new debug kernel.
2. Booted the target to the loader prompt.
"unload kernel"
"load kerneld"
"boot -gd"
3. "gdb -k kernel.debug" & "target remote /dev/cuaa0" on my workstation.
4. Arrived in Debugger() and pressed "c".
5. The kernel booted. I saw the usual boot messages.
After seeing "IP filtering initialized...", I saw:
"panic: usb_cold_explore: busses to explore when !cold".
6. Found, that cold is indeed 0.
7. Booted again up to 4. and set a breakpoint at usb_cold_explore().
Pressed "c" and got (from gdb):
Continuing.
Cannot insert breakpoint 1:
Cannot access memory at address 0xc01e5a37.
At the same time the target console showed twice:
"Fatal trap 12: page fault..."
"..."
"supervisor read, page not present"
"..."
So, do I have something very wrong in my kernel configuration? (See attached
file)
What about HZ=400 and NO_SWAPPING? Any known problems?
Can't I set a breakpoint at that early stage of booting?
Thanks for any help,
Norbert
[-- Attachment #2 --]
#
# MOPS -- Kernel configuration file for FreeBSD/i386
# $Header: /usr/local/cvs/sys/i386/conf/MOPSD,v 1.7 2005/06/07 11:57:35 nk Exp $
#
machine i386
cpu I586_CPU
cpu I686_CPU
ident MOPS
maxusers 0
options HZ=400
options DEVICE_POLLING
##options SIGNAL_IOCHK
options DIAGNOSTIC
options INVARIANT_SUPPORT
options INVARIANTS
options USB_DEBUG
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
makeoptions MODULES_OVERRIDE="splash"
options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
options FFS_ROOT #FFS usable as root device [keep this!]
options SOFTUPDATES #Enable FFS soft updates support
options UFS_DIRHASH #Improve performance on big directories
options MFS #Memory Filesystem
options MD_ROOT #MD is a potential root device
options PROCFS #Process filesystem
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
options SCSI_DELAY=1000 #Delay (in ms) before probing SCSI
options UCONSOLE #Allow users to grab the console
options KTRACE #ktrace(1) support
options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options P1003_1B #Posix P1003_1B real-time extensions
options _KPOSIX_PRIORITY_SCHEDULING
options ICMP_BANDLIM #Rate limit bad replies
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options SMBFS
options NETSMB #SMB/CIFS requester
options NETSMBCRYPTO #encrypted password support for SMB
options LIBMCHAIN #mbuf management library
options LIBICONV
options DDB
##options DEBUG_LOCKS
##options KBDIO_DEBUG
##options SC_DEBUG_LEVEL=5
#options NSFBUFS=8
options NO_SWAPPING
options PANIC_REBOOT_WAIT_TIME=60
options IPFIREWALL #firewall
options IPFIREWALL_DEFAULT_TO_ACCEPT
device isa
device pci
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
options ATA_STATIC_ID #Static device numbering
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc0 at isa? port IO_KBD
device atkbd0 at atkbdc? irq 1 flags 0x2
##device psm0 at atkbdc? irq 12
options ATKBD_DFLT_KEYMAP # specify the built-in keymap
makeoptions ATKBD_DFLT_KEYMAP="german.iso"
device vga0 at isa?
##options VESA
# splash screen/screen saver
pseudo-device splash
# syscons is the default console driver, resembling an SCO console
##device sc0 at isa? flags 0x100
device sc0 at isa? flags 0x0
options SC_DISABLE_REBOOT # disable reboot key sequence
#options SC_DISABLE_DDBKEY # disable `debug' key
options SC_KERNEL_CONS_ATTR="(FG_GREEN|BG_BLACK)"
options SC_KERNEL_CONS_REV_ATTR="(FG_BLACK|BG_LIGHTGREY)"
##options SC_PIXEL_MODE # add support for the raster text mode
##options SC_HISTORY_SIZE=1000
device agp # support several AGP chipsets
# Floating point support - do not disable.
device npx0 at nexus? port IO_NPX irq 13
options COM_MULTIPORT
device sio0 at isa? port IO_COM1 flags 0x90 irq 4
device sio1 at isa? port IO_COM2 irq 3
device sio2 at isa? port IO_COM3 flags 0x305 # \ shared
device sio3 at isa? port IO_COM4 flags 0x305 irq 10 # / irq group
device sio4 at isa? port 0x8100 flags 0x505 # \ shared
device sio5 at isa? port 0x8108 flags 0x505 irq 9 # / irq group
# Parallel port
device ppc0 at isa? irq 7
device ppbus # Parallel port bus (required)
device lpt # Printer
device ppi
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
# Pseudo devices - the number indicates how many units to allocate.
pseudo-device loop # Network loopback
pseudo-device ether # Ethernet support
pseudo-device sl 1 # Kernel SLIP
pseudo-device ppp 1 # Kernel PPP
pseudo-device tun # Packet tunnel.
pseudo-device pty # Pseudo-ttys (telnet etc)
pseudo-device md # Memory "disks"
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device bpf #Berkeley packet filter
# USB support
device ohci # OHCI PCI->USB interface
device usb # USB Bus (required)
device ugen # Generic
device uhid # "Human Interface Devices"
device ukbd # Keyboard
device ulpt # Printer
options UKBD_DFLT_KEYMAP # specify the built-in keymap
makeoptions UKBD_DFLT_KEYMAP="german.iso"
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c5728a$f854fda0$4801a8c0>
