Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault in ViewSimpleTest::testRenderWithCache #1607

Closed
ghost opened this issue Nov 27, 2013 · 2 comments
Closed

Segmentation Fault in ViewSimpleTest::testRenderWithCache #1607

ghost opened this issue Nov 27, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 27, 2013

PHP 5.3.3

$ $(phpenv which php) ./unit-tests/ci/phpunit.php --debug -c unit-tests/phpunit.xml --filter ViewSimpleTest::testRenderWithCache
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /home/vladimir/workspace/cphalcon/unit-tests/phpunit.xml


Starting test 'ViewSimpleTest::testRenderWithCache'.
.

Time: 1 second, Memory: 22.25Mb

OK (1 test, 6 assertions)
Помилка адресування (збережено знімок оперативної пам’яті)
Program terminated with signal 11, Segmentation fault.
#0  0x000000000074ed9e in gc_zval_possible_root (zv=0x344c070, tsrm_ls=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_gc.c:143
143                     GC_ZOBJ_CHECK_POSSIBLE_ROOT(zv);
(gdb) bt
#0  0x000000000074ed9e in gc_zval_possible_root (zv=0x344c070, tsrm_ls=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_gc.c:143
#1  0x000000000073d738 in zend_hash_destroy (ht=0x2c78928) at /tmp/php-build/source/5.3.3/Zend/zend_hash.c:526
#2  0x0000000000750169 in zend_object_std_dtor (object=0x344c158, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:45
#3  0x0000000000750189 in zend_objects_free_object_storage (object=0x344c158, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:128
#4  0x000000000075438a in zend_objects_store_del_ref_by_handle_ex (handle=126, handlers=<optimized out>, tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:220
#5  0x00000000007543be in zend_objects_store_del_ref (zobject=0x344bc88, tsrm_ls=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:172
#6  0x000000000072136d in _zval_dtor (zvalue=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_variables.h:35
#7  _zval_ptr_dtor (zval_ptr=0x3452d58) at /tmp/php-build/source/5.3.3/Zend/zend_execute_API.c:443
#8  0x000000000073d738 in zend_hash_destroy (ht=0x3104df8) at /tmp/php-build/source/5.3.3/Zend/zend_hash.c:526
#9  0x00007f1c53aded4c in phalcon_di_dtor (v=0x343f930, tsrm_ls=0x1c950c0) at /home/vladimir/workspace/cphalcon/ext/di.c:409
#10 0x000000000075438a in zend_objects_store_del_ref_by_handle_ex (handle=129, handlers=<optimized out>, tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:220
#11 0x00000000007543be in zend_objects_store_del_ref (zobject=0x3412f38, tsrm_ls=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:172
#12 0x000000000072136d in _zval_dtor (zvalue=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_variables.h:35
#13 _zval_ptr_dtor (zval_ptr=0x3452990) at /tmp/php-build/source/5.3.3/Zend/zend_execute_API.c:443
#14 0x000000000073d738 in zend_hash_destroy (ht=0x30a9b08) at /tmp/php-build/source/5.3.3/Zend/zend_hash.c:526
#15 0x0000000000750169 in zend_object_std_dtor (object=0x344e580, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:45
#16 0x0000000000750189 in zend_objects_free_object_storage (object=0x344e580, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:128
#17 0x000000000075438a in zend_objects_store_del_ref_by_handle_ex (handle=130, handlers=<optimized out>, tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:220
#18 0x00000000007543be in zend_objects_store_del_ref (zobject=0x33fdd40, tsrm_ls=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:172
#19 0x000000000072136d in _zval_dtor (zvalue=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_variables.h:35
#20 _zval_ptr_dtor (zval_ptr=0x34511b8) at /tmp/php-build/source/5.3.3/Zend/zend_execute_API.c:443
#21 0x000000000073d738 in zend_hash_destroy (ht=0x3033e90) at /tmp/php-build/source/5.3.3/Zend/zend_hash.c:526
#22 0x0000000000750169 in zend_object_std_dtor (object=0x3450f50, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:45
#23 0x0000000000750189 in zend_objects_free_object_storage (object=0x3450f50, tsrm_ls=<optimized out>) at /tmp/php-build/source/5.3.3/Zend/zend_objects.c:128
#24 0x0000000000753da0 in zend_objects_store_free_object_storage (objects=0x1c99988, tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_objects_API.c:92
#25 0x0000000000721d27 in shutdown_executor (tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend_execute_API.c:302
#26 0x0000000000730891 in zend_deactivate (tsrm_ls=tsrm_ls@entry=0x1c950c0) at /tmp/php-build/source/5.3.3/Zend/zend.c:890
#27 0x00000000006d5e9d in php_request_shutdown (dummy=dummy@entry=0x0) at /tmp/php-build/source/5.3.3/main/main.c:1633
#28 0x00000000004296d0 in main (argc=7, argv=0x7fff04dbc238) at /tmp/php-build/source/5.3.3/sapi/cli/php_cli.c:1373
@ghost
Copy link
Author

