Subject: Re: /sys/scsi/sd.c's sddump()
To: matthew green <mrg@mame.mu.OZ.AU>
From: Ken Hornstein <kenh@entropic.com>
List: tech-kern
Date: 12/05/1994 10:57:06
>i've mostly done it, i think.  at least, it spent time
>counting down from 16 to 0 (i have 16 meg), and then when
>it ran savecore it created the relevant files in /var/crash.

Great!  Share/post your code?

>the problem was the core file was useless.  i believe this
>is because /etc/rc has this:
>
>[ ... ]
>
>swapon -a
>
>[ ... ]
>
>if [ -d /var/crash ]; then
>        echo checking for core dump...
>	savecore /var/crash
>fi
>
>[ ... ]
>
>so it's possible that something trashes the swap area before
>savecore has a chance to save it.  i could be wrong, i got
>sick of building kernels for the night a few hours ago and
>haven't looked at it since  ;-)

I was under the impression that the the crash dump was generated some number
of bytes past the beginning of the swap area; that may actually be true, but
I'm not sure where "dumplo" is defined.  Do you think any paging is done before
savecore gets called, though?

>   There's a bunch of code that's commented out in there, but I suspect that
>   it's old and isn't relevant anymore.
>
>most of it was `ok'.  a few interfaces had changed but i
>worked out the new ones (i think), then tried it with the
>NOT_TRUSTED define still in place, watched mountains for
>messages fly by my screen (the *slow* sparc console, at
>that).. they seemed ok, so i undef'ed NOT_TRUSTED and gave
>it a go.  seemed to dump ok, besides not actually getting
>a useful core at the end ;-)

I see that you're working on a sparc; I'm interested in getting this working on
the i386.  From looking at i386/isa/wd.c, I get the impression that the
pmap_enter() routine to translate the kernel address in sddump() won't work on
the i386; is that true?  (I'll admit to being pretty ignorant of the VM system
in general).  Maybe the reason your core was bad was because the data you wrote
was bogus?

--Ken