From owner-freebsd-threads@FreeBSD.ORG Fri Sep 12 22:52:52 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2004B106566C; Fri, 12 Sep 2008 22:52:52 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5A18FC0A; Fri, 12 Sep 2008 22:52:52 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 027761A3C37; Fri, 12 Sep 2008 15:52:52 -0700 (PDT) Date: Fri, 12 Sep 2008 15:52:51 -0700 From: Alfred Perlstein To: Ivan Voras Message-ID: <20080912225251.GG16977@elvis.mu.org> References: <20080912165808.GE16977@elvis.mu.org> <9bbcef730809121444u34991c52m2cbc01a8ada47eb5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bbcef730809121444u34991c52m2cbc01a8ada47eb5@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: Apache-worker stuck at 100% CPU X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 22:52:52 -0000 * Ivan Voras [080912 14:45] wrote: > 2008/9/12 Alfred Perlstein : > > > Try using "pstack" a few times. It's in ports. > > > > Also, gcore(1) might help. > > Will try. > > > You can also try to attach using gdb. > > I did, but either I'm missing something or I'm not using it well, > because I can't get a backtrace. How do I select threads to backtrace? > How do I pick what thread to backtrace? i think the command is 'info threads' or 'show threads' then i think you just type 'thread FOO' to select the thread. > > > Basically, one of these tools should give you a stack trace which > > can help. > > > > It's interesting that the process is in "umtxn" though, is it > > multithreaded apache? Can you dump the threads? I think top(1) > > has an option to view each thread, how about trying that? > > Yes, it's multithreaded apache. This did help somewhat - when I do it > I see that it's not actually stuck in umtxn - there's one thread that > consumes the CPU and it's apparently always running (in state CPUx). > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 7212 www 103 0 30340K 7932K CPU2 2 444:23 99.02% httpd > > I'm currently upgrading the system to 7-STABLE, to see if it helps. yeah its stuck in userspace doing something.. -- - Alfred Perlstein