Ticket #93 (closed defect: worksforme)

Opened 17 months ago

Last modified 17 months ago

Segfault when using variable cache increment/decrement functions

Reported by: edgaribsen Owned by: moo
Priority: major Milestone:
Component: cacher Version: 1.2-dev
Keywords: segfault variable cache Cc:
Blocked By: PHP Version: 5.2.0
Application: Need User Feedback:
Other Exts: SAPI: FastCGI
Probability: Blocking:

Description (last modified by moo) (diff)

XCache 1.2.0 segfaults when using variable increment/decrement functions:

Part of gdb output:

<?php
xcache_inc("XXX"); //first invocation does not segfault...
xcache_inc("XXX"); //but the second one does
?>

Program received signal SIGSEGV, Segmentation fault.
0xb7ebee9b in zif_xcache_get_special_value () from /usr/lib/php5/xcache.so

same with xcache_dec():

<?php
xcache_dec( "abc" );
xcache_dec( "abc" );
?>

Program received signal SIGSEGV, Segmentation fault.
0xb7f51e9b in zif_xcache_get_special_value () from /usr/lib/php5/xcache.so

Also, all of the variable API functions segfault when the variable cache is not enabled... maybe it is a good idea to have a more graceful error handler? :)

By the way, I have the varcache size set at 1M with 1K chunks.

Change History

Changed 17 months ago by moo

  • description modified (diff)

which 1.2-dev svn-revision are you using?

there is check in the svn HEAD:

    if (!xc_var_caches) {
        VAR_DISABLED_WARNING();
        RETURN_NULL();
    }

Changed 17 months ago by edgaribsen

Actually, I'm using 1.2.0 stable...

I see that the check would fix the segfaults when the varcache isn't enabled, but is the segfaults with xcache_inc/xcache_dec also fixed in HEAD? They occur when the varcache is enabled; using xcache_set/xcache_get is fine but not inc/dec.

Changed 17 months ago by judas_iscariote

the segfault is fixed in svn 1.2 not sure if fixed in trunk.

Changed 17 months ago by edgaribsen

Is there any possible way to isolate the commit? I'm running XCache on a production system and do not want to risk the possible breakage associated with svn HEAD.

Changed 17 months ago by moo

  • status changed from new to closed
  • resolution set to worksforme

it was fixed in trunk and b1.2 (1.2.1-dev)

1.2@HEAD is far stabler than trunk@HEAD, but it's your own risk trying it out. here we goes the patch [328] or [329]

Changed 17 months ago by edgaribsen

Those patches fix segfaults when the varcache isn't enabled, but what about when it is? xcache_inc/dec segfaults when varcache *is* enabled... was this actually fixed, or is it that maybe I have a rare setup where the segfault occurs?

Changed 17 months ago by moo

u gotta provide us a gdb backtrace and the whole XCache relatived ini settings

Note: See TracTickets for help on using tickets.