Chapter 4 Troubleshooting

4.1. What do I do when I have bad blocks on my hard drive?
4.2. How come FreeBSD does not recognize my Bustek 742a EISA SCSI controller?
4.3. How come FreeBSD does not detect my HP Netserver's SCSI controller?
4.4. What is going on with my CMD640 IDE controller?
4.5. I keep seeing messages like ``ed1: timeout''. What do these messages mean?
4.6. Why do I get ``Incorrect super block'' when mounting a CDROM?
4.7. Why do I get ``Device not configured'' when mounting a CDROM?
4.8. Why do all non-English characters in filenames show up as ``?'' on my CDs when mounted in FreeBSD?
4.9. My printer is ridiculously slow. What can I do?
4.10. Why do my programs occasionally die with ``Signal 11'' errors?
4.11. Why does the screen go black and lose sync when I boot?
4.12. How come FreeBSD uses only 64 MB of RAM when my system has 128 MB of RAM installed?
4.13. Why does FreeBSD 2.0 panic with ``kmem_map too small!''?
4.14. Why do I get an error reading ``CMAP busy'' when rebooting with a new kernel?
4.15. What does the message ``ahc0: brkadrint, Illegal Host Access at seqaddr 0x0'' mean?
4.16. Why does Sendmail give me an error reading ````mail loops back to myself''''?
4.17. Why do full screen applications on remote machines misbehave?
4.18. Why does my machine print ``calcru: negative time...''?
4.19. I see ``pcm0 not found'' or my sound card is found as pcm1 but I have device pcm0 in my kernel config file. What is going on?
4.20. Why is my PnP card no longer found (or found as unknown) since upgrading to FreeBSD 4.x?
4.21. Why do I get the error ``nlist failed'' when running, for example, top or systat?
4.22. Why does it take so long to connect to my computer via ssh or telnet?
4.23. What does ``stray IRQ'' mean?
4.24. Why does ``file: table is full'' show up repeatedly in dmesg?
4.25. Why does the clock on my laptop keep incorrect time?
4.26. Why does FreeBSD's boot loader display ``Read error'' and stop after the BIOS screen?
4.27. Another operating system destroyed my Boot Manager. How do I get it back?

4.1. What do I do when I have bad blocks on my hard drive?

With SCSI drives, the drive should be capable of re-mapping these automatically. However, many drives are shipped with this feature disabled, for some mysterious reason...

To enable this, you will need to edit the first device page mode, which can be done on FreeBSD by giving the command (as root)

    # scsi -f /dev/rsd0c -m 1 -e -P 3

and changing the values of AWRE and ARRE from 0 to 1:-

    AWRE (Auto Write Reallocation Enbld):  1
    ARRE (Auto Read Reallocation Enbld):  1

The following paragraphs were submitted by Ted Mittelstaedt :

For IDE drives, any bad block is usually a sign of potential trouble. All modern IDE drives come with internal bad-block remapping turned on. All IDE hard drive manufacturers today offer extensive warranties and will replace drives with bad blocks on them.

If you still want to attempt to rescue an IDE drive with bad blocks, you can attempt to download the IDE drive manufacturer's IDE diagnostic program, and run this against the drive. Sometimes these programs can be set to force the drive electronics to rescan the drive for bad blocks and lock them out.

For ESDI, RLL and MFM drives, bad blocks are a normal part of the drive and are no sign of trouble, generally. With a PC, the disk drive controller card and BIOS handle the task of locking out bad sectors. This is fine for operating systems like DOS that use BIOS code to access the disk. However, FreeBSD's disk driver does not go through BIOS, therefore a mechanism, bad144, exists that replaces this functionality. bad144 only works with the wd driver (which means it is not supported in FreeBSD 4.0), it is NOT able to be used with SCSI. bad144 works by entering all bad sectors found into a special file.

One caveat with bad144 - the bad block special file is placed on the last track of the disk. As this file may possibly contain a listing for a bad sector that would occur near the beginning of the disk, where the /kernel file might be located, it therefore must be accessible to the bootstrap program that uses BIOS calls to read the kernel file. This means that the disk with bad144 used on it must not exceed 1024 cylinders, 16 heads, and 63 sectors. This places an effective limit of 500MB on a disk that is mapped with bad144.

To use bad144, simply set the ``Bad Block'' scanning to ON in the FreeBSD fdisk screen during the initial install. This works up through FreeBSD 2.2.7. The disk must have less than 1024 cylinders. It is generally recommended that the disk drive has been in operation for at least 4 hours prior to this to allow for thermal expansion and track wandering.

If the disk has more than 1024 cylinders (such as a large ESDI drive) the ESDI controller uses a special translation mode to make it work under DOS. The wd driver understands about these translation modes, IF you enter the ``translated'' geometry with the ``set geometry'' command in fdisk. You must also NOT use the ``dangerously dedicated'' mode of creating the FreeBSD partition, as this ignores the geometry. Also, even though fdisk will use your overridden geometry, it still knows the true size of the disk, and will attempt to create a too large FreeBSD partition. If the disk geometry is changed to the translated geometry, the partition MUST be manually created with the number of blocks.

A quick trick to use is to set up the large ESDI disk with the ESDI controller, boot it with a DOS disk and format it with a DOS partition. Then, boot the FreeBSD install and in the fdisk screen, read off and write down the blocksize and block numbers for the DOS partition. Then, reset the geometry to the same that DOS uses, delete the DOS partition, and create a ``cooperative'' FreeBSD partition using the blocksize you recorded earlier. Then, set the partition bootable and turn on bad block scanning. During the actual install, bad144 will run first, before any filesystems are created. (you can view this with an Alt-F2) If it has any trouble creating the badsector file, you have set too large a disk geometry - reboot the system and start all over again (including repartitioning and reformatting with DOS).

If remapping is enabled and you are seeing bad blocks, consider replacing the drive. The bad blocks will only get worse as time goes on.

4.2. How come FreeBSD does not recognize my Bustek 742a EISA SCSI controller?

This info is specific to the 742a but may also cover other Buslogic cards. (Bustek = Buslogic)

There are 2 general ``versions'' of the 742a card. They are hardware revisions A-G, and revisions H - onwards. The revision letter is located after the Assembly number on the edge of the card. The 742a has 2 ROM chips on it, one is the BIOS chip and the other is the Firmware chip. FreeBSD does not care what version of BIOS chip you have but it does care about what version of firmware chip. Buslogic will send upgrade ROMS out if you call their tech support dept. The BIOS and Firmware chips are shipped as a matched pair. You must have the most current Firmware ROM in your adapter card for your hardware revision.

The REV A-G cards can only accept BIOS/Firmware sets up to 2.41/2.21. The REV H- up cards can accept the most current BIOS/Firmware sets of 4.70/3.37. The difference between the firmware sets is that the 3.37 firmware supports ``round robin''

The Buslogic cards also have a serial number on them. If you have a old hardware revision card you can call the Buslogic RMA department and give them the serial number and attempt to exchange the card for a newer hardware revision. If the card is young enough they will do so.

FreeBSD 2.1 only supports Firmware revisions 2.21 onward. If you have a Firmware revision older than this your card will not be recognized as a Buslogic card. It may be recognized as an Adaptec 1540, however. The early Buslogic firmware contains an AHA1540 ``emulation'' mode. This is not a good thing for an EISA card, however.

If you have an old hardware revision card and you obtain the 2.21 firmware for it, you will need to check the position of jumper W1 to B-C, the default is A-B.

4.3. How come FreeBSD does not detect my HP Netserver's SCSI controller?

This is basically a known problem. The EISA on-board SCSI controller in the HP Netserver machines occupies EISA slot number 11, so all the ``true'' EISA slots are in front of it. Alas, the address space for EISA slots >= 10 collides with the address space assigned to PCI, and FreeBSD's auto-configuration currently cannot handle this situation very well.

So now, the best you can do is to pretend there is no address range clash :), by bumping the kernel option EISA_SLOTS to a value of 12. Configure and compile a kernel, as described in the Handbook entry on configuring the kernel.

Of course, this does present you with a chicken-and-egg problem when installing on such a machine. In order to work around this problem, a special hack is available inside UserConfig. Do not use the ``visual'' interface, but the plain command-line interface there. Simply type

    eisa 12
    quit

at the prompt, and install your system as usual. While it is recommended you compile and install a custom kernel anyway.

Hopefully, future versions will have a proper fix for this problem.

Note: You cannot use a dangerously dedicated disk with an HP Netserver. See this note for more info.

4.4. What is going on with my CMD640 IDE controller?

It is broken. It cannot handle commands on both channels simultaneously.

There's a workaround available now and it is enabled automatically if your system uses this chip. For the details refer to the manual page of the disk driver (man 4 wd).

If you are already running FreeBSD 2.2.1 or 2.2.2 with a CMD640 IDE controller and you want to use the second channel, build a new kernel with options "CMD640" enabled. This is the default for 2.2.5 and later.

4.5. I keep seeing messages like ``ed1: timeout''. What do these messages mean?

This is usually caused by an interrupt conflict (e.g., two boards using the same IRQ). FreeBSD prior to 2.0.5R used to be tolerant of this, and the network driver would still function in the presence of IRQ conflicts. However, with 2.0.5R and later, IRQ conflicts are no longer tolerated. Boot with the -c option and change the ed0/de0/... entry to match your board.

If you are using the BNC connector on your network card, you may also see device timeouts because of bad termination. To check this, attach a terminator directly to the NIC (with no cable) and see if the error messages go away.

Some NE2000 compatible cards will give this error if there is no link on the UTP port or if the cable is disconnected.

4.6. Why do I get ``Incorrect super block'' when mounting a CDROM?

You have to tell mount(8) the type of the device that you want to mount. By default, mount(8) will assume the filesystem is of type ufs. You want to mount a CDROM filesystem, and you do this by specifying the -t cd9660 option to mount(8). This does, of course, assume that the CDROM contains an ISO 9660 filesystem, which is what most CDROMs have. As of 1.1R, FreeBSD automatically understands the Rock Ridge (long filename) extensions as well.

As an example, if you want to mount the CDROM device, /dev/cd0c, under /mnt, you would execute:

    # mount -t cd9660 /dev/cd0c /mnt

Note that your device name (/dev/cd0c in this example) could be different, depending on the CDROM interface. Note that the -t cd9660 option just causes the mount_cd9660(8) command to be executed, and so the above example could be shortened to:

    # mount_cd9660 /dev/cd0c /mnt

4.7. Why do I get ``Device not configured'' when mounting a CDROM?

This generally means that there is no CDROM in the CDROM drive, or the drive is not visible on the bus. Feed the drive something, and/or check its master/slave status if it is IDE (ATAPI). It can take a couple of seconds for a CDROM drive to notice that it has been fed, so be patient.

Sometimes a SCSI CDROM may be missed because it had not enough time to answer the bus reset. If you have a SCSI CDROM please try to add the following symbol into your kernel configuration file and recompile.

    options "SCSI_DELAY=15"

4.8. Why do all non-English characters in filenames show up as ``?'' on my CDs when mounted in FreeBSD?

Most likely your CDROM uses the ``Joliet'' extension for storing information about files and directories. This extension specifies that all filenames are stored using Unicode two-byte characters. Currently, efforts are under way to introduce a generic Unicode interface into the FreeBSD kernel, but since that is not ready yet, the CD9660 driver does not have the ability to decode the characters in the filenames.

As a temporary solution, starting with FreeBSD 4.3, a special hook has been added into the CD9660 driver to allow the user to load an appropriate conversion table on the fly. Modules for some of the common encodings are available via the sysutils/cd9660_unicode port.

4.9. My printer is ridiculously slow. What can I do?

If it is parallel, and the only problem is that it is terribly slow, try setting your printer port into ``polled'' mode:

    # lptcontrol -p

Some newer HP printers are claimed not to work correctly in interrupt mode, apparently due to some (not yet exactly understood) timing problem.

4.10. Why do my programs occasionally die with ``Signal 11'' errors?

Signal 11 errors are caused when your process has attempted to access memory which the operating system has not granted it access to. If something like this is happening at seemingly random intervals then you need to start investigating things very carefully.

These problems can usually be attributed to either:

  1. If the problem is occurring only in a specific application that you are developing yourself it is probably a bug in your code.

  2. If it is a problem with part of the base FreeBSD system, it may also be buggy code, but more often than not these problems are found and fixed long before us general FAQ readers get to use these bits of code (that is what -current is for).

In particular, a dead giveaway that this is not a FreeBSD bug is if you see the problem when you are compiling a program, but the activity that the compiler is carrying out changes each time.

For example, suppose you are running ``make buildworld'', and the compile fails while trying to compile ls.c in to ls.o. If you then run ``make buildworld'' again, and the compile fails in the same place then this is a broken build -- try updating your sources and try again. If the compile fails elsewhere then this is almost certainly hardware.

What you should do:

In the first case you can use a debugger e.g. gdb to find the point in the program which is attempting to access a bogus address and then fix it.

In the second case you need to verify that it is not your hardware at fault.

Common causes of this include:

  1. Your hard disks might be overheating: Check the fans in your case are still working, as your disk (and perhaps other hardware might be overheating).

  2. The processor running is overheating: This might be because the processor has been overclocked, or the fan on the processor might have died. In either case you need to ensure that you have hardware running at what it is specified to run at, at least while trying to solve this problem. i.e. Clock it back to the default settings.

    If you are overclocking then note that it is far cheaper to have a slow system than a fried system that needs replacing! Also the wider community is not often sympathetic to problems on overclocked systems, whether you believe it is safe or not.

  3. Dodgy memory: If you have multiple memory SIMMS/DIMMS installed then pull them all out and try running the machine with each SIMM or DIMM individually and narrow the problem down to either the problematic DIMM/SIMM or perhaps even a combination.

  4. Over-optimistic Motherboard settings: In your BIOS settings, and some motherboard jumpers you have options to set various timings, mostly the defaults will be sufficient, but sometimes, setting the wait states on RAM too low, or setting the ``RAM Speed: Turbo'' option, or similar in the BIOS will cause strange behaviour. A possible idea is to set to BIOS defaults, but it might be worth noting down your settings first!

  5. Unclean or insufficient power to the motherboard. If you have any unused I/O boards, hard disks, or CDROMs in your system, try temporarily removing them or disconnecting the power cable from them, to see if your power supply can manage a smaller load. Or try another power supply, preferably one with a little more power (for instance, if your current power supply is rated at 250 Watts try one rated at 300 Watts).

You should also read the SIG11 FAQ (listed below) which has excellent explanations of all these problems, albeit from a Linux viewpoint. It also discusses how memory testing software or hardware can still pass faulty memory.

Finally, if none of this has helped it is possible that you have just found a bug in FreeBSD, and you should follow the instructions to send a problem report.

There is an extensive FAQ on this at the SIG11 problem FAQ

4.11. Why does the screen go black and lose sync when I boot?

This is a known problem with the ATI Mach 64 video card. The problem is that this card uses address 2e8, and the fourth serial port does too. Due to a bug (feature?) in the sio(4) driver it will touch this port even if you do not have the fourth serial port, and even if you disable sio3 (the fourth port) which normally uses this address.

Until the bug has been fixed, you can use this workaround:

  1. Enter -c at the boot prompt. (This will put the kernel into configuration mode).

  2. Disable sio0, sio1, sio2 and sio3 (all of them). This way the sio driver does not get activated -> no problems.

  3. Type exit to continue booting.

If you want to be able to use your serial ports, you will have to build a new kernel with the following modification: in /usr/src/sys/i386/isa/sio.c find the one occurrence of the string 0x2e8 and remove that string and the preceding comma (keep the trailing comma). Now follow the normal procedure of building a new kernel.

Even after applying these workarounds, you may still find that the X Window System does not work properly. If this is the case, make sure that the XFree86 version you are using is at least XFree86 3.3.3 or higher. This version and upwards has built-in support for the Mach64 cards and even a dedicated X server for those cards.

4.12. How come FreeBSD uses only 64 MB of RAM when my system has 128 MB of RAM installed?

Due to the manner in which FreeBSD gets the memory size from the BIOS, it can only detect 16 bits worth of Kbytes in size (65535 Kbytes = 64MB) (or less... some BIOSes peg the memory size to 16M). If you have more than 64MB, FreeBSD will attempt to detect it; however, the attempt may fail.

To work around this problem, you need to use the kernel option specified below. There is a way to get complete memory information from the BIOS, but we do not have room in the bootblocks to do it. Someday when lack of room in the bootblocks is fixed, we will use the extended BIOS functions to get the full memory information...but for now we are stuck with the kernel option.

options "MAXMEM=n"

Where n is your memory in Kilobytes. For a 128 MB machine, you would want to use 131072.

4.13. Why does FreeBSD 2.0 panic with ``kmem_map too small!''?

Note: The message may also be mb_map too small!



The panic indicates that the system ran out of virtual memory for network buffers (specifically, mbuf clusters). You can increase the amount of VM available for mbuf clusters by adding:

options "NMBCLUSTERS=n"

to your kernel config file, where n is a number in the range 512-4096, depending on the number of concurrent TCP connections you need to support. I would recommend trying 2048 - this should get rid of the panic completely. You can monitor the number of mbuf clusters allocated/in use on the system with netstat -m (see netstat(1)). The default value for NMBCLUSTERS is 512 + MAXUSERS * 16.

4.14. Why do I get an error reading ``CMAP busy'' when rebooting with a new kernel?

The logic that attempts to detect an out of date /var/db/kvm_*.db files sometimes fails and using a mismatched file can sometimes lead to panics.

If this happens, reboot single-user and do:

    # rm /var/db/kvm_*.db

4.15. What does the message ``ahc0: brkadrint, Illegal Host Access at seqaddr 0x0'' mean?

This is a conflict with an Ultrastor SCSI Host Adapter.

During the boot process enter the kernel configuration menu and disable uha0, which is causing the problem.

4.16. Why does Sendmail give me an error reading ````mail loops back to myself''''?

