Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43357 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43503 invoked from network); 15 Mar 2009 23:52:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2009 23:52:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=shire@tekrat.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=shire@tekrat.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain tekrat.com from 208.43.138.18 cause and error) X-PHP-List-Original-Sender: shire@tekrat.com X-Host-Fingerprint: 208.43.138.18 sizzo.org Linux 2.6 Received: from [208.43.138.18] ([208.43.138.18:47646] helo=sizzo.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/8C-06903-6B49DB94 for ; Sun, 15 Mar 2009 18:52:23 -0500 Received: from shirebook.local (unknown [99.13.242.166]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by sizzo.org (Postfix) with ESMTPSA id 1FC49CBE517; Sun, 15 Mar 2009 16:52:19 -0700 (PDT) Message-ID: <49BD94B1.50005@tekrat.com> Date: Sun, 15 Mar 2009 16:52:17 -0700 User-Agent: Postbox 1.0b9 (Macintosh/2009030821) MIME-Version: 1.0 To: Moriyoshi Koizumi CC: internals Mailing List References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] max_execution_time and async signal handling in apache2handler From: shire@tekrat.com (shire) Hi Moriyoshi, Moriyoshi Koizumi wrote: > Hi, > > I got a bug report on the Japanese PHP user's list that states free() > aborts within the timer signal handler due to reentrance to the > function when max_execution_time takes effect and the signal occurs > within the same libc function. The reporter also states he uses > apache2handler, which doesn't provide block_interruptions nor > unblock_interruptions SAPI handlers in contrast to the apache1 > handler. > > Whilst I doubt this happens quite frequently because PHP has its own > memory pool and it's far more rare that the libc's allocators get > called than the emalloc() and efree(), this should be addressed > somehow. A proposed fix is attached but note this greatly compromises > overall performance due to excessive system calls. Isn't this already covered in a proposal here: http://wiki.php.net/rfc/zendsignals? I believe the last hang-up keeping this from getting committed is in the ability to handle this properly and efficiently under ZTS builds, I would really like to see this get applied in a future PHP release though. -shire