Issues with nullconsole in FreeBSD 6.0-p6

Jonas Bülow jonas.bulow at servicefactory.se
Mon Apr 3 22:24:47 UTC 2006


I'm experiencing a really strange problem using nullconsole in FreeBSD
6.0-p6. Briefly, what happens is that the use of nullconsole affects
the behavior of the OS negatively, very negatively.

There are two different setups with different kernel
configurations. They both have console set to nullconsole in
loader.conf.

In the first setup the machine reboots spontaneously somewhere during
boot without leaving a hint of the reason.

In the other setup there is a fsck process (fsck_4.2bsd) crashing with
signal 8 (floating point exception) during boot. The fsck is run on an
auxiliary disk during startup.

Both these problems goes away if console is set to either vidconsole
or comconsole in loader.conf.

Adding DDB to the kernel configuration prevents to machine from
continuously rebooting in the first setup. Instead, it silently halts
somewhere in the boot process. Not easy telling where. It's seems to
be somewhere late in the process. Probably when running rc.d scripts
by observing the time before reboot compared to when using vidconsole
or comconsole.

I've tried to debug the problem. I've not figured out how to remotely
debug a kernel when using nullconsole. The escape to debugger hot keys
(Ctrl+Alt+Esc or Ctrl+SysReq) does not work when using
nullconsole. Therefor it is not possible to switch to remote mode. Can
DDB be force to go directly into remote mode?

I really understand it is impossible to give a simple answer or
solution to my problems described above. Well, if someone knows a
solution I wouldn't mind sharing it. What I really would like help
with is some input on how to debug this further. What to look for,
things to try etc.

A condensed form (comments removed) of the kernel configuration for
the first setup (the one that reboots during boot when nullconsole is
set in loader.conf) is inserted below:

