From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 2 16:39:32 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C04E1065673; Mon, 2 Apr 2012 16:39:32 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 83D778FC12; Mon, 2 Apr 2012 16:39:32 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id q32GdQxs007496; Mon, 2 Apr 2012 09:39:26 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4F79D63E.7010200@rawbw.com> Date: Mon, 02 Apr 2012 09:39:26 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120316 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <4F775DF5.1020704@rawbw.com> <201204020831.09253.jhb@freebsd.org> In-Reply-To: <201204020831.09253.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Is there any modern alternative to pstack? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 16:39:32 -0000 On 04/02/2012 05:31, John Baldwin wrote: > Hmm, I don't know if the port has it, but I did some work on pstack a while > ago to make it work with libthread_db so it at least handles i386 ok. It > needs to be modified to use something like libunwind though or some other > unwinder. And possibly it should use libelf instead of its own ELF-parsing > code. I see pstack -1.2_1 failing even on i386: pstack: cannot read context for thread 0x1879f pstack: failed to read more threads 1947: /usr/local/share/chromium/chrome ----------------- thread 100255 ----------------- 0x1879f ???????? () ----------------- thread -1 (running) ----------------- 0x389f1df9 __sys_recvmsg (3, bfbfcd44, 0, bfbfcd68, 0, c) + 5 0x97850b4 _init (3, bfbfcdc8, 800, bfbfdc20, bfbfdc4c, bfbfdc40) + 15c7c1c 0xa8089d0 _init (bfbfe074, 3, 0, bfbfe0c4, 20, bfbfdca0) + 264b538 0xa8094d7 _init (bfbfe44c, 0, bfbfe108, 37a85517, 37aa7680, 38fbf400) + 264c03f 0x8e7ec02 _init (bfbfe44c, bfbfe4a0, 3c, 0, 0, 0) + cc176a 0x8e7f102 _init (bfbfe468, bfbfe44c, bfbfe4a0, 37a9f4b4, 37aa5d40, 1) + cc1c6a 0x8e7f471 _init (2, bfbfe540, bfbfe4a0, 88f9c28, bd4dce8, bd4de88) + cc1fd9 0x81c64ab _init (2, bfbfe540, bfbfe4e8, af61795, bfbfe500, bfbfe540) + 9013 0x81c6452 _init (0, 0, bfbfe518, 81c63a7, 2, bfbfe540) + 8fba 0x81c63a7 _init (3791afd0, 2, bfbfe540, 0, 0, 0) + 8f0f 0x81c6318 _init (bfbfe6d0, bfbfe6f1, 0, bfbfe6ff, bfbfe762, bfbfe7b8) + 8e80 Yuri