Technical article 126294

How do I enable the kernel debugger in OpenServer6?

OpenServer 6.0.0

Written · Last revised

Problem

I am trying to enable the scodb kernel debugger in OpenServer6.

How can I do this?

The OpenServer5 scodb kernel debugger is no longer part of SCO OpenServer6.

SCO OpenServer6 provides the kdb(ADM) kernel debugger in its place.

Solution

There are two methods to control 'kdb' on your server:

The first is to simply run "mkdev kdb".

The second is to control this manually.

To enable kdb manually on your machine:

1. Edit /etc/conf/sdevice.d/kdb and /etc/conf/sdevice.d/kdb_util.

Make the following change in both files:

change field two of the driver line from "N" to "Y"

ie.  kdb:
#ident  "@(#)unixsrc:usr/src/i386/uts/util/kdb/kdb/kdb.cf/System /main/1"
#ident  "$Header: $"
$version 2
kdb     Y       0       0       0       0       0       0       0       0
-1
kdb_util:
#ident  "@(#)
unixsrc:usr/src/i386/uts/util/kdb/kdb_util/kdb_util.cf/System /main/1"
#ident  "$Header: $"
$version 2
kdb_util        Y       0       0       0       0       0       0       0
0       -1
2. Run the following commands:
# /etc/conf/bin/idbuild -M kdb_util
# /etc/conf/bin/idbuild -M kdb
# modadmin -l kdb_util
# modadmin -l kdb
3. Test the KDB:

3a. You MUST enter the kernel debugger on the CONSOLE, you do not want to enter the kernel debugger if you are logged into the GUI. Doing this will cause you to lose control of your machine.

ie. from the console press CTRL-ALT-F1 to get to the first virtual console.

3b. Press <Ctrl><Alt>d to enter the debugger.

You can now run kdb to enter a scodb like command line interface.

NOTE: If this hot-key sequence fails to enter the debugger, check to be sure that the KDBSECURITY kernel parameter is set to 0:

# /etc/conf/bin/idtune KDBSECURITY 0
NOTE: kdb does not work with USB keyboards.  If you have a USB keyboard,
      you can still use kdb, if you can set legacy mode in your BIOS and
      disable USB at boot time.  See TAs 127599 and 127186 for more info.
TA 127599
TA 127186
Please also note:

The above configuration is only active until the system is rebooted. To use the debugger after rebooting, re-run the modadmin commands above:

# modadmin -l kdb_util
# modadmin -l kdb

If you would like to have the debugger on all the time for every boot, you can make these drivers static by adding $static to the sdevice files so that they look like this:

ie.  kdb:
#ident  "@(#)unixsrc:usr/src/i386/uts/util/kdb/kdb/kdb.cf/System /main/1"
#ident  "$Header: $"
$version 2
$static
kdb     Y       0       0       0       0       0       0       0       0
-1
kdb_util:
#ident  "@(#)
unixsrc:usr/src/i386/uts/util/kdb/kdb_util/kdb_util.cf/System /main/1"
#ident  "$Header: $"
$version 2
$static
kdb_util        Y       0       0       0       0       0       0       0
0       -1
NOTES:

The CTRL-ALT-P command used to force a dump is disabled on OpenServer6 even if configured with the CONSOLE_SECURITY kernel tunable.

This issue has been reported to SCO Engineering.

NOTES:

If /etc/init.d/vxvm-startup/dumpcheck does not save the dump automatically when the server starts then the dump may have been generated via 'kdb' and this issue has been reported to SCO Engineering.

If the a panic dump has not been generated by 'kdb' then you are likely to see this when the server boots:

UX:dumpcheck: INFO: There is a system dump memory image in \ the /dev/swap device.

Do you want to save it? (y/n)> y
Please indicate how you want to save the dump:
  f    - File in /var/spool/dump
  n, q - Quit without saving the dump
> f

If you write the dump to /var/spool/dump then it will be in a bzip2 format with a date/time notation in the filename.

To analyze a dump it is better to specify which kernel contains the nlist and the location of the modules:

# crash -d /dev/[dump/swap] -n /stand/unix[.old] -m /etc/conf/mod.d
        -w <output filename>
At the ">" prompt, enter:

> panic > trace > trace -e > stack > stat > strstat > user > proc > quit

or:

After you have a panic, the dump should be saved to /var/spool/dump.

Uncompress the dump file and create a crash analysis file with:

# cd /var/spool/dump
# bzip2 -d *bz2
# echo "quit" | crash -d panic* -a /tmp/crash.txt

See also

See scodb(ADM) and kdb(ADM) for more information.

To use 'kdb' for further kernel analysis then see:

TA#112001, "How can I force a dump on UnixWare 7?"

TA 112001
for more information.

From the Xinuos technical article database, record 126294. Reproduced with permission. The original is at www.sco.com/ta/126294, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.