This is answered in the sendmail FAQ as follows:-

        * I'm getting "Local configuration error" messages, such as:

        553 relay.domain.net config error: mail loops back to myself
        554 <user@domain.net>... Local configuration error

        How can I solve this problem?

        You have asked mail to the domain (e.g., domain.net) to be
        forwarded to a specific host (in this case, relay.domain.net)
        by using an MX record, but the relay machine doesn't recognize
        itself as domain.net.  Add domain.net to /etc/sendmail.cw
        (if you are using FEATURE(use_cw_file)) or add "Cw domain.net"
        to /etc/sendmail.cf.
            

The current version of the sendmail FAQ is no longer maintained with the sendmail release. It is however regularly posted to comp.mail.sendmail, comp.mail.misc, comp.mail.smail, comp.answers, and news.answers. You can also receive a copy via email by sending a message to with the command send usenet/news.answers/mail/sendmail-faq as the body of the message.

4.17. Why do full screen applications on remote machines misbehave?

The remote machine may be setting your terminal type to something other than the cons25 terminal type required by the FreeBSD console.

There are a number of possible work-arounds for this problem:

  • After logging on to the remote machine, set your TERM shell variable to ansi or sco if the remote machine knows about these terminal types.

  • Use a VT100 emulator like screen at the FreeBSD console. screen offers you the ability to run multiple concurrent sessions from one terminal, and is a neat program in its own right. Each screen window behaves like a VT100 terminal, so the TERM variable at the remote end should be set to vt100.

  • Install the cons25 terminal database entry on the remote machine. The way to do this depends on the operating system on the remote machine. The system administration manuals for the remote system should be able to help you here.

  • Fire up an X server at the FreeBSD end and login to the remote machine using an X based terminal emulator such as xterm or rxvt. The TERM variable at the remote host should be set to xterm or vt100.

