По почкам Segmentation fault`ом

Bagroff

Новичок
По почкам Segmentation fault`ом

Замаялся уже, даже отпуск не помог...

При некоторой `логической цепочке` запросов клиента к httpd падаем. Строгая последовательность - невыявлена :(, падаем по-разному, после разных клиентских запросов...

Под gdb слезы, такие:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213847888 (LWP 16239)]
0xb7c74f6e in free () from /lib/libc.so.6
(gdb) bt
#0 0xb7c74f6e in free () from /lib/libc.so.6
#1 0xb77deb11 in zend_hash_apply_deleter (ht=0x803cfb90, p=0x1) at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:811
#2 0xb77debee in zend_hash_reverse_apply (ht=0x800b4798, apply_func=0xb77c4240 <clean_non_persistent_constant>)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#3 0xb77c5138 in clean_non_persistent_constants () at /usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#4 0xb77c6ab4 in shutdown_executor () at /usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#5 0xb77d3ecf in zend_deactivate () at /usr/src/debug/php-5.2.3/Zend/zend.c:941
#6 0xb778a79d in php_request_shutdown (dummy=0x0) at /usr/src/debug/php-5.2.3/main/main.c:1323
#7 0xb785a41c in php_handler (r=0x803b5e18) at /usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#8 0x8002f94d in ap_run_handler (r=0x803b5e18) at config.c:157
#9 0x80033227 in ap_invoke_handler (r=0x803b5e18) at config.c:372
#10 0x8003f084 in ap_internal_redirect (new_uri=0x803b99e8 "/infin.php?query=start/1/666666", r=0x803b0b88)
at http_request.c:477
#11 0xb790dc10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#12 0x803b99e8 in ?? ()
#13 0x803b0b88 in ?? ()
#14 0xb791267f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#15 0x803b9990 in ?? ()
#16 0x00000000 in ?? ()

У меня, такое ощущение, что это стало плохо garbage collector`y. Как такие вещи вобще лечить?
 

Bagroff

Новичок
И сяк и эдак, и раком и боком... и 5.2.4 снапшотный, когда ещё релиза не было... все одно.

Ещё такой вариант, к примеру...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213794640 (LWP 16371)]
xmlFreeNodeList__internal_alias (cur=0x3a746978) at tree.c:3364
3364 if (cur->type == XML_NAMESPACE_DECL) {
(gdb) bt
#0 xmlFreeNodeList__internal_alias (cur=0x3a746978) at tree.c:3364
#1 0xb755f556 in xmlFreeNodeList__internal_alias (cur=0x803cfad0) at tree.c:3386
#2 0xb755f556 in xmlFreeNodeList__internal_alias (cur=0x8040c968) at tree.c:3386
#3 0xb755f37b in xmlFreeDoc__internal_alias (cur=0x8040c8c8) at tree.c:1216
#4 0xb76aaa6a in php_libxml_decrement_doc_ref (object=0xb2424288) at /usr/src/debug/php-5.2.3/ext/libxml/libxml.c:966
#5 0xb76aacbd in php_libxml_node_decrement_resource (object=0xb2424288)
at /usr/src/debug/php-5.2.3/ext/libxml/libxml.c:1039
#6 0xb7370264 in dom_objects_free_storage (object=0xb2424288) at /usr/src/debug/php-5.2.3/ext/dom/php_dom.c:974
#7 0xb78010da in zend_objects_store_del_ref_by_handle (handle=71) at /usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:206
#8 0xb7801128 in zend_objects_store_del_ref (zobject=0xb240a00c) at /usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:168
#9 0xb77e07b9 in _zval_dtor_func (zvalue=0xb240a00c) at /usr/src/debug/php-5.2.3/Zend/zend_variables.c:52
#10 0xb77d3458 in _zval_ptr_dtor (zval_ptr=0xbfa394d0) at /usr/src/debug/php-5.2.3/Zend/zend_variables.h:35
#11 0xb7800372 in zend_std_write_property (object=0xb74508f4, member=0xb27728fc, value=0xb2409cac)
at /usr/src/debug/php-5.2.3/Zend/zend_object_handlers.c:415
#12 0xb2f33296 in get_module () from /usr/local/Zend/Platform/lib/Optimizer-3.2.6/php-5.2.x/ZendOptimizer.so
#13 0xb74508f4 in ?? ()
#14 0xb27728fc in ?? ()
#15 0xb2409cac in ?? ()
#16 0xb78f6d34 in ?? () from /usr/lib/apache2/mod_php5.so
#17 0xb78f6d34 in ?? () from /usr/lib/apache2/mod_php5.so
#18 0xb7912760 in sapi_module () from /usr/lib/apache2/mod_php5.so
#19 0xbfa3a4d8 in ?? ()
#20 0xb77c459e in _zend_mm_alloc_int (heap=0x3a746978, size=3084099936) at /usr/src/debug/php-5.2.3/Zend/zend_alloc.c:1785
Previous frame inner to this frame (corrupt stack?)
(gdb)
 

EugeneVC

Новичок
обычно делают так
собираеют с включеным debug режимом
делают что бы записывалась корка
и потом по корке смотрят что произошло

ключевые слова:
gcc -O0 -ggdb3
ulimit -c 30000000
gdb ddd kdbg
 

Alexandre

PHPПенсионер
во втором случае падает libxml
в первом libc (?)

пересобери пхп и libxml
 

Bagroff

Новичок
Все это безобразие проявлялось на sles10. Поставил под vmware openSuse. Накатил апач, пхп... проблемы остались. Те же.

-~{}~ 21.09.07 14:47:

EugeneVC

http://httpd.apache.org/dev/debugging.html
Сделал, как доктор прописал. Получил корку, потом gdb httpd2 core

Получил, весьма "информативный" бэктрейс...
(gdb) bt full
#0 0xb7f99410 in ?? ()
No symbol table info available.
#1 0xb74672d8 in ?? ()
No symbol table info available.
#2 0x000000ed in ?? ()
No symbol table info available.
#3 0x00000000 in ?? ()
No symbol table info available.
 
Сверху