From owner-freebsd-stable@FreeBSD.ORG Fri May 7 21:32:48 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 229471065672; Fri, 7 May 2010 21:32:48 +0000 (UTC) (envelope-from mattjreimer@gmail.com) Received: from mail-gx0-f226.google.com (mail-gx0-f226.google.com [209.85.217.226]) by mx1.freebsd.org (Postfix) with ESMTP id B71178FC0A; Fri, 7 May 2010 21:32:47 +0000 (UTC) Received: by gxk26 with SMTP id 26so953419gxk.13 for ; Fri, 07 May 2010 14:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Upmt280cmtOdmd6A2MWb4WLV28RA4GtQKjR2HwaPMqE=; b=Ikea9x7SkRpxWkm61h2LCYqDPlDy4sWqhaClah6D6H2bZfyWcw2EwwazbrcErRSAkM VRyBLHvb9iedxN5vVXwhlP6mYmX1qFWf9pPnoDyHwDDF7/+0k/J6TF9jnywVmWu1s2n7 c9OaiojRwBrDCuzTGhDiZRJ9Cb/RnowhAjKjY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Eq9CS1hGmoNX3jzXhYV9TF+zDiF73n7JrVKsB/o5GvnWxhc2J4UhByH8p2af1h9yYM 7MGPdlNVlpYYkmBVZMOpAB9uZj4WB+WZzbSKFdOnFTIeETNsNA75oGd68P4HfqcWURkO eEM0yEbN8HSWLlaFriAavpNGZJ9abzP5MVpSo= MIME-Version: 1.0 Received: by 10.150.61.2 with SMTP id j2mr2325499yba.360.1273267957869; Fri, 07 May 2010 14:32:37 -0700 (PDT) Received: by 10.150.192.4 with HTTP; Fri, 7 May 2010 14:32:37 -0700 (PDT) In-Reply-To: <3898B34F179B4BB7917631C532CDF95F@multiplay.co.uk> References: <6B44BF0945694D98BC060164D404B5A9@multiplay.co.uk> <20091209102122.GC43143@deviant.kiev.zoral.com.ua> <3898B34F179B4BB7917631C532CDF95F@multiplay.co.uk> Date: Fri, 7 May 2010 14:32:37 -0700 Message-ID: From: Matt Reimer To: Steven Hartland Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: nginx + passenger = segv in _rtld_error on restart on FreeBSD8.0? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 21:32:48 -0000 On Wed, Dec 9, 2009 at 4:20 AM, Steven Hartland w= rote: > > ----- Original Message ----- From: "Kostik Belousov" > To: "Steven Hartland" > Cc: ; > Sent: Wednesday, December 09, 2009 10:21 AM > Subject: Re: nginx + passenger =3D segv in _rtld_error on restart on > FreeBSD8.0? > > This is the trace once world had been recompiled with:- > CFLAGS=3D-pipe > WITH_CTF=3D1 > DEBUG_FLAGS=3D-g > > > #0 =A00x0000000800c95eec in thr_kill () at thr_kill.S:3 > #1 =A00x0000000800b22e9e in _thr_send_sig (thread=3D0x800f06600, sig=3D6)= at > /usr/src/lib/libthr/thread/thr_kern.c:92 > #2 =A00x0000000800b1f878 in _raise (sig=3D6) at > /usr/src/lib/libthr/thread/thr_sig.c:187 > #3 =A00x0000000800d74003 in abort () at /usr/src/lib/libc/stdlib/abort.c:= 65 > #4 =A00x000000000043b8a7 in Client::threadMain (this=3D0x800f9cf40) at > ext/nginx/HelperServer.cpp:516 > #5 =A00x0000000000411302 in boost::_mfi::mf0::operator() > (this=3D0x7fffffa45ea8, p=3D0x800f9cf40) at mem_fn_template.hpp:49 > #6 =A00x0000000000411651 in boost::_bi::list1 >>::operator(), boost::_bi::list0> > (this=3D0x7fffffa45eb8, f=3D@0x7fffffa45ea8, a=3D@0x7fffffa45d7f) at bind= .hpp:232 > #7 =A00x0000000000411696 in boost::_bi::bind_t Client>, boost::_bi::list1 > >::operator() > (this=3D0x7fffffa45ea8) at bind_template.hpp:20 > #8 =A00x00000000004116bd in > boost::detail::function::void_function_obj_invoker0 boost::_mfi::mf0, boost::_bi::list1 >> >, void>::invoke ( > =A0 function_obj_ptr=3D@0x7fffffa45ea8) at function_template.hpp:158 > #9 =A00x000000000042e73a in boost::function0 >>::operator() (this=3D0x7fffffa45ea0) at function_template.hpp:825 > #10 0x0000000000435760 in oxt::thread::thread_main (func=3D@0x7fffffa45ea= 0, > data=3D@0x7fffffa45e90) at thread.hpp:107 > #11 0x000000000041310e in > boost::_bi::list2 std::allocator > >, > boost::_bi::value > >>::operator() >, > boost::shared_ptr), boost::_bi::list0> > (this=3D0x800f3ee80, f=3D@0x800f3ee78, a=3D@0x7fffffa45f0f) at bind.hpp:2= 89 > #12 0x0000000000413196 in boost::_bi::bind_t (*)(boost::function >, > boost::shared_ptr), > boost::_bi::list2 std::allocator > >, > boost::_bi::value > > >>::operator() (this=3D0x800f3ee78) at bind_template.hpp:20 > #13 0x00000000004131b9 in > boost::thread::thread_data (*)(boost::function >, > boost::shared_ptr), > boost::_bi::list2 std::allocator > >, > boost::_bi::value > > > >::ru= n > (this=3D0x800f3ee00) at thread.hpp:130 > #14 0x0000000000443259 in thread_proxy (param=3D0x800f3ee00) at > ext/boost/src/pthread/thread.cpp:127 > #15 0x0000000800b1badd in thread_start (curthread=3D0x800f06600) at > /usr/src/lib/libthr/thread/thr_create.c:288 > #16 0x0000000000000000 in ?? () > Cannot access memory at address 0x7fffffa46000 > Current language: =A0auto; currently asm > > It seems that in the passenger client threads it calls closeStream which > errors when > the socket close errors with ENOTCONN > =A0 =A0 =A0 virtual void closeStream() { > =A0 =A0 =A0 =A0 =A0 TRACE_POINT(); > =A0 =A0 =A0 =A0 =A0 if (fd !=3D -1) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 int ret =3D syscalls::close(fd); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 fd =3D -1; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret =3D=3D -1) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (errno =3D=3D EIO) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 throw SystemException("A writ= e operation on the > session stream failed", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errno); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 throw SystemException("Cannot= close the session > stream", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errno); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 } > > This causes it to call abort on the the thread which then crashes the app > with > the above stack trace, which seems really weird. Anyone got any ideas? > > =A0 Regards > =A0 steve Steve, The patch for PR 144061 works for us. http://lists.freebsd.org/pipermail/freebsd-hackers/2010-February/030741.htm= l http://www.freebsd.org/cgi/query-pr.cgi?pr=3D144061 Matt