4.18. Why does my machine print ``calcru: negative time...''?

This can be caused by various hardware and/or software ailments relating to interrupts. It may be due to bugs but can also happen by nature of certain devices. Running TCP/IP over the parallel port using a large MTU is one good way to provoke this problem. Graphics accelerators can also get you here, in which case you should check the interrupt setting of the card first.

A side effect of this problem are dying processes with the message ``SIGXCPU exceeded cpu time limit''.

For FreeBSD 3.0 and later from Nov 29, 1998 forward: If the problem cannot be fixed otherwise the solution is to set this sysctl variable:

    # sysctl -w kern.timecounter.method=1

This means a performance impact, but considering the cause of this problem, you probably will not notice. If the problem persists, keep the sysctl set to one and set the NTIMECOUNTER option in your kernel to increasingly large values. If by the time you have reached NTIMECOUNTER=20 the problem is not solved, interrupts are too hosed on your machine for reliable timekeeping.

4.19. I see ``pcm0 not found'' or my sound card is found as pcm1 but I have device pcm0 in my kernel config file. What is going on?

This occurs in FreeBSD 3.x with PCI sound cards. The pcm0 device is reserved exclusively for ISA-based cards so, if you have a PCI card, then you will see this error, and your card will appear as pcm1.

Note: You cannot remove the warning by simply changing the line in the kernel config file to device pcm1 as this will result in pcm1 being reserved for ISA cards and your PCI card being found as pcm2 (along with the warning ``pcm1 not found'').

