Loggytronic Forum

VOMP => VOMP General / MVP => Topic started by: avvdr on May 13, 2007, 20:34:49

Title: post mortem debug support
Post by: avvdr on May 13, 2007, 20:34:49
To help finding problems when vomp is crashing or hanging, i wrote a small program, that allows to run vomp in debug mode for a long time, managing a set of logfiles with limited size and number.
Basically this works for the nfs mounted devenv version, for the real dongle version I would need to figure out a ramfs location to avoid heavy writing to the flash.
To build the tool, just create an directory below the vomp directory where you did run makedevenv (just in parallel to dongle, client,...).
Unpack the attached tar, call make.
You will get vdebugrot. Copy this to your nfs location and start vomp like this:
/vompclient -d 10 2>&1 | /vdebugrot /vomplog 2048 5 &
This will handle a set of 5 logfiles (/vomplog.01..05) each having at most 2048 lines and a markfile /vomplog.cur.
If a file gets filled, the next one is opened. Each restart will open the next file too.
This way you always will have a reasonable amount of the debug output available after a vomp crash - simply ls -tr and get the related logfiles.
To make this the permanent start command, replace the /vompclient line in /etc/rcS with the above command.

Regards
Andreas
Title: Re: post mortem debug support
Post by: Chris on June 03, 2007, 00:48:55
Good idea.

(Though even a dongle version wouldn't write to the flash memory?)

Just up until recently I had a working gdb for examining core files dropped by vompclient - a gdb compiled on x86 to run on x86, but made to examine ppc core files. I'm just mentioning it to say that it was fairly easily possible, if anyone else wants to have a go or hadn't thought of it.