﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	appname	phpversion	exts	sapi	probability	blockedby	blocking
66	debug_backtrace + array_shift = crash	moo	moo	"(reported by Vyacheslav Chernousov)

Hi!
Sorry for disturbing your by email, but actually the question is urgent.

One of my customers has server, where I installed xcache. It is dual Xeon with 2GB RAM, CentOS release 4.4 (Final).
I installed lighttpd, php 5.1.6 and xcache (--enable-xcache --enable-xcache-optimizer). Mostly all works stable, but suddenly I found the unexpected behaviour when executing this code:

$trace = debug_backtrace();
array_shift($trace);

on the 2nd line php crashes. When I turn OFF xcache - all works good.
Strace shows me:


{{{
brk(0x9cba000) = 0x9cba000
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb680e000
munmap(0xb680e000, 135168) = 0
brk(0x9caa000) = 0x9caa000
brk(0x9c9a000) = 0x9c9a000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 2832 detached
}}}


I tried to use different xcache releases - from 1.2 till latest 2.0 (from svn) and no success with any revision.

php.ini part:

{{{
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
auto_globals_jit=""0""
xcache.cacher=""1""
xcache.optimizer=""1""

xcache.size=""10M""
xcache.count=""1""
xcache.slots=""8k""

xcache.var_size=""10M""
xcache.var_count=""1""

xcache.readonly_protection=""0""
#xcache.mmap_path=""/dev/zero""
xcache.var_gc_interval = 1
xcache.gc_interval = 1
}}}

Setting both xcache.cacher and xcache.optimizer to zero doesn't help. Only commenting ""zend_extension = ..."" helps ;(

The main problem is that we are going to launch new site on this server in a day or two and we can't to it without xcache and in the same time we can't launch it with this segfault.
I very need your help asap and and I'm ready to provide root access to this server for you to found and fix this bug.
Please contact me by email as soon as possible.

Thank you in advance!"	defect	closed	major		cacher	1.2-dev	invalid		mail@…		=5.2.0					
