From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 22 02:11:00 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC25D65B; Sat, 22 Nov 2014 02:11:00 +0000 (UTC) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B54ACD16; Sat, 22 Nov 2014 02:11:00 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id h136so4563189oig.11 for ; Fri, 21 Nov 2014 18:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=vThTqSN47ykrPKb8khy/DjC0qq8YXytQPZu+kTJJ4qA=; b=BvxZQ9E/N1MWL+10dtFSl/vn8yJ/I1S5jbURj+jdE4++PmxR3gJKfbrFka1Oc7OPHs GkTMjNhU9/ZbTZo4IyPT+y3xEWvow++Fl/53R5IOaGZRh6VHzsve/f+DBdNqZmj7w8Iz qVQkGRTmphSCvAA+bdd8/eXkNHxlaudqNtQs12G4QICIfqx5mOrQcflngGHb35kYs5xO gkOrNPKZMtqS6RQZjJw7Df7Az6gIDz4/nrL/dmV36Ku0iYXLIuS4cDIeBqvXSFsLXUh3 7PhTmikAQ6+2EHdpHpJaXMFE32SALoy9oR0yqxvrKK5HlzWGWFWNod9IV+p1r3QnvlYi 3XNQ== MIME-Version: 1.0 X-Received: by 10.60.94.167 with SMTP id dd7mr5109973oeb.35.1416622259824; Fri, 21 Nov 2014 18:10:59 -0800 (PST) Received: by 10.76.0.138 with HTTP; Fri, 21 Nov 2014 18:10:59 -0800 (PST) Date: Fri, 21 Nov 2014 21:10:59 -0500 Message-ID: Subject: Re: [patch] Debugging the ZDB debugger. From: Zaphod Beeblebrox To: "K. Macy" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2014 02:11:01 -0000 Obviously I don't know the ramifications here, but this patch fixes things. If you don't want to read it, the jist is that dl_phys is null and this function would like to dereference it. Now my next question is: how badly damaged is the zfs filesystem that causes this? From looking in from the outside, it works find save claming to have two files with errors. (in case everyone needs catching up, -dd works -ddd or -dddd crashes without this patch) Index: cddl/contrib/opensolaris/cmd/zdb/zdb.c =================================================================== --- cddl/contrib/opensolaris/cmd/zdb/zdb.c (revision 274527) +++ cddl/contrib/opensolaris/cmd/zdb/zdb.c (working copy) @@ -1461,11 +1461,15 @@ if (dump_opt['d'] < 3) return; - zdb_nicenum(dl->dl_phys->dl_used, bytes); - zdb_nicenum(dl->dl_phys->dl_comp, comp); - zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp); - (void) printf("\n Deadlist: %s (%s/%s comp)\n", - bytes, comp, uncomp); + if(dl->dl_phys) { + zdb_nicenum(dl->dl_phys->dl_used, bytes); + zdb_nicenum(dl->dl_phys->dl_comp, comp); + zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp); + (void) printf("\n Deadlist: %s (%s/%s comp)\n", + bytes, comp, uncomp); + } else { + (void) printf("\n Deadlist: __really_dead__\n"); + } if (dump_opt['d'] < 4) return;