Subject: Changing dumpsys() to log dump messages?
To: None <tech-kern@netbsd.org>
From: John Hawkinson <jhawk@MIT.EDU>
List: tech-kern
Date: 05/26/2000 00:56:05
I'm shortly about to commit code such that kernel stack traces are
printf()d at panic time (if options DDB and db_onpanic is unset).

This is particularly useful if the dump fails, and you have a
persistent message buffer.

Unfortunately, it's utility is somewhat diminished in the double panic
case (which, oddly enough, I seem to have now), or the case where the
dump fails and you would like to know how/why (which I also have).

dumpsys() on most (if not all) ports clears msgbufenabled, as:

sys/arch/hp300/hp300/machdep.c:
   911  dumpsys()
   912  {
   913          daddr_t blkno;          /* current block to write */
   914                                  /* dump routine */
   915          int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));
   916          int pg;                 /* page being dumped */
   917          paddr_t maddr;          /* PA being dumped */
   918          int error;              /* error code from (*dump)() */
   919  
   920          /* XXX initialized here because of gcc lossage */
   921          maddr = lowram;
   922          pg = 0;
   923  
   924          /* Don't put dump messages in msgbuf. */
   925          msgbufenabled = 0;


While presumably this helps save some space in the message buffer, in
my opinion this seems to limit the set of useful debugging information
significantly.

Are there objections to removing this behavior?
Please voice them by Monday (UTC).

--jhawk