ghost commented Nov 27, 2013

==19853== Invalid read of size 4
==19853==    at 0x72132B: _zval_ptr_dtor (zend.h:385)
==19853==    by 0x73D737: zend_hash_destroy (zend_hash.c:526)
==19853==    by 0x750168: zend_object_std_dtor (zend_objects.c:45)
==19853==    by 0x750188: zend_objects_free_object_storage (zend_objects.c:128)
==19853==    by 0x753D9F: zend_objects_store_free_object_storage (zend_objects_API.c:92)
==19853==    by 0x721D26: shutdown_executor (zend_execute_API.c:302)
==19853==    by 0x730890: zend_deactivate (zend.c:890)
==19853==    by 0x6D5E9C: php_request_shutdown (main.c:1633)
==19853==    by 0x4296CF: main (php_cli.c:1373)
==19853==  Address 0x9a7b380 is 16 bytes inside a block of size 32 free'd
==19853==    at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19853==    by 0x7754BA3: phalcon_memory_restore_stack_common (memory.c:162)
==19853==    by 0x7754D84: phalcon_memory_restore_stack (memory.c:217)
==19853==    by 0x78229C1: zim_Phalcon_Mvc_View_Simple_render (simple.c:513)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853==    by 0x7236DC: zend_call_function (zend_execute_API.c:963)
==19853==    by 0x5B92E4: zim_reflection_method_invokeArgs (php_reflection.c:2738)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853== 
==19853== Invalid write of size 4
==19853==    at 0x721333: _zval_ptr_dtor (zend.h:385)
==19853==    by 0x73D737: zend_hash_destroy (zend_hash.c:526)
==19853==    by 0x750168: zend_object_std_dtor (zend_objects.c:45)
==19853==    by 0x750188: zend_objects_free_object_storage (zend_objects.c:128)
==19853==    by 0x753D9F: zend_objects_store_free_object_storage (zend_objects_API.c:92)
==19853==    by 0x721D26: shutdown_executor (zend_execute_API.c:302)
==19853==    by 0x730890: zend_deactivate (zend.c:890)
==19853==    by 0x6D5E9C: php_request_shutdown (main.c:1633)
==19853==    by 0x4296CF: main (php_cli.c:1373)
==19853==  Address 0x9a7b380 is 16 bytes inside a block of size 32 free'd
==19853==    at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19853==    by 0x7754BA3: phalcon_memory_restore_stack_common (memory.c:162)
==19853==    by 0x7754D84: phalcon_memory_restore_stack (memory.c:217)
==19853==    by 0x78229C1: zim_Phalcon_Mvc_View_Simple_render (simple.c:513)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853==    by 0x7236DC: zend_call_function (zend_execute_API.c:963)
==19853==    by 0x5B92E4: zim_reflection_method_invokeArgs (php_reflection.c:2738)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853== 
==19853== Invalid read of size 4
==19853==    at 0x721388: _zval_ptr_dtor (zend_execute_API.c:449)
==19853==    by 0x73D737: zend_hash_destroy (zend_hash.c:526)
==19853==    by 0x750168: zend_object_std_dtor (zend_objects.c:45)
==19853==    by 0x750188: zend_objects_free_object_storage (zend_objects.c:128)
==19853==    by 0x753D9F: zend_objects_store_free_object_storage (zend_objects_API.c:92)
==19853==    by 0x721D26: shutdown_executor (zend_execute_API.c:302)
==19853==    by 0x730890: zend_deactivate (zend.c:890)
==19853==    by 0x6D5E9C: php_request_shutdown (main.c:1633)
==19853==    by 0x4296CF: main (php_cli.c:1373)
==19853==  Address 0x9a7b380 is 16 bytes inside a block of size 32 free'd
==19853==    at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19853==    by 0x7754BA3: phalcon_memory_restore_stack_common (memory.c:162)
==19853==    by 0x7754D84: phalcon_memory_restore_stack (memory.c:217)
==19853==    by 0x78229C1: zim_Phalcon_Mvc_View_Simple_render (simple.c:513)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853==    by 0x7236DC: zend_call_function (zend_execute_API.c:963)
==19853==    by 0x5B92E4: zim_reflection_method_invokeArgs (php_reflection.c:2738)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853== 
==19853== Invalid read of size 1
==19853==    at 0x72138E: _zval_ptr_dtor (zend_gc.h:182)
==19853==    by 0x73D737: zend_hash_destroy (zend_hash.c:526)
==19853==    by 0x750168: zend_object_std_dtor (zend_objects.c:45)
==19853==    by 0x750188: zend_objects_free_object_storage (zend_objects.c:128)
==19853==    by 0x753D9F: zend_objects_store_free_object_storage (zend_objects_API.c:92)
==19853==    by 0x721D26: shutdown_executor (zend_execute_API.c:302)
==19853==    by 0x730890: zend_deactivate (zend.c:890)
==19853==    by 0x6D5E9C: php_request_shutdown (main.c:1633)
==19853==    by 0x4296CF: main (php_cli.c:1373)
==19853==  Address 0x9a7b384 is 20 bytes inside a block of size 32 free'd
==19853==    at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19853==    by 0x7754BA3: phalcon_memory_restore_stack_common (memory.c:162)
==19853==    by 0x7754D84: phalcon_memory_restore_stack (memory.c:217)
==19853==    by 0x78229C1: zim_Phalcon_Mvc_View_Simple_render (simple.c:513)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853==    by 0x7236DC: zend_call_function (zend_execute_API.c:963)
==19853==    by 0x5B92E4: zim_reflection_method_invokeArgs (php_reflection.c:2738)
==19853==    by 0x773D50C: phalcon_execute_internal (phalcon.c:385)
==19853==    by 0x7BF4FD: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:318)
==19853==    by 0x754935: execute (zend_vm_execute.h:107)
==19853== 

