Segmentation Fault during startup.
|Reported by:||michael.y||Owned by:||moo|
|Keywords:||xcache xcache cacher||Cc:|
When i tried to enable xcache-3.0.1 together with zend server(zend product) during issuing command:
# php -m
I received a segmentation fault. After having a debug session which included going to the php source code and xcache source code i have concluded that before initiating startup of the
xc_zend_startup and xc_cacher_zend_startup the zend extensions list was composed of:
- ZendExtensionManager?(Inner zend extension manager)
- XCache Cacher.
Before PHP_MINIT_FUNCTION(xcache) is called the zend_llist already includes the
- ZendExtensionManager?. So during PHP_MINIT_FUNCTION(xcache) and PHP_MINIT_FUNCTION(xcache cacher) modifies this list which in the end causes segmentation fault.
I figured out why segmentation fault was happening. The zend_llist that would be suitable for us is
- XCache Cacher
For your consideration is a suggested patch of 2 functions PHP_MINIT_FUNCTION(xcache) and PHP_MINIT_FUNCTION(xcache cacher). During MINIT(xcache) the MINIT(xcache cacher is called) in which it prepends the cacher and later on in MINIT(xcache) the xcache prepends as well.
So in the end the list before startup of all extensions is
- XCache Cacher
Is there a problem with that according to your design?
File is attached in which 2 functions described.
PS. I checked the APC opcode cache code they do not add themselves to the zend_llist.
Change History (23)
Changed 15 months ago by moo
comment:8 in reply to: ↑ 7 Changed 15 months ago by michael.y
- Status changed from infoneeded to assigned
comment:13 Changed 15 months ago by moo
- Resolution set to fixed
- Status changed from started to closed