Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Doucet odoucet

  • OXEVA
  • Paris, France
View GitHub Profile
@odoucet
odoucet / gist:8918221
Created Feb 10, 2014
#64827 with PHP 5.4.25 backtrace
View gist:8918221
#0 zval_mark_grey (pz=0x1419fd0) at /usr/src/build/php/php-5.4.25/Zend/zend_gc.c:388
#1 0x00000000007fdeb5 in zval_mark_grey (pz=0x1419fd0) at /usr/src/build/php/php-5.4.25/Zend/zend_gc.c:432
#2 0x00000000007fedd5 in gc_mark_roots () at /usr/src/build/php/php-5.4.25/Zend/zend_gc.c:501
#3 gc_collect_cycles () at /usr/src/build/php/php-5.4.25/Zend/zend_gc.c:795
#4 0x00000000007ff028 in gc_zobj_possible_root (zv=<optimized out>) at /usr/src/build/php/php-5.4.25/Zend/zend_gc.c:221
#5 0x00000000007ec0a0 in zend_hash_destroy (ht=0x1c63710) at /usr/src/build/php/php-5.4.25/Zend/zend_hash.c:560
#6 0x00000000007ddd9d in _zval_dtor_func (zvalue=0x1c64288) at /usr/src/build/php/php-5.4.25/Zend/zend_variables.c:45
#7 0x00000000007d0dad in _zval_dtor (zvalue=<optimized out>) at /usr/src/build/php/php-5.4.25/Zend/zend_variables.h:35
#8 _zval_ptr_dtor (zval_ptr=0x1c6b0d0) at /usr/src/build/php/php-5.4.25/Zend/zend_execute_API.c:436
#9 0x0000000000801167 in zend_object_std_dtor (object=0x1c13e88) at /usr/src/build/
@odoucet
odoucet / rrdtool.inc.php
Created Oct 16, 2013
rrdtool library replacement for Observium. Work in progress
View rrdtool.inc.php
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage rrdtool
* @author Adam Armstrong <adama@memetic.org>
@odoucet
odoucet / gist:6794216
Created Oct 2, 2013
Add block <default_priority> at cache level. set it to 10 to write to cache even if it's close to full.
View gist:6794216
Index: app/code/core/Mage/Core/Model/Cache.php
===================================================================
--- app/code/core/Mage/Core/Model/Cache.php (revision 124392)
+++ app/code/core/Mage/Core/Model/Cache.php (working copy)
@@ -44,7 +44,7 @@
/**
* Cache frontend API
*
- * @var Zend_Cache_Core
+ * @var Varien_Cache_Core
@odoucet
odoucet / gist:5842361
Created Jun 22, 2013
ArrayObject implementation
View gist:5842361
<?php
if (!class_exists('ArrayObject')) {
class ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
{
const STD_PROP_LIST = 1;
const ARRAY_AS_PROPS = 2;
protected $_array = array();
protected $_flags = 0;
View gist:5796378
#0 zend_objects_store_del_ref_by_handle_ex (handle=47, handlers=0x101b440)
at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_objects_API.c:183
#1 0x000000000082eb43 in zend_objects_store_del_ref (zobject=0x1570d48)
at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_objects_API.c:173
#2 0x00000000007f60f8 in _zval_dtor (zvalue=<optimized out>) at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_variables.h:35
#3 i_zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_execute.h:81
#4 _zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_execute_API.c:426
#5 0x0000000000828cc7 in zend_object_std_dtor (object=0x2244070) at /usr/src/build/php/php-src-zval_mark_grey_tail_recursion/Zend/zend_objects.c:54
#6 0x0000000000828cf9 in zend_objects_free_object_storage (object=0x2f) at /usr/src/build/php/php-src-zval_mark_grey_tail_recursio
@odoucet
odoucet / gist:5609218
Created May 19, 2013
backtrace PHP 5.5.0rc1
View gist:5609218
#0 zval_mark_grey (pz=0x1ebb198) at /usr/src/build/php-5.5.0RC1/Zend/zend_gc.c:388
#1 0x0000000000823d95 in zval_mark_grey (pz=0x1ebb198) at /usr/src/build/php-5.5.0RC1/Zend/zend_gc.c:432
#2 0x0000000000824cb5 in gc_mark_roots () at /usr/src/build/php-5.5.0RC1/Zend/zend_gc.c:501
#3 gc_collect_cycles () at /usr/src/build/php-5.5.0RC1/Zend/zend_gc.c:795
#4 0x0000000000825040 in gc_zval_possible_root (zv=<optimized out>) at /usr/src/build/php-5.5.0RC1/Zend/zend_gc.c:166
#5 0x0000000000811fc0 in zend_hash_destroy (ht=0x3561738) at /usr/src/build/php-5.5.0RC1/Zend/zend_hash.c:560
#6 0x00000000008038dd in _zval_dtor_func (zvalue=0x3592ce8) at /usr/src/build/php-5.5.0RC1/Zend/zend_variables.c:45
#7 0x00000000007f5868 in _zval_dtor (zvalue=<optimized out>) at /usr/src/build/php-5.5.0RC1/Zend/zend_variables.h:35
#8 i_zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/build/php-5.5.0RC1/Zend/zend_execute.h:81
#9 _zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/build/php-5.5.0RC1/Zend/zend_execute_API.c
@odoucet
odoucet / gist:5600630
Last active Dec 17, 2015
Rollback kernel commit f51d67a64f32cd81ea8b67ca964fb7cf7e783b2e that introduced a ~20% performance drop on some benchmarks
View gist:5600630
--- linux-3.9.2/kernel/power/qos.c 2013-05-11 16:19:28.000000000 +0200
+++ linux-3.9.2/kernel/power/qos.c 2013-05-17 19:07:35.907312364 +0200
@@ -283,7 +283,8 @@
*/
int pm_qos_request(int pm_qos_class)
{
- return pm_qos_read_value(pm_qos_array[pm_qos_class]->constraints);
+ return 0;
+ // return pm_qos_read_value(pm_qos_array[pm_qos_class]->constraints);
}
@odoucet
odoucet / gist:5571720
Created May 13, 2013
debug backtrace when segfault from PHP 5.4.15 + ZendOptimizerPlus
View gist:5571720
(gdb) bt
#0 zval_mark_grey (pz=0x272afb8) at /usr/src/build/php-5.4.15/Zend/zend_gc.c:388
#1 0x00000000007fafe5 in zval_mark_grey (pz=0x272afb8) at /usr/src/build/php-5.4.15/Zend/zend_gc.c:432
#2 0x00000000007fbf05 in gc_mark_roots () at /usr/src/build/php-5.4.15/Zend/zend_gc.c:501
#3 gc_collect_cycles () at /usr/src/build/php-5.4.15/Zend/zend_gc.c:795
#4 0x00000000007fc290 in gc_zval_possible_root (zv=<optimized out>) at /usr/src/build/php-5.4.15/Zend/zend_gc.c:166
#5 0x00000000007fe297 in zend_object_std_dtor (object=0x390ab38) at /usr/src/build/php-5.4.15/Zend/zend_objects.c:54
#6 0x00000000007fe2c9 in zend_objects_free_object_storage (object=0x272afb8) at /usr/src/build/php-5.4.15/Zend/zend_objects.c:137
#7 0x000000000080406b in zend_objects_store_del_ref_by_handle_ex (handle=<optimized out>, handlers=<optimized out>) at /usr/src/build/php-5.4.15/Zend/zend_objects_API.c:221
#8 0x0000000000804093 in zend_objects_store_del_ref (zobject=0x390b088) at /usr/src/build/php-5.4.15/Zend/zend_objects_API.
@odoucet
odoucet / gist:5461450
Created Apr 25, 2013
PHP 5.4.11 segfault
View gist:5461450
Program received signal SIGSEGV, Segmentation fault.
zval_mark_grey (pz=0x12abcd8) at /usr/src/build/php-5.4.11/Zend/zend_gc.c:388
388 /usr/src/build/php-5.4.11/Zend/zend_gc.c: No such file or directory.
(gdb) bt
#0 zval_mark_grey (pz=0x12abcd8) at /usr/src/build/php-5.4.11/Zend/zend_gc.c:388
#1 0x00000000007f8495 in zval_mark_grey (pz=0x12abcd8) at /usr/src/build/php-5.4.11/Zend/zend_gc.c:432
#2 0x00000000007f93b5 in gc_mark_roots () at /usr/src/build/php-5.4.11/Zend/zend_gc.c:501
#3 gc_collect_cycles () at /usr/src/build/php-5.4.11/Zend/zend_gc.c:795
#4 0x00000000007f9740 in gc_zval_possible_root (zv=<optimized out>) at /usr/src/build/php-5.4.11/Zend/zend_gc.c:166
#5 0x00000000007e68d0 in zend_hash_destroy (ht=0x29455a0) at /usr/src/build/php-5.4.11/Zend/zend_hash.c:560
@odoucet
odoucet / gist:4773390
Created Feb 12, 2013
Working 3.7.1 kernel .config
View gist:4773390
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.7.1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
You can’t perform that action at this time.