[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Setting a dump device from db> ?
From:       Julian Elischer <julian () freebsd ! org>
Date:       2016-12-22 18:52:12
Message-ID: f7000a45-9888-fde2-256a-7d5787eba234 () freebsd ! org
[Download RAW message or body]

On 23/12/2016 12:00 AM, Alan Somers wrote:
> On Thu, Dec 22, 2016 at 12:26 AM, Rodney W. Grimes
> <freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote:
>>> On Mon, Dec 19, 2016 at 02:16:25PM -0700, Alan Somers wrote:
>>>> Is it possible to set a dump device from loader.conf or from the db>
>>>> prompt?  I'm trying to investigate a panic in mpr(4), but I can only
>>>> reproduce it during the boot, before rc(8) has set my dump device.  It
>>>> looks like ada(4) initializes before mpr(4), so I should be able to
>>>> dump to an ada device, if only I can figure out how.  If not, I
>>>> suppose I'll have to try gdb over firewire.
>>> You can set "dumpdev=ada0p1" or so in loader.conf. See g_dev_init() and
>>> init_dumpdev(). This should probably be documented in loader.conf(5).
>> Please review and if OK commit
>>
>> Index: sys/boot/forth/loader.conf
>> ===================================================================
>> --- sys/boot/forth/loader.conf  (revision 310132)
>> +++ sys/boot/forth/loader.conf  (working copy)
>> @@ -101,6 +101,7 @@
>>   #prompt="\\${interpret}"       # Set the command prompt
>>   #root_disk_unit="0"            # Force the root disk unit number
>>   #rootdev="disk1s1a"            # Set the root filesystem
>> +#dumpdev="disk1s1b"            # Set a dump device early on for crashes during boot
>>   #tftp.blksize="1428"           # Set the RFC 2348 TFTP block size.
>>                                  # If the TFTP server does not support RFC 2348,
>>                                  # the block size is set to 512.  If the value
>> --
>> Rod Grimes                                                 rgrimes@freebsd.org
> rgrimes: done
> markj: Thanks for the suggestion.  Unfortunately, it doesn't work in
> this case, probably because geom hasn't started yet.  I'll do what I
> can with online debugging.

yeah you don't gain much through this because the disk probing happens 
so late.
your only chance is really to run your machine in bhyve and boot with 
-d -g and connect to it with the bhyve gdb stub really early.
then you can set breakpoints..
I set one on 'printf' and then step on down to near where the problem 
seems to be happening before going more fine grained.



>
> -Alan
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>

_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic