Re: [APC-DEV] IS_INTERNED for apc + zend mixtures

From: Date: Fri, 29 Jul 2011 19:13:05 +0000
Subject: Re: [APC-DEV] IS_INTERNED for apc + zend mixtures
References: 1 2 3 4 5  Groups: php.apc.dev 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Rasmus,

I didn't see that problem.

According to the backtrace they must be unrelated to the original problem. Could you please verify that you rebuild PHP and apc proprly, than catch that problem in debuger (valgrind --db-attach=yes) and verify where the original string came from (which class? which constant?)

Thanks. Dmitry.


On 07/28/2011 07:14 PM, Rasmus Lerdorf wrote:
Thanks Dmitry. I noticed that this introduced 2 new Valgrind warnings: ==23296== Conditional jump or move depends on uninitialised value(s)
==23296==    at 0xBD88BC3: apc_new_interned_string (apc_string.c:82)
==23296==    by 0xBD88FE0: apc_interned_strings_init (apc_string.c:179)
==23296==    by 0xBD824A9: apc_module_init (apc_main.c:845)
==23296==    by 0xBD7A07E: zm_startup_apc (php_apc.c:347)
==23296==    by 0x785C5E: zend_startup_module_ex (zend_API.c:1647)
==23296==    by 0x791E43: zend_hash_apply (zend_hash.c:716)
==23296==    by 0x789909: zend_startup_modules (zend_API.c:1774)
==23296==    by 0x727F1F: php_module_startup (main.c:2103)
==23296==    by 0x82BBAC: php_cli_startup (php_cli.c:414)
==23296==    by 0x82D600: main (php_cli.c:1336)
==23296== ==23296== Conditional jump or move depends on uninitialised value(s)
==23296==    at 0xBD88C8D: apc_new_interned_string (apc_string.c:109)
==23296==    by 0xBD88FE0: apc_interned_strings_init (apc_string.c:179)
==23296==    by 0xBD824A9: apc_module_init (apc_main.c:845)
==23296==    by 0xBD7A07E: zm_startup_apc (php_apc.c:347)
==23296==    by 0x785C5E: zend_startup_module_ex (zend_API.c:1647)
==23296==    by 0x791E43: zend_hash_apply (zend_hash.c:716)
==23296==    by 0x789909: zend_startup_modules (zend_API.c:1774)
==23296==    by 0x727F1F: php_module_startup (main.c:2103)
==23296==    by 0x82BBAC: php_cli_startup (php_cli.c:414)
==23296==    by 0x82D600: main (php_cli.c:1336)
-Rasmus On 07/28/2011 05:15 AM, Dmitry Stogov wrote:
Hi Gopal, Sorry, I've reverted your patches for PHP and APC and committed the proper APC fix. The PHP part of your patch made a significant slowdown. (indirect function call is much more expensive than inlined comparison and it's used quite often e.g. on each HashTable update). The APC part of the patch was logically wrong, because it allowed two interned strings for the same data. Fortunately, the real fix wasn't too difficult. It looks like at some point I decided to save a bit more memory by interning class names, but that feature wasn't reflected in APC code. Thanks. Dmitry. On 07/28/2011 02:42 AM, Gopal V wrote:
On Wednesday 27 July 2011 01:22 PM, Rasmus Lerdorf wrote:
On 07/27/2011 01:12 PM, Gopal V wrote:
We probably need an override for that so that we can nest multiple interned blocks which are non contiguous between different modules.
Gopal, can you come up with a suggested override patch for the engine and we'll get it committed before the alpha-3 release next week.
Updated patch for the cases which check IS_INTERNED before interning is initialized. http://notmysock.org/code/zend-is-interned2.patch + http://notmysock.org/code/apc-string-intern.patch Cheers, Gopal


Thread (17 messages)

« previous php.apc.dev (#285) next »