From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 10 22:09:55 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 025085E0 for ; Wed, 10 Jul 2013 22:09:55 +0000 (UTC) (envelope-from will@firepipe.net) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx1.freebsd.org (Postfix) with ESMTP id B9AEF1E6A for ; Wed, 10 Jul 2013 22:09:54 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id c13so6685387vea.35 for ; Wed, 10 Jul 2013 15:09:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=P0hgntb69lkjdLa3xZcY1eJomyKef+w5S1ZlbOZLz14=; b=eVugtxSOK2AHaTq2v2m0FEHQ85QsCj0jh4uohMpKsVyLsdjFBuWAOZ1U6BNDSHtSMc TqQutw5mms8GJP7MwkNVPw/yEZvmnb5YD4nsagFoavObpeS6woT40xJ11MzbNtILdZw4 xYbOQTWn/a0gZuvWqNKDjtiG6EtqqgoljOOWa41BkQA9VG04JfmSMW9Gj2wcrferksCd bj4DHiYEngYee3wLJbOKSuPuo5Yc1G3UcgFzlnr9dLF4+osW62Q1jpdQyAoy7u+H15tI IV3sB+UnFd//F1PamboSV17g/TKOkt05+NEix2aXoIr7RmzCdGNP/SDcUagDJ6xPNxeE utOA== MIME-Version: 1.0 X-Received: by 10.58.234.161 with SMTP id uf1mr19886913vec.57.1373494187427; Wed, 10 Jul 2013 15:09:47 -0700 (PDT) Received: by 10.58.226.66 with HTTP; Wed, 10 Jul 2013 15:09:47 -0700 (PDT) In-Reply-To: <3592BFB7-0663-4381-AFF5-C7DE0AE16858@mail.turbofuzz.com> References: <9890DFF1-892A-4DCA-9E33-B70681154F43@mail.turbofuzz.com> <3592BFB7-0663-4381-AFF5-C7DE0AE16858@mail.turbofuzz.com> Date: Wed, 10 Jul 2013 16:09:47 -0600 Message-ID: Subject: Re: Kernel dumps [was Re: possible changes from Panzura] From: Will Andrews To: Jordan Hubbard Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmK1ohdUOSlHEMS/Rv2QMzGIIXGWgoPai9R+PxzrJEzAhfRhd9OxZSh3dXQdNgBHHAXPTnR Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 22:09:55 -0000 On Wed, Jul 10, 2013 at 3:50 PM, Jordan Hubbard wr= ote: > Absolutely. In fact, before the advent of remote network debugging, FW w= as totally the debugging method of choice since firewire target DMA lets yo= u do all kinds of useful things (as well as a few things that simply scare = the security guys to death ;-) ). > > My point was more that actually being able to debug a machine over the ne= twork is such a step up in terms of convenience/awesomeness that if anyone = is thinking of putting any time and attention into this area at all, that's= definitely the target to go for. > > Looking at http://www.opensource.apple.com/tarballs/xnu/xnu-2050.22.13.ta= r.gz there's even reasonable "documentation" on the kernel debugging protoc= ol in xnu/osfmk/kdp. Folks could do worse than try to clone it. The gdb d= ebugger macros in support of it are also in xnu/kgmacros. None of it is go= ing to be 'drop in' for FreeBSD by any stretch of the imagination, but it's= always easier to get to a destination when you have a map. :-) Anyone w= ith a Mac can also ""nvram boot-args=3D"debug=3D0x144"" and test-drive it a= round, just to see how it works in actual practice. See also: https://dev= eloper.apple.com/library/mac/#documentation/Darwin/Conceptual/KEXTConcept/K= EXTConceptDebugger/debug_tutorial.html Speaking of Apple solutions, I've recently used Apple's kgdb with the kernel debug kit & kdp remote debugging, to debug a panic'd OS X host. It's really quite nice, because the debug kit comes with a ton of macros, similar to kdb, and you also get the benefit of source debugging. I think FreeBSD would benefit massively from finding some way to share macros between kdb and kgdb, in addition to having an "emergency network stack" like you suggest. As Alan says, until then, there's firewire, and also gdbsx if your FreeBSD system is running as a Xen guest. --Will.