Date: Tue, 18 Oct 2011 19:59:22 +0200 From: Fabian Keil <freebsd-listen@fabiankeil.de> To: freebsd-stable@freebsd.org Subject: Re: Setting coredumpsize on a running process? Message-ID: <20111018195922.747d239f@fabiankeil.de> In-Reply-To: <CAF-QHFWX3zFjskA4WOhgh%2B9E5Ap139_E3gvE5vkM_b2xgoQfjQ@mail.gmail.com> References: <j7k2lb$k85$1@dough.gmane.org> <20111018144312.GA17496@icarus.home.lan> <CAF-QHFWX3zFjskA4WOhgh%2B9E5Ap139_E3gvE5vkM_b2xgoQfjQ@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Ivan Voras <ivoras@freebsd.org> wrote: > On 18 October 2011 16:43, Jeremy Chadwick <freebsd@jdc.parodius.com> wrote: > > On Tue, Oct 18, 2011 at 04:32:11PM +0200, Ivan Voras wrote: > >> I have PHP executing as fastcgi via the mod_fcgid module in Apache. I > >> suspect there is a bug in PHP or one of its extensions which causes it > >> to crash with sigsegv, but I cannot get any coredumps. I suspect > >> something is setting coredumpsize to 0 - either Apache, mod_fcgid or PHP. > >> > >> So the question is: is there a way to set coredumpsize on a running > >> process, with the intention of getting a core dump when it crashes? I > >> already tried setting CoreDumpDirectory in Apache and also configuring > >> apache22limits_args in /etc/rc.conf but without effect. > > > > I ended up solving this on a machine where coredumps with Apache + PHP > > were highly common by setting sysctl kern.corefile to > > /var/cores/%P.%N.core, then made sure the /var/cores directory was > > root:wheel, perms 1777. Otherwise I could not get a coredump. > > apache22limits_enable did not help either, nor did CoreDumpDirectory. > > > Having fun yet? > > Oh, I have years and years of fun debugging PHP, in one way or the other :) > > Your suggestion for setting core dump directory explicitely helped; > now it looks like I've hit an infinite recursion / stack eating bug > somewhere in PCRE... > > #1703 0x0000000805d5c72e in match () from /usr/local/lib/libpcre.so.0 > #1704 0x0000000805d5b4f0 in match () from /usr/local/lib/libpcre.so.0 > #1705 0x0000000805d5c72e in match () from /usr/local/lib/libpcre.so.0 > #1706 0x0000000805d5b4f0 in match () from /usr/local/lib/libpcre.so.0 > > However, I'm drawing the line at debugging PCRE, this will go into the > "don't do that" category. There's a fair chance that this isn't a bug in pcre, but the result of a poorly written expression. You may want to have a look at pcrestack(3). Fabian [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6dvoUACgkQBYqIVf93VJ1WCACfa5rdKM/VaqImqRb9FoCh3HkX WzgAn2whO17JqGKaHA7nup/h2jwTg4xC =0TJz -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111018195922.747d239f>
