Return-Path: X-Original-To: apmail-apr-dev-archive@www.apache.org Delivered-To: apmail-apr-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD7139E0E for ; Tue, 7 Feb 2012 00:09:24 +0000 (UTC) Received: (qmail 40184 invoked by uid 500); 7 Feb 2012 00:09:24 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 40073 invoked by uid 500); 7 Feb 2012 00:09:23 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 40060 invoked by uid 99); 7 Feb 2012 00:09:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 00:09:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.214.50 as permitted sender) Received: from [209.85.214.50] (HELO mail-bk0-f50.google.com) (209.85.214.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 00:09:17 +0000 Received: by bkbzv15 with SMTP id zv15so60347bkb.37 for ; Mon, 06 Feb 2012 16:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EXtnFjftbXAUWQWO5wYoqvCFlsP/O4WIKDZ5hU57Tcs=; b=q0+MauEJZeU2lq7smdEIIZZLRi/v8YCM6Q0HvuzXkNEXdoUig0vfpGOPmnY6dvohr3 xrtlpe/ZfWxmd5umg/pRUOKZj7tgf5rK9TkSspmAiwoyLvIvBhOunmYfvxuayfFydr8x X1/ajZGoTSFq/Ud4bWQoTHSFbO/WlZgaF5E3c= MIME-Version: 1.0 Received: by 10.204.130.150 with SMTP id t22mr9291055bks.1.1328573337554; Mon, 06 Feb 2012 16:08:57 -0800 (PST) Received: by 10.204.149.199 with HTTP; Mon, 6 Feb 2012 16:08:57 -0800 (PST) In-Reply-To: References: <1328572491.2059.12.camel@shrek.rexursive.com> Date: Mon, 6 Feb 2012 19:08:57 -0500 Message-ID: Subject: Re: Crash in apr_proce_create() From: Jeff Trawick To: Ronen Mizrahi Cc: Bojan Smojver , dev@apr.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Feb 6, 2012 at 7:00 PM, Ronen Mizrahi wrote: > > > On Mon, Feb 6, 2012 at 6:54 PM, Bojan Smojver wrote: >> >> On Mon, 2012-02-06 at 18:47 -0500, Ronen Mizrahi wrote: >> > For the time being we resolved it by adding an if not NULL statement >> > before invoking the cleanup function however I am not sure that a NULL >> > cleanup function is allowed or by itself represents some kind of an >> > issue. >> >> Have you tried setting you cleanup function to apr_pool_cleanup_null()? >> See: >> >> >> http://apr.apache.org/docs/apr/1.4/group___pool_cleanup.html#gaa211acee585df08f396a50b0ea489b02 >> >> -- >> Bojan >> > > I am afraid I do not understand how this is relevant. It is not valid to pass NULL for a cleanup function. > > The pool cleanup functions in the parent process are registered correctly > and work fine even when releasing the global pool (which happens when the > process terminates). > > Only in the child process we run into this issue and we cannot change the > registrations of cleanup functions in the child process since the crash > occurs somewhere between the invocation of fork() and the invocation of > exec(). It is the registration in the parent which matters. Please confirm that you use apr_pool_cleanup_null() as the cleanup function whenever you don't have any code to run. > > Ronen > -- Born in Roswell... married an alien...