Segmentation fault in apache when calling apc_bin_loadfile

[email protected] (Benoit Aubuchon) Thu, 14 Oct 2010 14:08:12 -0400
Newsgroups php.apc.dev
Message-ID <[email protected]>
--20cf301d447cea238604929797c2
Content-Type: text/plain; charset=ISO-8859-1

Hi,

Apache segfault when calling apc_fetch after apc_bin_loadfile with a  bin
dump generated from the CLI.

I created 3 scripts to test it out:
 - generator.php, http://pastebin.ca/1962327, clear caches and dump to disk
 - loader.php, http://pastebin.ca/1962330, clear caches and load the dump
 - tester.php, http://pastebin.ca/1962331, load the key `keys` and iterate
each key present in the array and print its status (found / not found)

1. From the CLI, call generator.php
2. Using your browser, call loader.php
3. Using your browser, call tester.php
Apache segfautl

Also, when dumping from Apache and loading it back, not all the keys are
present. Random keys are missing each time apc_bin_loadfile is called. If I
call apc_bin_loadfile and verify the keys, some are missing, repeat again
and a different list of keys are missing. To reproduce:
1. Using your browser, call generator.php
2. Using your browser, call loader.php
3. Using your browser, call tester.php

You'll notice some keys are not found. Then call again loader.php and
tester.php. A different list of missing keys will show up.

I'm using Apache 2.2.16, 5.2.14-pl0-gentoo and APC 3.1.4. For more details
on apc configuration you can check here: http://pastebin.ca/1962336

Is this a bug or I'm doing something wrong?

Thanks

Ben

--20cf301d447cea238604929797c2--