Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23848 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98746 invoked by uid 1010); 1 Jun 2006 11:25:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98731 invoked from network); 1 Jun 2006 11:25:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2006 11:25:47 -0000 X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:42139] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 0F/39-07504-ABECE744 for ; Thu, 01 Jun 2006 07:25:47 -0400 Received: (qmail 25242 invoked from network); 1 Jun 2006 11:25:21 -0000 Received: from internal.zend.office (HELO thinkpad) (10.1.1.1) by internal.zend.office with SMTP; 1 Jun 2006 11:25:21 -0000 To: "'Steph Fox'" Cc: "'internals'" Date: Thu, 1 Jun 2006 15:25:34 +0400 Message-ID: <006001c6856e$1ccafe40$6e02a8c0@thinkpad> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0061_01C6858F.A3DC9E40" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: RE: [PHP-DEV] tsrm_shutdown() and the CLI SAPI From: dmitry@zend.com ("Dmitry Stogov") ------=_NextPart_000_0061_01C6858F.A3DC9E40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Patch was cutted. Dmitry. > -----Original Message----- > From: Dmitry Stogov [mailto:dmitry@zend.com] > Sent: Thursday, June 01, 2006 3:05 PM > To: 'Andi Gutmans'; 'Steph Fox'; 'Frank M. Kromann' > Cc: 'internals'; 'Antony Dovgal'; 'Xuefer' > Subject: RE: [PHP-DEV] tsrm_shutdown() and the CLI SAPI > > > Hi Stepth, > > I reproduced crash of php-gtk on linix with php-zts. > I mean running "php -v" then php.ini contains > "extension=gtk2.so". The crash occurs only then php compiled > with --enable-debug. > > The reason of the crash is a bug in ZE that is activated by > memory leaks in php-gtk. In case of "php -v" we don't do > request startup/shutdown and as result we don't handle memory > leaks on request shutdown. During tsrm_shutdown() > shutdow_nmemory_manager() is called after sapi_shutdown() and > as result we cannot access sapi_globals then trying to print > information about memory leaks and crashes. > > The solution - don't print information about memory leaks > during tsrm_shutdown(). > > Patch for PHP_5_2 is attached, but it can be manually applied > to any version. > > Steph, does you crash(es) go away with this patch? > > I am going to commit patch in 24h. > Any objections? > > Thanks. Dmitry. > > > -----Original Message----- > > From: Andi Gutmans [mailto:andi@zend.com] > > Sent: Thursday, June 01, 2006 10:29 AM > > To: Steph Fox; Frank M. Kromann > > Cc: 'internals'; 'Antony Dovgal'; Dmitry Stogov; 'Xuefer' > > Subject: Re: [PHP-DEV] tsrm_shutdown() and the CLI SAPI > > > > > > As we are not planning to release a new version within the next > > couple of weeks, I suggest before jumping to conclusions we > > take a look at it. > > > > If you really need to comment out that line in the meanwhile > > that's OK with me. > > > > Andi > > > > At 09:50 PM 5/31/2006, Steph Fox wrote: > > >>>Yes, it would, given the root cause - but would you > really want to > > >>>break the whole of PHP for an academic exercise? > > >> > > >>It's not really an academic exercise. If we know there's a bug > > >>someplace we should at least look into it and try and > understand it. > > > > > >Frank's referring to Zeev's three-years-ago decision to simply opt > > >out of tsrm_shutdown() here... he's suggesting we revert it. > > > > > >>Then if we decide to remove the trsm_shutdown call for a > good reason > > >>(circular dependency, blah blah blah) then we can do that > and put a > > >>nice fat comment on why it's the right thing to do. But I > do think > > >>it's benefical to try and understand what's happening. > > > > > >Fine, but breaking working code while you're trying to understand > > >what's happening is far from beneficial to our users. Can't > > we at least #0 it? > > > > > >> > > >>Andi > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > ------=_NextPart_000_0061_01C6858F.A3DC9E40 Content-Type: text/plain; name="zts.diff.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zts.diff.txt" Index: Zend/zend.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/ZendEngine2/zend.c,v=0A= retrieving revision 1.308.2.12.2.8=0A= diff -u -p -d -r1.308.2.12.2.8 zend.c=0A= --- Zend/zend.c 19 May 2006 06:09:14 -0000 1.308.2.12.2.8=0A= +++ Zend/zend.c 1 Jun 2006 10:59:31 -0000=0A= @@ -517,7 +517,7 @@ static void zend_new_thread_end_handler(=0A= =0A= static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p = TSRMLS_DC)=0A= {=0A= - shutdown_memory_manager(0, 1 TSRMLS_CC);=0A= + shutdown_memory_manager(1, 1 TSRMLS_CC);=0A= }=0A= #endif=0A= =0A= ------=_NextPart_000_0061_01C6858F.A3DC9E40--