@ghost
Copy link
Author

ghost commented Nov 28, 2013

Dump of the memory frame:

Dump of the memory frame 0x6f7d7b0
Obs var 0 (0x7feffd2d8 => 0x836cce0), type=5, refcnt=1; value=object(4), Phalcon\Cache\Backend\Memory
Obs var 1 (0x7feffd2e0 => 0x836cf80), type=3, refcnt=1; value=(bool)1
Obs var 2 (0x7feffd2e8 => 0x836b8e0), type=6, refcnt=2; value=view_simple_cache
Obs var 3 (0x7feffd2f0 => 0x836d130), type=0, refcnt=1; value=NULL
Obs var 4 (0x7feffd2f8 => 0x836ba30), type=4, refcnt=2; value=array(0x836b7d0), 1 elements
Obs var 5 (0x7feffd300 => 0x8386a70), type=6, refcnt=1; value=<p>1385599105</p>
Obs var 6 (0x7feffd308 => 0x836c960), type=4, refcnt=3; value=array(0x836c9c0), 1 elements
Obs var 7 (0x7feffd310 => 0x836c960), type=4, refcnt=3; value=array(0x836c9c0), 1 elements
Obs var 8 (0x7feffd318 => 0x8386d40), type=3, refcnt=1; value=(bool)1
End of the dump of the memory frame 0x6f7d7b0

Something points to the area between obs var 5 and 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant