Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2008 23:44:51 +0200
From:      "Ivan Voras" <ivoras@freebsd.org>
To:        "Alfred Perlstein" <alfred@freebsd.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Apache-worker stuck at 100% CPU
Message-ID:  <9bbcef730809121444u34991c52m2cbc01a8ada47eb5@mail.gmail.com>
In-Reply-To: <20080912165808.GE16977@elvis.mu.org>
References:  <gadgrb$4uc$1@ger.gmane.org> <20080912165808.GE16977@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2008/9/12 Alfred Perlstein <alfred@freebsd.org>:

> 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?

> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bbcef730809121444u34991c52m2cbc01a8ada47eb5>