Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 2014 10:54:11 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Craig Rodrigues <rodrigc@freebsd.org>, Brooks Davis <brooks@freebsd.org>
Subject:   Re: ddb_enable="YES" by default?
Message-ID:  <201409051054.11446.jhb@freebsd.org>
In-Reply-To: <CAG=rPVfo5-d3rLsgUwAGvvWYiW-0wNbcstfowiJVfBTioB7fQg@mail.gmail.com>
References:  <CAG=rPVfo5-d3rLsgUwAGvvWYiW-0wNbcstfowiJVfBTioB7fQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, September 04, 2014 8:02:55 pm Craig Rodrigues wrote:
> Brooks,
> 
> In r178450, you set the default of ddb_enable to NO:
> 
> ------------------------------------------------------------------------
> r178450 | brooks | 2008-04-23 15:40:59 -0700 (Wed, 23 Apr 2008) | 4 lines
> Changed paths:
>    M /head/etc/defaults/rc.conf
> 
> Revert rev 1.332 and keep ddb scripts off by default for now.  Minidumps
> are more flexable and much text-dump like output can be produced from
> them so there's a good argument they are a better default.
> 
> Index: head/etc/defaults/rc.conf
> ===================================================================
> --- head/etc/defaults/rc.conf    (revision 178449)
> +++ head/etc/defaults/rc.conf    (revision 178450)
> @@ -33,7 +33,7 @@
>  apm_enable="NO"        # Set to YES to enable APM BIOS functions (or NO).
>  apmd_enable="NO"    # Run apmd to handle APM event from userland.
>  apmd_flags=""        # Flags to apmd (if enabled).
> -ddb_enable="YES"    # Load ddb scripts at boot.
> +ddb_enable="NO"        # Set to YES to load ddb scripts at boot.
>  ddb_config="/etc/ddb.conf"    # ddb(8) config file.
>  devd_enable="YES"     # Run devd, to trigger programs on device tree changes.
>  devd_flags=""        # Additional flags for devd(8).
> 
> 
> 
> Do you think this is OK to enable by default now?
> Developers who know what they are doing can turn it off in /etc/rc.conf.
> 
> For the average end-user, this is super useful, because
> it loads the ddb rules in /etc/ddb.conf, which do
> useful things like enable textdumps, show all the locks, show all the
> locked vnodes,
> and reboots the box.
> 
> This will allow end-users who have a problem in the field with FreeBSD,
> and are not kernel debugging experts, to get a lot of useful diagnostic
> info that can be reported back to developers on the mailing lists.
> 
> Right now, a lot of times, people take camera pictures of their screen at the
> ddb prompt.  That's pretty painful. :)

Probably at least 50% of the time when I work with a user on a bug report,
I ask them to go into kgdb and run specific commands to extract more detailed
info (print some struct, etc.).  You can'd do that with text dumps.  All that
info is thrown away when the machine reboots.  OTOH, /var/crash/core.txt.N
provides much of the same information automatically from a minidump (and I've
seen users posting URLs to the file).  You can also implement many of the
more advanced ddb commands like 'show lockedvnodes' using gdb scripts against
a minidump (see 'lockedvnodes' command in www.freebsd.org/~jhb/gdb/gdb6).

In short, minidumps still provide far more information and can almost completely
replicate the functionality of textdumps.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409051054.11446.jhb>