Date: Fri, 21 Nov 2014 21:10:59 -0500 From: Zaphod Beeblebrox <zbeeble@gmail.com> To: "K. Macy" <kmacy@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: [patch] Debugging the ZDB debugger. Message-ID: <CACpH0MdEF7-wHnepHd-H91eDPF8DFMt0t=GSJZ0n1Oa3y9U7ig@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0MdEF7-wHnepHd-H91eDPF8DFMt0t=GSJZ0n1Oa3y9U7ig>