Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70905 invoked by uid 1010); 4 Dec 2003 14:49:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 70881 invoked from network); 4 Dec 2003 14:49:01 -0000 Received: from unknown (HELO mailout04.sul.t-online.com) (194.25.134.18) by pb1.pair.com with SMTP; 4 Dec 2003 14:49:01 -0000 Received: from fwd06.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1ARbze-0007rT-01; Wed, 03 Dec 2003 19:44:58 +0100 Received: from vega.php.net (GvGyTsZLYezLV5I6440gOEGIWsF8bIvABNdo82YN4dG6F6fL1mTHEZ@[217.81.215.148]) by fmrl06.sul.t-online.com with esmtp id 1ARbxc-0eBtCK0; Wed, 3 Dec 2003 19:42:52 +0100 Message-ID: <6.0.1.1.0.20031203193419.03a13eb8@127.0.0.1> X-Sender: (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Wed, 03 Dec 2003 19:42:52 +0100 To: jay@php.net,internals@lists.php.net In-Reply-To: <20031203182039.91511.qmail@pb1.pair.com> References: <6.0.1.1.0.20031203175354.039cac08@127.0.0.1> <6.0.1.1.0.20031203181532.039d2858@127.0.0.1> <20031203182039.91511.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_842040==.ALT" X-Seen: false X-ID: GvGyTsZLYezLV5I6440gOEGIWsF8bIvABNdo82YN4dG6F6fL1mTHEZ@t-dialin.net Subject: Re: [PHP-DEV] browscap and nesting level too deep (bug #25916) From: thetaphi@php.net (Uwe Schindler) --=====================_842040==.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed On my solaris box the fix does it. I tested it by hammering the same PHP script using get_browser() with and without patch. Without patch it gets this error. With not and script works :) The big problem with this bug is that when the error happens the first time (3 threads using get_browser()), the thread which produces the error does not reset the recursion counter (because of the error) and after finishing all threads it is left at 1. When then 2 more threads use get_browser() at the same time the second one gets the error and at the end the counter is left at 2. And then all further calls fail... In my special case today when the error occured it was: 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 1985 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 1985 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 1985 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 150 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 150 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 168.221.143.68 www.pangaea.de - [03/Dec/2003:17:10:09 +0100] "GET / HTTP/1.1" 200 150 "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=pangaea" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 6 threads accessed the get_browser() at the same time - 3 of them failed (content-length=150... and visible in error log), counter left at 3 -> from this time on get_browser failed to work. I think I should apply the patch to 4.3 and 5 (same problem there) and close the bug. Uwe At 19:20 03.12.2003, Jay Smith wrote: >Uwe Schindler wrote: > > > One solution (attached is the patch, if nobody has someone against it I > > will apply it): > > I switch off the recursion protection for the browscap hash in > > zend_hash_init_ex because this hash has no recursive things in it and is > > not modified after it is created. > > > > Uwe > > > >That will probably do it. I'm going to try and reproduce this with and >without the patch today on our Solaris box and I'll see what I get. I've >been swamped recently and haven't been able to give this a good look. (The >browscap extension really needs to be gutted, but at least it works, for >the most part...) > >Going to go give this a try now... > >J > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Erlangen, Germany --=====================_842040==.ALT--