Opened 2 years ago

Closed 2 years ago

Last modified 19 months ago

#297 closed defect (fixed)

Segmentation fault on php execution

Reported by: sknaetsch Owned by: moo
Priority: major Milestone: 3.0.2
Component: cacher Version: 3.0.1
Keywords: Cc:
Application: PHP Version: 5.4.10
Other Exts: SAPI: Irrelevant
Probability: Blocked By:
Blocking:

Description

Using xcache version 3.0.1 on Solaris 10 SPARC leading to coredump with php version 5.4.10.

Here are some useful information from the system and also an patch which resolved the problem on the system:

uname –a
SunOS buildhost 5.10 Generic_147440-10 sun4u sparc SUNW,SPARC-Enterprise

gcc –v
Target: sparc-sun-solaris2.10
Thread model: posix
gcc version 4.6.3 (OpenPKG-CURRENT)

Backtrace:
Reading symbols from /php...(no debugging symbols found)...done.
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `php -i'.
Program terminated with signal 10, Bus error.
#0 0xfd1f73e0 in xcache_OnUpdateULong () from /php-xcache/xcache.so
(gdb) bt
#0 0xfd1f73e0 in xcache_OnUpdateULong () from /php-xcache/xcache.so
#1 0x00527e40 in zend_register_ini_entries ()
#2 0xfd1f6188 in zm_startup_xcache () from /php-xcache/xcache.so
#3 0x005100a0 in zend_startup_module_ex ()
#4 0x0051c028 in zend_hash_apply ()
#5 0x005107dc in zend_startup_modules ()
#6 0x00458648 in php_module_startup ()
#7 0x006593c4 in ?? ()
#8 0x006593c4 in ?? ()

Patch:
--- xcache-3.0.1/xcache.c 2012-12-19 09:44:31.000000000 +0100
+++ xcache-fixed/xcache.c 2013-01-14 15:01:33.126570800 +0100
@@ -720,7 +720,7 @@
/* {{{ PHP_INI */
PHP_INI_BEGIN()

PHP_INI_ENTRY1 ("xcache.coredump_directory", "", PHP_INI_SYSTEM, xcache_OnUpdateString, &xc_coredump_dir)

  • PHP_INI_ENTRY1 ("xcache.coredump_type", "0", PHP_INI_SYSTEM, xcache_OnUpdateULong, &xc_coredump_type)

+ PHP_INI_ENTRY1 ("xcache.coredump_type", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_coredump_type)

PHP_INI_ENTRY1_EX ("xcache.disable_on_crash", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_disable_on_crash, zend_ini_boolean_displayer_cb)
PHP_INI_ENTRY1_EX ("xcache.test", "0", PHP_INI_SYSTEM, xcache_OnUpdateBool, &xc_test, zend_ini_boolean_displayer_cb)
STD_PHP_INI_BOOLEAN("xcache.experimental", "0", PHP_INI_ALL, OnUpdateBool?, experimental, zend_xcache_globals, xcache_globals)

Change History (2)

comment:1 Changed 2 years ago by moo

  • Status changed from new to assigned
  • Version changed from 3.0.0 to 3.0.1

comment:2 Changed 2 years ago by moo

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in [1230] for trunk, in [1231] for 3.0.x

Last edited 19 months ago by moo (previous) (diff)
Note: See TracTickets for help on using tickets.