Kernel/World Upgrade causes Hang

Damien Fleuriot ml at my.gd
Tue Dec 28 17:58:42 UTC 2010


On 12/28/10 5:48 PM, Troy wrote:
> The generic kernel worked.  What's the easiest way to try and figure out
> which line is causing the hang in my custom kernel?  When it hangs it
> gives me nothing other than what I put in the initial email.  I've been
> using this custom kernel config for years on this server.
> 
> 

First, remove the device drivers which you aren't using (ISA NICs, NICs
you don't use, SCSI if you use SATA, firewire...)

Get this purified kernel working, then start adding your custom options
little by little.

I'm afraid there's no magic way of doing it that I know of :)


By the way I am unsure what your whole bit about smbfs is about.

Want users to be able to call mount_smbfs ?
I would sooner give them sudo privileges for this very specific command,
than bother hacking and patching the kernel in uncertain ways.


I would also remove unnecessary SCSI support as well as mass storage
USB, USB printer, USB NICs...

Just get shot of everything you don't use to be honest ;)



> 
> On 12/28/2010 4:13 AM, Damien Fleuriot wrote:
>> Well, I would suggest you try this:
>>
>>
>> cd /usr/src
>>
>> make buildkernel KERNCONF=GENERIC
>> make installkernel KERNCONF=GENERIC
>>
>> cd /boot
>> mv kernel test
>> mv kernel.old kernel
>> nextboot -k test
>>
>>
>> Then, you can reboot.
>>
>> This will ensure you can boot a stock kernel just fine.
>>
>> If you can, obviously there is something wrong with your custom kernel
>> and you should start from a fresh GENERIC kernel and remove devices and
>> drivers little by little.
>>
>>
>> On 12/28/10 2:05 AM, Troy wrote:
>>> Sorry.
>>>
>>> I am on the RELENG_8 tree and I believe it was building 8.2pre.  I did
>>> the build about 4 days ago.  I am building a custom kernel.  Yes I
>>> definitely built the world before the kernel and it worked. I did not
>>> use -J anything.   There is no boot message, it just hangs with what I
>>> wrote below.  Below is the kernel config I'm using.
>>>
>>> machine         amd64
>>> cpu             HAMMER
>>> ident           servername-removed
>>>
>>> # To statically compile in device wiring instead of /boot/device.hints
>>> #hints          "GENERIC.hints"         # Default places to look for
>>> devices.
>>>
>>> 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         SCTP                    # Stream Control Transmission
>>> Protocol
>>> 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         NFS_ROOT                # NFS usable as /, requires
>>> NFSCLIENT
>>> options         NTFS                    # NT File System
>>> 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_IA32             # Compatible with i386 binaries
>>> options         COMPAT_43               # Needed by COMPAT_LINUX32
>>> 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_LINUX32          # Compatible with i386 linux
>>> binaries
>>> 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         INCLUDE_CONFIG_FILE     # Include this file in kernel
>>> options         IPSTEALTH
>>> options INVARIANTS
>>> options INVARIANT_SUPPORT
>>>
>>> # Make an SMP-capable kernel by default
>>>   options        SMP                     # Symmetric MultiProcessor
>>> Kernel
>>>
>>> # CPU frequency control
>>>   device         cpufreq
>>>
>>> # For SMBFS - mount_smbfs to work by users
>>> options SMBFS                           # SMB/CIFS filesystem
>>> options NETSMB                  # SMB/CIFS requester
>>> options LIBMCHAIN               # MBUF management library
>>> options LIBICONV                        # Kernel side iconv library
>>>
>>> # Workarounds for some known-to-be-broken chipsets (nVidia
>>> nForce3-Pro150)
>>> device          atpic                   # 8259A compatability
>>>
>>> # Linux 32-bit ABI support
>>> options         LINPROCFS               # Cannot be a module yet.
>>>
>>> # Bus support.
>>> device          acpi
>>> device          pci
>>>
>>> # Floppy drives
>>> device          fdc
>>>
>>> # ATA and ATAPI devices
>>> device          ata
>>> device          atadisk         # ATA disk drives
>>> device          atapicd         # ATAPI CDROM drives
>>> device          atapifd         # ATAPI floppy drives
>>> options         ATA_STATIC_ID   # Static device numbering
>>>
>>> # SCSI Controllers
>>> device          ahc             # AHA2940 and onboard AIC7xxx devices
>>> options         AHC_REG_PRETTY_PRINT    # Print register bitfields in
>>> debug
>>>                                          # output.  Adds ~128k to
>>> driver.
>>> device          ahd             # AHA39320/29320 and onboard AIC79xx
>>> devices
>>> options         AHD_REG_PRETTY_PRINT    # Print register bitfields in
>>> debug
>>>                                          # output.  Adds ~215k to
>>> driver.
>>> 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          aic             # Adaptec 15[012]x SCSI adapters,
>>> AIC-6[23]60.
>>> device          bt                      # Buslogic/Mylex MultiMaster
>>> SCSI adapters
>>>
>>>
>>> # SCSI peripherals
>>> device          scbus           # SCSI bus (required for SCSI)
>>> device          ch                      # SCSI media changers
>>> device          da                      # Direct Access (disks)
>>> device          sa                      # Sequential Access (tape etc)
>>> device          cd                      # CD
>>> device          pass            # Passthrough device (direct SCSI
>>> access)
>>> device          ses             # SCSI Environmental Services (and
>>> SAF-TE)
>>>
>>> # RAID controllers interfaced to the SCSI subsystem
>>> device          twa             # 3ware 9000 series PATA/SATA RAID
>>>
>>> # 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
>>> options     VGA_WIDTH90
>>> options     SC_PIXEL_MODE
>>>
>>> # 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
>>>
>>> # Parallel port
>>> device          ppc
>>> device          ppbus           # Parallel port bus (required)
>>> device          lpt             # Printer
>>> device          ppi             # Parallel port interface device
>>>
>>>
>>> # 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          bge             # Broadcom BCM570xx Gigabit Ethernet
>>>
>>> # Pseudo devices.
>>> device          loop            # Network loopback
>>> device          random          # Entropy device
>>> device          ether           # Ethernet support
>>> device          vlan            # 802.1Q VLAN support
>>> device          snp             # Snoop support
>>> device          tun             # Packet tunnel.
>>> device          pty             # Pseudo-ttys (telnet etc)
>>> 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 Ethernet, requires miibus
>>> device          aue             # ADMtek USB Ethernet
>>> device          axe             # ASIX Electronics USB Ethernet
>>> device          cdce            # Generic USB over Ethernet
>>> device          cue             # CATC USB Ethernet
>>> device          kue             # Kawasaki LSI USB Ethernet
>>> device          rue             # RealTek RTL8150 USB Ethernet
>>> device          udav            # Davicom DM9601E USB
>>>
>>>
>>>
>>>
>>> On 12/27/2010 6:24 PM, Damien Fleuriot wrote:
>>>> Hey Troy,
>>>>
>>>>
>>>> I can't speak for the rest of the list but I think we're missing a bit
>>>> of information here.
>>>>
>>>> What are you trying to build and boot, 8.1, 8.2pre ?
>>>>
>>>> Are you building a GENERIC kernel ? I notice you're currently using a
>>>> custom one.
>>>>
>>>> If you're not, I would suggest trying GENERIC first.
>>>>
>>>> You might want to post your whole boot message if it can be recovered.
>>>>
>>>>
>>>>
>>>> Also and in case you don't know, you may quickly test your kernel like
>>>> so:
>>>> nextboot -k yourkernelhere
>>>>
>>>> Next reboot, the host will try yourkernelhere, and on the reboot after
>>>> that, revert to your regular kernel.
>>>>
>>>>
>>>> Other than that, quick things to check:
>>>>
>>>> 1/ built world before kernel
>>>>
>>>> 2/ built kernel SINGLE THREADED (no -j X to speed it up, which you can
>>>> do for the world)
>>>>
>>>> 3/ tracked the *correct* version in the cvsup file (I've had this case
>>>> where I was running fbsd8 zfs boot, and was building a 7.x kernel by
>>>> mistake cause I was tracking releng7 -.- )
>>>>
>>>> 4/ retrieved and managed to boot a stock GENERIC kernel from 8.1 or
>>>> 8.2,
>>>> whichever you're tracking
>>>>
>>>>
>>>>
>>>> On 12/27/10 11:42 PM, Troy wrote:
>>>>> I recently rebuilt the world and kernel and everything built just fine
>>>>> and when I went to boot into the new kernel, it hangs. I had to revert
>>>>> back to my previous kernel.
>>>>>
>>>>> Currently I'm running:
>>>>> FreeBSD server.domain.net 8.0-STABLE FreeBSD 8.0-STABLE #1: Sat Jan 23
>>>>> 20:44:06 CST 2010 root at server.domain.net:/usr/obj/usr/src/sys/server
>>>>> amd64
>>>>>
>>>>> When it hangs upon boot-up it simply stops here. I don't know how I
>>>>> can
>>>>> figure out what is causing the root of the hang. I'd really like to
>>>>> get
>>>>> this machine upgraded.
>>>>>
>>>>> Ppc0 cannot reserve I/O port range
>>>>> PowerNow0<Cool ‘N’ Quiet K8>   on cpu0
>>>>> Device_attach: PowerNow0 attach return 6
>>>>> PowerNow0<Cool ‘N’ Quiet K8>   on cpu1
>>>>> Device_attach: PowerNow0 attach return 6
>>>>> PowerNow1<Cool ‘N’ Quiet K8>   on cpu0
>>>>> Device_attach: PowerNow0 attach return 6
>>>>> PowerNow1<Cool ‘N’ Quiet K8>   on cpu1
>>>>> Device_attach: PowerNow0 attach return 6
>>>>> Time Counters Tick every 1.000 msec
>>>>> <<<hang>>>
>>>>>
>>>>> Any help is greatly appreciated.
>>>>>
>>>>> -Troy
>>>>>
>>>>> _______________________________________________
>>>>> freebsd-stable at freebsd.org mailing list
>>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>>>> To unsubscribe, send any mail to
>>>>> "freebsd-stable-unsubscribe at freebsd.org"
>>>> _______________________________________________
>>>> freebsd-stable at freebsd.org mailing list
>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>>> To unsubscribe, send any mail to
>>>> "freebsd-stable-unsubscribe at freebsd.org"


More information about the freebsd-stable mailing list