Date: Sun, 20 Nov 2011 20:34:34 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Doug Barton <dougb@freebsd.org> Cc: Daniil Cherednik <dcherednik@masterhost.ru>, freebsd-apache@freebsd.org, freebsd-stable@freebsd.org Subject: Re: 8.2 + apache == a LOT of sigprocmask Message-ID: <20111120183434.GA50300@deviant.kiev.zoral.com.ua> In-Reply-To: <4EC6BB17.20706@FreeBSD.org> References: <20111115100904.GA92795@icarus.home.lan> <4EC4ADC3.2060604@FreeBSD.org> <20111117074909.GL50300@deviant.kiev.zoral.com.ua> <4EC4BECA.5040705@FreeBSD.org> <20111117081210.GN50300@deviant.kiev.zoral.com.ua> <4EC4D359.4040406@FreeBSD.org> <20111117105744.GS50300@deviant.kiev.zoral.com.ua> <4EC610B9.8080406@FreeBSD.org> <20111118091937.GA50300@deviant.kiev.zoral.com.ua> <4EC6BB17.20706@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--EUdKUZvr8YK8ET4E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 18, 2011 at 12:07:51PM -0800, Doug Barton wrote: > On 11/18/2011 01:19, Kostik Belousov wrote: > > On Fri, Nov 18, 2011 at 12:00:57AM -0800, Doug Barton wrote: > >> On 11/17/2011 02:57, Kostik Belousov wrote: > >>>>> It's not catching there though: > >>>>> > >>>>> Reading symbols from /libexec/ld-elf.so.1...done. > >>>>> Loaded symbols for /libexec/ld-elf.so.1 > >>>>> 0x28183b2d in accept () at accept.S:3 > >>>>> 3 RSYSCALL(accept) > >>>>> (gdb) c > >>>>> Continuing. > >>>>> no thread to satisfy query > >>>>> 0x28183b2d in accept () at accept.S:3 > >>>>> 3 RSYSCALL(accept) > >>>>> (gdb) info threads > >>>>> Cannot get thread info: invalid key > >>>>> (gdb) > >>> Err, the other part of my message was that you shall set the breakpoi= nt > >>> on sigprocmask. > >> > >> I'm sorry I'm not making myself clear. We are setting the breakpoint on > >> sigprocmask. But, maybe I'm doing it wrong. Can you give precise > >> instructions as to what you want me to do, from the beginning? Sorry to > >> be so dense. > > Find the pid of the process issuing excessive number of sigprocmask > > calls. Do > > $ gdb /usr/local/bin/httpd > > (gdb) attach <pid> > > (gdb) b _sigprocmask > > (gdb) c > > Bah ! Breakpoint fired. > > (gdb) bt > > (gdb) c > > <... Repeat ... > >=20 > Right, so we're on the same page at least. I've been abbreviating the > output of gdb to make it easier to see the problem, but here is a > (nearly) complete transcript: >=20 > gdb /usr/local/bin/httpd > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you = are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for detail= s. > This GDB was configured as "i386-marcel-freebsd"... > (gdb) attach 1380 > Attaching to program: /usr/local/bin/httpd, process 1380 > Reading symbols from .... (lots of symbol-reading snipped) > 3 RSYSCALL(accept) > Current language: auto; currently asm > (gdb) b _sigprocmask > Breakpoint 1 at 0x282d9055: file /usr/src/lib/libthr/thread/thr_sig.c, > line 210. > (gdb) c > Continuing. > no thread to satisfy query > 0x28183b2d in accept () at accept.S:3 > 3 RSYSCALL(accept) > (gdb) c > Continuing. > no thread to satisfy query > 0x28183b2d in accept () at accept.S:3 > 3 RSYSCALL(accept) > (gdb) c > Continuing. > no thread to satisfy query > 0x28183b2d in accept () at accept.S:3 > 3 RSYSCALL(accept) >=20 > .... etc. This is an issue with either your environment or your gdb, or bug in gdb. It seems that 'continue' did not worked for you at all. I tried to reproduce this locally, but was not able to. And, I am unable to hit sigprocmask for my apache anywhere except rtld. I also have libthr linked in. So the way forward to catch sigprocmask callers is one of - figure out why your gdb does not work and fix it; might be, try to use gdb from ports. - or add libunwind backtraces into sigprocmask - or use dtrace (I doubt that 8.2 has neccessary usermode bits, and seriously doubt its stability). --EUdKUZvr8YK8ET4E Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7JSDoACgkQC3+MBN1Mb4gSQQCgj/cHVj0SnYIRJCLpOnbxVGGd aXAAmwSjgSH1sxgfgRq7qH/p4ZxWVv/Y =3m7i -----END PGP SIGNATURE----- --EUdKUZvr8YK8ET4E--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111120183434.GA50300>