|
Running MudOS: It Crashed! |
|
Contents
IntroductionThis file documents some methods of obtaining crash information which the MudOS developers may find useful in tracking down hard to reproduce crashers (serious bugs).General NotesOk, if your driver crashes, and you want to be helpful, here's what you do:
If you actually get a traceback, it makes crashes somewhere between 10-100x easier to fix (at least!). Remember to also specify your driver version (eg 0.9.19), operating system/architecture, and its version (eg SunOS 5.3). Note: if you didn't use 'gcc', but 'cc' instead (for example), to compile the driver, you will have to use 'dbx' (if you have it). The same instructions as above apply...just replace instances of 'gdb' with 'dbx'. Unattended operation/automationIf you want to automate the process of collecting this crash information, something you can stick this into your startmud script, read this section. Begin by creating a batchfile with the following contents:
run config.foo >driver.err
where
Replace 'config.foo' with the name of your config file, and 'driver.err'
with whatever you've set up for redirecting the driver's stderr to.
Where you have 'driver' (or whatever you named the executable) in your
startmud script, use (depending on the compiler used):
gdb -batch -x batchfile driver >report
or:
dbx -i driver
If/when it crashes, send us a copy of the report.
Debugging core filesThis section applies to you, if the driver has crashed, leaving a core file behind. A large core file is a good sign. =) Some users or systems may set a resource limit on the size of core files, eg
limit coredumpsize 0
preventing them from debugging from the core file. Remove the limit
or skip this section. HP/Apollo (Domain OS) users may be able to use
'/com/tb' to get traceback information.
Using dbx: Using gdb:
dbx driver core gdb driver core
where where
quit quit
Replace 'driver' with the path of your driver executable.
Another useful command is 'print', which can be used to print the values of variables in the current function, eg
print str
'dbx' users can also use the 'dump' command to display the names and variable values in a function, eg
dump main >file
SAS/C (Amiga)If you are using SAS/C, compile with Debug=Symbol and link with AddSym. It's a good to turn off optimizations with NoOpt and NoOptPeep. You can use either 'cpr' or 'tb'. For 'cpr', use:
cpr -line -command "where -a; register" driver config.foo >report
Using 'tb' is a bit more involved. In building the driver, you must:
slink with catch.o or catchnr.o to generate snapshot files
so that if/when the driver crashes, the 'tb' utility can be used to process
the snapshot file. catch.o will ask first before creating a snapshot file,
while catchnr.o will not ask -- if the system is in a bad state, and
catchnr.o is unable to complete writing the snapshot file, the filesystem
can be potentially corrupted. Once you have a 'Snapshot.TB' file, use:
tb -l
to obtain detailed traceback information.
|
|
Page design by Frank Jacquette & Tim Hollebeek Copyright (C) 1998 Tim Hollebeek & Frank Jacquette |
|