From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 17 12:02:26 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE95D159 for ; Mon, 17 Mar 2014 12:02:26 +0000 (UTC) Received: from mail-ob0-x229.google.com (mail-ob0-x229.google.com [IPv6:2607:f8b0:4003:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24539AF1 for ; Mon, 17 Mar 2014 12:02:26 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id va2so5442909obc.0 for ; Mon, 17 Mar 2014 05:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ENovSFy63neXwYxQZkepC1KuH+e6TPsvi4+Iwm4wv+M=; b=bQX22+cGSzjIUWtJ+2Fs5p7Snn7a5DPtnYknu/l2EjlBlue3V4vH+zPu3Fpc960WXL hCAN5MRRL5UVV72O0jchUARqi3GzpRZHICLfwbu0uO6eb2t6APKshZEJYDZnUe/3lXBb g8nVfSRw4oT9qTLsVMAU05KRvhAu0lGVpcnYjl6I6rvqP/cU6DJPzk4eFLvdbON8pD+T T7xXLagmhjgPIhBlPFmEhu1V6hbSQLUUR3X/aknjptHg27fYtTDFflaiDM5HMU2xv1CO KMlrp1psL661I+7WIt2V/eCUMmSYPbrSu1dZ6sOsFVo6F2iuzS8goU4sWk+U9O20vXZ1 tN5Q== MIME-Version: 1.0 X-Received: by 10.60.162.7 with SMTP id xw7mr20338587oeb.13.1395057745502; Mon, 17 Mar 2014 05:02:25 -0700 (PDT) Received: by 10.76.115.129 with HTTP; Mon, 17 Mar 2014 05:02:25 -0700 (PDT) In-Reply-To: <21FD6187-811C-48D9-BAC8-105F54F39989@gsoft.com.au> References: <21FD6187-811C-48D9-BAC8-105F54F39989@gsoft.com.au> Date: Mon, 17 Mar 2014 08:02:25 -0400 Message-ID: Subject: Re: Extracting user stack traces from a crash dump From: Ryan Stone To: "Daniel O'Connor" Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 12:02:27 -0000 On Mon, Mar 17, 2014 at 5:41 AM, Daniel O'Connor wrote: > Hi, > Does anyone know of a tool that can extract userland stack traces from a crash dump? > I did some googling and the closest I can see is to use DDB, but obviously that is only possible when I can access the console. > > Is it something procstat should/could be extended to do? If I'm understanding you correctly, you have a kernel core and you want to see the backtrace in *userland*? e.g. malloc() strdup() main() That's not possible with a minidump. A minidump does not include memory for any userland processes, only the kernel, so you can't see what any userland threads were doing at the time of the crash. You could find the trap frame for the thread at the bottom of the kernel stack and map the instruction pointer for the top userland frame, but that's it.