Opened 7 years ago

Closed 7 years ago

#66 closed defect (invalid)

debug_backtrace + array_shift = crash

Reported by: moo Owned by: moo
Priority: major Milestone:
Component: cacher Version: 1.2-dev
Keywords: Cc: mail@…
Application: PHP Version: =5.2.0
Other Exts: SAPI:
Probability: Blocked By:
Blocking:

Description

(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!

Change History (8)

comment:1 Changed 7 years ago by moo

can't reproduce yet, can u try to gdb it and get a backtrace?

comment:2 Changed 7 years ago by judas_iscariote

not reproducible, tested with 4.4.5RC2-dev and PHP 5.2.1RC5-dev. using svn 1,2 branch

Do you have zend_optimizer loaded too ??

comment:3 Changed 7 years ago by judas_iscariote

not reproducible with 5.1 either.

comment:4 Changed 7 years ago by moo

can u make a short yet reproducable script?

comment:5 Changed 7 years ago by moo

  • PHP Version set to =5.2.0

chernousov reports that it's in php 5.2.0 but not in 5.1.6

comment:6 Changed 7 years ago by moo

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version changed from 1.0.1 to 1.2-dev

it's a problem of 5.2.0 itself, i guess, so won't fix.

relatived resource:

comment:7 Changed 7 years ago by moo

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:8 Changed 7 years ago by moo

  • Resolution set to invalid
  • Status changed from reopened to closed

it's invalid instead of wontfix

Note: See TracTickets for help on using tickets.