From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 2 14:31:48 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C7221065677; Mon, 2 Apr 2012 14:31:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 336498FC15; Mon, 2 Apr 2012 14:31:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 93D4AB963; Mon, 2 Apr 2012 10:31:47 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 2 Apr 2012 08:31:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <4F775DF5.1020704@rawbw.com> In-Reply-To: <4F775DF5.1020704@rawbw.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201204020831.09253.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 02 Apr 2012 10:31:47 -0400 (EDT) Cc: Yuri , 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 14:31:48 -0000 On Saturday, March 31, 2012 3:41:41 pm Yuri wrote: > I look at seemingly abandoned sysutils/pstack, last modified upstream > 2002-11-27. > It doesn't really work on 9.0 i386, prints some errors. > > It's functions, though, is quite desirable if one wants to understand > why some multithreaded program hangs or is not responsive. > Since there were no updates, I wonder, is this because there is some > alternative in FreeBSD that I don't know about, or it is primarily due > to the lack of interest/resources? > > I don't take gdb as alternative since it is not single line, and also it > has some threading issues of its own. 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. -- John Baldwin