If you have a PCI sound card you will also have to make the snd1 device rather than snd0:

    # cd /dev
    # ./MAKEDEV snd1

This situation does not arise in FreeBSD 4.x as a lot of work has been done to make it more PnP-centric and the pcm0 device is no longer reserved exclusively for ISA cards

4.20. Why is my PnP card no longer found (or found as unknown) since upgrading to FreeBSD 4.x?

FreeBSD 4.x is now much more PnP-centric and this has had the side effect of some PnP devices (e.g. sound cards and internal modems) not working even though they worked under FreeBSD 3.x.

The reasons for this behaviour are explained by the following e-mail, posted to the freebsd-questions mailing list by Peter Wemm, in answer to a question about an internal modem that was no longer found after an upgrade to FreeBSD 4.x (the comments in [] have been added to clarify the context.

The PNP bios preconfigured it [the modem] and left it laying around in port space, so [in 3.x] the old-style ISA probes ``found'' it there.

Under 4.0, the ISA code is much more PnP-centric. It was possible [in 3.x] for an ISA probe to find a ``stray'' device and then for the PNP device id to match and then fail due to resource conflicts. So, it disables the programmable cards first so this double probing cannot happen. It also means that it needs to know the PnP id's for supported PnP hardware. Making this more user tweakable is on the TODO list.

To get the device working again requires finding its PnP id and adding it to the list that the ISA probes use to identify PnP devices. This is obtained using pnpinfo(8) to probe the device, for example this is the output from pnpinfo(8) for an internal modem:

    # pnpinfo
    Checking for Plug-n-Play devices...
    
    Card assigned CSN #1
    Vendor ID PMC2430 (0x3024a341), Serial Number 0xffffffff
    PnP Version 1.0, Vendor Version 0
    Device Description: Pace 56 Voice Internal Plug & Play Modem
    
    Logical Device ID: PMC2430 0x3024a341 #0
            Device supports I/O Range Check
    TAG Start DF
        I/O Range 0x3f8 .. 0x3f8, alignment 0x8, len 0x8
            [16-bit addr]
        IRQ: 4  - only one type (true/edge)

[more TAG lines elided]

    TAG End DF
    End Tag
    
    Successfully got 31 resources, 1 logical fdevs
    -- card select # 0x0001
    
    CSN PMC2430 (0x3024a341), Serial Number 0xffffffff
    
    Logical device #0
    IO:  0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8
    IRQ 5 0
    DMA 4 0
    IO range check 0x00 activate 0x01

The information you require is in the ``Vendor ID'' line at the start of the output. The hexadecimal number in parentheses (0x3024a341 in this example) is the PnP id and the string immediately before this (PMC2430) is a unique ASCII id. This information needs adding to the file /usr/src/sys/isa/sio.c.

You should first make a backup of sio.c just in case things go wrong. You will also need it to make the patch to submit with your PR (you are going to submit a PR, aren't you?) then edit sio.c and search for the line

    static struct isa_pnp_id sio_ids[] = {

then scroll down to find the correct place to add the entry for your device. The entries look like this, and are sorted on the ASCII Vendor ID string which should be included in the comment to the right of the line of code along with all (if it will fit) or part of the Device Description from the output of pnpinfo(8):

    {0x0f804f3f, NULL},     /* OZO800f - Zoom 2812 (56k Modem) */
    {0x39804f3f, NULL},     /* OZO8039 - Zoom 56k flex */
    {0x3024a341, NULL},     /* PMC2430 - Pace 56 Voice Internal Modem */
    {0x1000eb49, NULL},     /* ROK0010 - Rockwell ? */
    {0x5002734a, NULL},     /* RSS0250 - 5614Jx3(G) Internal Modem */

Add the hexadecimal Vendor ID for your device in the correct place, save the file, rebuild your kernel, and reboot. Your device should now be found as an sio device as it was under FreeBSD 3.x

4.21. Why do I get the error ``nlist failed'' when running, for example, top or systat?

The problem is that the application you are trying to run is looking for a specific kernel symbol, but, for whatever reason, cannot find it; this error stems from one of two problems:

  • Your kernel and userland are not synchronized (i.e., you built a new kernel but did not do an installworld, or vice versa), and thus the symbol table is different from what the user application thinks it is. If this is the case, simply complete the upgrade process (see /usr/src/UPDATING for the correct sequence).

  • You are not using /boot/loader to load your kernel, but doing it directly from boot2 (see boot(8)). While there is nothing wrong with bypassing /boot/loader, it generally does a better job of making the kernel symbols available to user applications.

4.22. Why does it take so long to connect to my computer via ssh or telnet?

The symptom: there is a long delay between the time the TCP connection is established and the time when the client software asks for a password (or, in telnet(1)'s case, when a login prompt appears).

The problem: more likely than not, the delay is caused by the server software trying to resolve the client's IP address into a hostname. Many servers, including the Telnet and SSH servers that come with FreeBSD, do this in order to, among other things, store the hostname in a log file for future reference by the administrator.

The remedy: if the problem occurs whenever you connect from your computer (the client) to any server, the problem is with the client; likewise, if the problem only occurs when someone connects to your computer (the server) the problem is with the server.

If the problem is with the client, the only remedy is to fix the DNS so the server can resolve it. If this is on a local network, consider it a server problem and keep reading; conversely, if this is on the global Internet, you will most likely need to contact your ISP and ask them to fix it for you.

If the problem is with the server, and this is on a local network, you need to configure the server to be able to resolve address-to-hostname queries for your local address range. See the hosts(5) and named(8) manual pages for more information. If this is on the global Internet, the problem may be that your server's resolver is not functioning correctly. To check, try to look up another host--say, www.yahoo.com. If it does not work, that is your problem.

4.23. What does ``stray IRQ'' mean?

Stray IRQs are indications of hardware IRQ glitches, mostly from hardware that removes its interrupt request in the middle of the interrupt request acknowledge cycle.

One has three options for dealing with this:

  • Live with the warnings. All except the first 5 per irq are suppressed anyway.

  • Break the warnings by changing 5 to 0 in isa_strayintr() so that all the warnings are suppressed.

  • Break the warnings by installing parallel port hardware that uses irq 7 and the ppp driver for it (this happens on most systems), and install an ide drive or other hardware that uses irq 15 and a suitable driver for it.

4.24. Why does ``file: table is full'' show up repeatedly in dmesg?

This error is caused when you have exhausted the number of available file descriptors on your system. The file table in memory is full.

The solution:

Manually adjust the kern.maxfiles kernel limit setting.

    # sysctl -w kern.maxfiles=n

Adjust n according to your system needs. Each open file, socket, or fifo uses one file descriptor. A large-scale server may easily require tens of thousands of file descriptors (10,000+), depending on the kind and number of services running concurrently.

The number of default file descriptors set in the kernel is dictated by the

    maxusers        32

maxusers line in your kernel config file. Increasing this will proportionally increase kern.maxfiles.

You can see what kern.maxfiles is currently set to by:

    # sysctl kern.maxfiles
    kern.maxfiles: 1064

4.25. Why does the clock on my laptop keep incorrect time?

Your laptop has two or more clocks, and FreeBSD has chosen to use the wrong one.

Run dmesg(8), and check for lines that contain Timecounter. The last line printed is the one that FreeBSD chose, and will almost certainly be TSC.

    # dmesg | grep Timecounter
    Timecounter "i8254"  frequency 1193182 Hz
    Timecounter "TSC"  frequency 595573479 Hz

You can confirm this by checking the kern.timecounter.hardware sysctl(3).

    # sysctl kern.timecounter.hardware
    kern.timecounter.hardware: TSC

The BIOS may modify the TSC clock--perhaps to change the speed of the processor when running from batteries, or going in to a power saving mode, but FreeBSD is unaware of these adjustments, and appears to gain or lose time.

In this example, the i8254 clock is also available, and can be selected by writing its name to the kern.timecounter.hardware sysctl(3).

    # sysctl -w kern.timecounter.hardware=i8254
    kern.timecounter.hardware: TSC -> i8254

Your laptop should now start keeping more accurate time.

To have this change automatically run at boot time, add the following line to /etc/sysctl.conf.

    kern.timecounter.hardware=i8254

4.26. Why does FreeBSD's boot loader display ``Read error'' and stop after the BIOS screen?

FreeBSD's boot loader is incorrectly recognizing the hard drive's geometry. This must be manually set within fdisk when creating or modifying FreeBSD's slice.

The correct drive geometry values can be found within the machine's BIOS. Look for the number of cylinders, heads and sectors for the particular drive.

Within sysinstall(8)'s fdisk, hit G to set the drive geometry.

A dialog will pop up requesting the number of cylinders, heads and sectors. Type the numbers found from the BIOS separates by forward slashes.

5000 cylinders, 250 sectors and 60 sectors would be entered as 5000/250/60

Press enter to set the values, and hit W to write the new partition table to the drive.

4.27. Another operating system destroyed my Boot Manager. How do I get it back?

Enter sysinstall(8) and choose Configure, then Fdisk. Select the disk the Boot Manager resided on with the space key. Press W to write changes to the drive. A prompt will appear asking which boot loader to install. Select this, and it will be restored.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.