dumpdev must be manually set via loader(8) (potential regression?)?

Garrett Cooper yanefbsd at gmail.com
Sun Apr 25 03:54:32 UTC 2010


Hi GEOM folks,
    I recently tried reproducing a panic on 8-STABLE, and I noticed
that the following specifying dumpdev="AUTO" after the system had
booted up multiuser wasn't functional. dumpon(8) kept complaining that
"kernel dumps disabled" as the ioctl(2) call shortly before the printf
was failing:

    i = ioctl(fd, DIOCSKERNELDUMP, &u);

    Specifying an explicit dumpdev failed as well. kenv setting the
explicit dumpdev in multiuser mode failed. Booting up via the
bootloader specifying dumpdev="<blah>" worked though.
    So I did some digging and it turns out that geom defines what swap
devices are available for dumping, via g_dev_ioctl
(sys/geom/geom_dev.c:273 on 8-STABLE):

        case DIOCSKERNELDUMP:
                u = *((u_int *)data);
                if (!u) {
                        set_dumper(NULL);
                        error = 0;
                        break;
                }
                kd.offset = 0;
                kd.length = OFF_MAX;
                i = sizeof kd;
                error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd);
                if (!error)
                        dev->si_flags |= SI_DUMPDEV;
                break;

    So whatever facility sets the attribute `GEOM::kerneldump' doesn't
seem to be 100% correct. I know that this functionality worked at one
point in time, but the last time I've had to actually do this is ages
ago (5.x or 6.x days), so I'm not sure what changed and when to cause
this breakage.
    Finally, I tested to see whether or not it was an issue purely on
8-STABLE, and the same thing occurs on a slightly stale copy of
9-CURRENT. The machine configurations are listed below.
Thanks,
-Garrett

The Lenovo:

$ kldstat
Id Refs Address    Size     Name
 1   16 0xc0400000 833144   kernel
 2    1 0xc0c34000 1c0b4    snd_hda.ko
 3    2 0xc0c51000 56240    sound.ko
 4    1 0xc0ca8000 a0d1f4   nvidia.ko
 5    1 0xc6dad000 2000     blank_saver.ko
$ uname -a
FreeBSD garrcoop-fbsd.cisco.com 8.0-STABLE FreeBSD 8.0-STABLE #0
r207006: Wed Apr 21 13:18:44 PDT 2010
root at garrcoop-fbsd.cisco.com:/usr/obj/usr/src/sys/LAPPY_X86  i386

cpu             I686_CPU
ident           LAPPY_X86

makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols

options         INCLUDE_CONFIG_FILE
options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         MD_ROOT                 # MD is a potential root device
options         NFSCLIENT               # Network Filesystem Client
options         NFSLOCKD                # Network Lock Manager
options         NFS_ROOT                # NFS usable as /, requires NFSCLIENT
options         MSDOSFS                 # MSDOS Filesystem
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT           # GUID Partition Tables.
options         GEOM_LABEL              # Provides labelization
options         COMPAT_43TTY            # BSD 4.3 TTY compat (sgtty)
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
options         COMPAT_FREEBSD6         # Compatible with FreeBSD6
options         COMPAT_FREEBSD7         # Compatible with FreeBSD7
options         COMPAT_LINUX            # Linux-ulater..... blah.
                                       # PENGUINS -- THE OTHER WHITE MEAT!
options         SCSI_DELAY=5000         # Delay (in ms) before probing SCSI
options         KTRACE                  # ktrace(1) support
options         STACK                   # stack(9) support
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         P1003_1B_SEMAPHORES     # POSIX-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time
extensions
options         PRINTF_BUFR_SIZE=128    # Prevent printf output being
interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)
options         AUDIT                   # Security event auditing
options         MAC                     # TrustedBSD MAC Framework
options         FLOWTABLE               # per-cpu routing cache
#options        KDTRACE_HOOKS           # Kernel DTrace hooks

# Debugger junk.
options         DDB
options         KDB

# To make an SMP kernel, the next two lines are needed
options         SMP                     # Symmetric MultiProcessor Kernel
device          apic                    # I/O APIC

# CPU frequency control
device          cpufreq

# Bus support.
device          acpi
# IBM specific hooks for ACPI.
device          acpi_ibm
device          eisa
device          pci

# ATA and ATAPI devices
device          ata
device          atadisk         # ATA disk drives
device          ataraid         # ATA RAID drives
device          atapicd         # ATAPI CDROM drives
#device         atapifd         # ATAPI floppy drives
options         ATA_STATIC_ID   # Static device numbering

device          scbus
device          pass
device          cd
device          da
device          sa

device          iir

device          atkbdc
device          atkbd           # AT keyboard
device          psm             # PS/2 mouse

device          kbdmux          # keyboard multiplexer

device          vga             # VGA video card driver

device          splash          # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc

device          agp             # support several AGP chipsets

# Power management support (see NOTES for more options)
#device         apm
# Add suspend/resume support for the i8254.
device          pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
device          cbb             # cardbus (yenta) bridge
device          pccard          # PC Card (16-bit) bus
device          cardbus         # CardBus (32-bit) bus

# Serial (COM) ports
device          uart            # Generic UART driver

# Parallel port
device          ppc
device          ppbus           # Parallel port bus (required)
device          lpt             # Printer
device          ppi             # Parallel port interface device

# PCI Ethernet NICs.
device          em              # Intel PRO/1000 Gigabit Ethernet Family

# Wireless NIC cards
device          wlan            # 802.11 support
options         IEEE80211_DEBUG # enable debug msgs
options         IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
device          wlan_wep        # 802.11 WEP support
device          wlan_ccmp       # 802.11 CCMP support
device          wlan_tkip       # 802.11 TKIP support
device          wlan_amrr       # AMRR transmit rate control algorithm

# Intel wireless.
device iwn
device iwnfw

# Pseudo devices.
device          loop            # Network loopback
device          random          # Entropy device
device          ether           # Ethernet support
device          tun             # Packet tunnel.
device          pty             # BSD-style compatibility pseudo ttys
device          md              # Memory "disks"
device          firmware        # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf             # Berkeley packet filter

# USB support
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          uhid            # "Human Interface Devices"
device          ukbd            # Keyboard
device          ulpt            # Printer
device          umass           # Disks/Mass storage - Requires scbus and da
device          ums             # Mouse
# USB Serial devices
device          uark            # Technologies ARK3116 based serial adapters
device          ubsa            # Belkin F5U103 and compatible serial adapters
device          uftdi           # For FTDI usb serial adapters
device          uplcom          # Prolific PL-2303 serial adapters
device          uslcom          # SI Labs CP2101/CP2102 serial adapters

The server:

$ kldstat
Id Refs Address            Size     Name
 1   28 0xffffffff80100000 779f60   kernel
 2    3 0xffffffff8087a000 4b7f0    linux.ko
 3    1 0xffffffff808c6000 dbb8     if_re.ko
 4    1 0xffffffff808d4000 2bad8    kqemu.ko
 5    1 0xffffffff80900000 d451a0   nvidia.ko
 6    1 0xffffffff81812000 4dd0     linprocfs.ko
 7    1 0xffffffff81817000 2c2      blank_saver.ko
$ uname -a
FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r206173M:
Sat Apr 17 22:42:39 PDT 2010
root at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64

cpu             HAMMER
ident           BAYONETTA

makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols

options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         MD_ROOT                 # MD is a potential root device
options         NFSCLIENT               # Network Filesystem Client
options         NFSSERVER               # Network Filesystem Server
options         NFSLOCKD                # Network Lock Manager
options         MSDOSFS                 # MSDOS Filesystem
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT           # GUID Partition Tables.
options         GEOM_LABEL              # Provides labelization
options         COMPAT_FREEBSD32        # Compatible with i386 binaries
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
options         COMPAT_FREEBSD6         # Compatible with FreeBSD6
options         COMPAT_FREEBSD7         # Compatible with FreeBSD7
options         SCSI_DELAY=5000         # Delay (in ms) before probing SCSI
options         KTRACE                  # ktrace(1) support
options         STACK                   # stack(9) support
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         P1003_1B_SEMAPHORES     # POSIX-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time
extensions
options         PRINTF_BUFR_SIZE=128    # Prevent printf output being
interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)
options         AUDIT                   # Security event auditing

# Debugging for use in -current
options         KDB                     # Enable kernel debugger support.
options         DDB                     # Support DDB.

# Make an SMP-capable kernel by default
options         SMP                     # Symmetric MultiProcessor Kernel

# CPU frequency control
device          cpufreq

# Bus support.
device          acpi
device          pci

device          coretemp                # Intel temperature monitoring driver.
device          smbus
device          smb
device          ichsmb

# ATA and ATAPI devices
options         ATA_CAM
device          ahci
device          ataahci
device          atacore
device          ataintel
device          atapci

# SCSI Controllers
device          mfi             # LSI MegaRAID Firmware Interface driver.

# SCSI peripherals
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)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc          # AT keyboard controller
device          atkbd           # AT keyboard

device          kbdmux          # keyboard multiplexer

device          vga             # VGA video card driver

device          splash          # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc
device          agp             # support several AGP chipsets

# Serial (COM) ports
device          uart            # Generic UART driver

# 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

# Pseudo devices.
device          loop            # Network loopback
device          random          # Entropy device
device          ether           # Ethernet support
device          tun             # Packet tunnel.
device          pty             # BSD-style compatibility pseudo ttys
device          md              # Memory "disks"

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf             # Berkeley packet filter

# USB support
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          uhid            # "Human Interface Devices"
device          ukbd            # Keyboard
device          umass           # Disks/Mass storage - Requires scbus and da
device          ums             # Mouse

# FireWire support
device          firewire        # FireWire bus code
device          sbp             # SCSI over FireWire (Requires scbus and da)

device          sound
device          snd_emu10kx


More information about the freebsd-geom mailing list