machine       i386
cpu           I586_CPU
cpu           I686_CPU
ident         MYKERNEL
options       SCHED_4BSD              #4BSD scheduler
options       INET                    #InterNETworking
options       FFS                     #Berkeley Fast Filesystem
options       SOFTUPDATES             #Enable FFS soft updates support
options       UFS_DIRHASH             # Improve performance on big 
directories
options       MD_ROOT                 #MD is a potential root device
options       MD_ROOT_SIZE=2048
options       CD9660                  #ISO 9660 Filesystem
options       COMPAT_43                 # Compatible with BSD 4.3 [KEEP 
THIS!]
options       KTRACE                  #ktrace(1) support
options       SYSVSHM                 #SYSV-style shared memory
options       SYSVMSG                 #SYSV-style message queues
options       SYSVSEM                 #SYSV-style semaphores
options       _KPOSIX_PRIORITY_SCHEDULING
options       KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options       ADAPTIVE_GIANT          # Giant mutex is adaptive.
device        acpi                 # ACPI
device        apic                    # I/O APIC
device        eisa
device        pci
device        ata
device        atadisk                 # ATA disk drives
device        ataraid
device        atapicd
options       ATA_STATIC_ID           #Static device numbering
device          ahb             # EISA AHA1742 family
device          ahc             # AHA2940 and onboard AIC7xxx devices
device          ahd             # AHA39320/29320 and onboard AIC79xx devices
device          amd             # AMD 53C974 (Tekram DC-390(T))
device          isp             # Qlogic family
device          mpt             # LSI-Logic MPT-Fusion
device          sym             # NCR/Symbios Logic (newer chipsets + 
those of `ncr')
device          trm             # Tekram DC395U/UW/F DC315U adapters
device          adv             # Advansys SCSI adapters
device          adw             # Advansys wide SCSI adapters
device          aha             # Adaptec 154x SCSI adapters
device          aic             # Adaptec 15[012]x SCSI adapters, 
AIC-6[23]60.
device          bt              # Buslogic/Mylex MultiMaster SCSI adapters
device          ncv             # NCR 53C500
device          nsp             # Workbit Ninja SCSI-3
device          stg             # TMC 18C30/18C50
device          scbus           # SCSI bus (required for SCSI)
device          ch              # SCSI media changers
device          da              # Direct Access (disks)
device          cd              # CD
device          pass            # Passthrough device (direct SCSI access)
device          amr             # AMI MegaRAID
device          ciss            # Compaq Smart RAID 5*
device          ida             # Compaq Smart RAID
device          atkbdc          # AT keyboard controller
device          atkbd           # AT keyboard
device        vga
device        sc
device        sio
device          loop            # Network loopback
device          random          # Entropy device
device          ether           # Ethernet support
device          pty             # Pseudo-ttys (telnet etc)
device          md              # Memory "disks"
device          bpf             # Berkeley packet filter
device          uhci            # UHCI PCI->USB interface
device          ohci            # OHCI PCI->USB interface
device          ehci            # EHCI PCI->USB interface (USB 2.0)
device          usb             # USB Bus (required)
device          ugen            # Generic
device          uhid            # "Human Interface Devices"
device          ukbd            # Keyboard
device          umass           # Disks/Mass storage - Requires scbus and da
options         SCSI_NO_OP_STRINGS
options         SCSI_NO_SENSE_STRINGS

Here is device.hints: (I've changed sio.0.flags to 0x90 trying to do 
remote kernel debug)

hint.fdc.0.at="isa"
hint.fdc.0.port="0x3F0"
hint.fdc.0.irq="6"
hint.fdc.0.drq="2"
hint.fd.0.at="fdc0"
hint.fd.0.drive="0"
hint.fd.1.at="fdc0"
hint.fd.1.drive="1"
hint.ata.0.at="isa"
hint.ata.0.port="0x1F0"
hint.ata.0.irq="14"
hint.ata.1.at="isa"
hint.ata.1.port="0x170"
hint.ata.1.irq="15"
hint.adv.0.at="isa"
hint.adv.0.disabled="1"
hint.bt.0.at="isa"
hint.bt.0.disabled="1"
hint.aha.0.at="isa"
hint.aha.0.disabled="1"
hint.aic.0.at="isa"
hint.aic.0.disabled="1"
hint.atkbdc.0.at="isa"
hint.atkbdc.0.port="0x060"
hint.atkbd.0.at="atkbdc"
hint.atkbd.0.irq="1"
hint.psm.0.at="atkbdc"
hint.psm.0.irq="12"
hint.vga.0.at="isa"
hint.sc.0.at="isa"
hint.sc.0.flags="0x100"
hint.vt.0.at="isa"
hint.vt.0.disabled="1"
hint.apm.0.disabled="1"
hint.apm.0.flags="0x20"
hint.sio.0.at="isa"
hint.sio.0.port="0x3F8"
hint.sio.0.flags="0x90"
hint.sio.0.irq="4"
hint.sio.1.at="isa"
hint.sio.1.port="0x2F8"
hint.sio.1.irq="3"
hint.sio.2.at="isa"
hint.sio.2.disabled="1"
hint.sio.2.port="0x3E8"
hint.sio.2.irq="5"
hint.sio.3.at="isa"
hint.sio.3.disabled="1"
hint.sio.3.port="0x2E8"
hint.sio.3.irq="9"
hint.ppc.0.at="isa"
hint.ppc.0.irq="7"
hint.ed.0.at="isa"
hint.ed.0.disabled="1"
hint.ed.0.port="0x280"
hint.ed.0.irq="10"
hint.ed.0.maddr="0xd8000"
hint.cs.0.at="isa"
hint.cs.0.disabled="1"
hint.cs.0.port="0x300"
hint.sn.0.at="isa"
hint.sn.0.disabled="1"
hint.sn.0.port="0x300"
hint.sn.0.irq="10"
hint.ie.0.at="isa"
hint.ie.0.disabled="1"
hint.ie.0.port="0x300"
hint.ie.0.irq="10"
hint.ie.0.maddr="0xd0000"
hint.fe.0.at="isa"
hint.fe.0.disabled="1"
hint.fe.0.port="0x300"
hint.lnc.0.at="isa"
hint.lnc.0.disabled="1"
hint.lnc.0.port="0x280"
hint.lnc.0.irq="10"
hint.lnc.0.drq="0"

loader.conf looks like:

console="nullconsole"
beastie_disable="YES"
autoboot_delay="0"
kern.maxfiles=2000


More information about the freebsd-stable mailing list