midgardproject / midgard-php5

PHP5 API for Midgard persistent storage framework
http://www.midgard-project.org/api-docs/midgard/php/ratatoskr/
GNU Lesser General Public License v2.1
9 stars 2 forks source link

Segfault under Debian 6 #96

Open piotras opened 12 years ago

piotras commented 12 years ago

Copied https://github.com/midgardproject/midgard-core/issues/171

On Debian 6, I get the following segfault for every request against Apache:

Program received signal SIGSEGV, Segmentation fault. 0xb78de398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so (gdb) backtrace

0 0xb78de398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so

1 0xb69ca99b in mgd_handle () at /var/repos/midgard-php5/midgard.c:681

2 0xb69cab91 in zm_deactivate_midgard2 (type=1, module_number=45) at /var/repos/midgard-php5/midgard.c:601

3 0xb78b96e0 in ?? () from /usr/lib/apache2/modules/libphp5.so

4 0xb78c4768 in zend_hash_reverse_apply () from /usr/lib/apache2/modules/libphp5.so

5 0xb78b7f21 in ?? () from /usr/lib/apache2/modules/libphp5.so

6 0xb785c515 in php_request_shutdown () from /usr/lib/apache2/modules/libphp5.so

7 0xb794a0fc in ?? () from /usr/lib/apache2/modules/libphp5.so

8 0x00148741 in ap_run_handler ()

9 0x0014c546 in ap_invoke_handler ()

10 0x0015bd14 in ap_internal_redirect ()

11 0xb6f907fd in ?? () from /usr/lib/apache2/modules/mod_rewrite.so

12 0x00148741 in ap_run_handler ()

13 0x0014c546 in ap_invoke_handler ()

14 0x0015bec8 in ap_process_request ()

15 0x001589e8 in ?? ()

16 0x00150fc1 in ap_run_process_connection ()

17 0x00161bcc in ?? ()

18 0x00161ee1 in ?? ()

19 0x0016266f in ap_mpm_run ()

20 0x00132f8a in main ()

libgda 4.0.12-1, midgard self-compiled from latest git

flack commented 12 years ago

just a small update: I re-compiled with latest ratatoskr, and the backtrace is now slightly different:

Program received signal SIGSEGV, Segmentation fault.
0xb78df398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so
(gdb) backtrace
#0  0xb78df398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so
#1  0xb57199fb in mgd_handle () at /var/repos/midgard-php5/midgard.c:721
#2  0xb5719bf7 in zm_deactivate_midgard2 (type=1, module_number=46) at /var/repos/midgard-php5/midgard.c:641
#3  0xb78ba6e0 in ?? () from /usr/lib/apache2/modules/libphp5.so
#4  0xb78c5768 in zend_hash_reverse_apply () from /usr/lib/apache2/modules/libphp5.so
#5  0xb78b8f21 in ?? () from /usr/lib/apache2/modules/libphp5.so
#6  0xb785d515 in php_request_shutdown () from /usr/lib/apache2/modules/libphp5.so
#7  0xb794b0fc in ?? () from /usr/lib/apache2/modules/libphp5.so
#8  0x001487e1 in ap_run_handler ()
#9  0x0014c5e6 in ap_invoke_handler ()
#10 0x0015bdb4 in ap_internal_redirect ()
#11 0xb6f737fd in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#12 0x001487e1 in ap_run_handler ()
#13 0x0014c5e6 in ap_invoke_handler ()
#14 0x0015bf68 in ap_process_request ()
#15 0x00158a88 in ?? ()
#16 0x00151061 in ap_run_process_connection ()
#17 0x00161e0c in ?? ()
#18 0x00162121 in ?? ()
#19 0x001628af in ap_mpm_run ()
#20 0x00132f8a in main ()
flack commented 11 years ago

Another update: I recompiled with gjallarhorn, and now the backtrace line numbers changed again, but it's essentially the same AFAICT:

Program received signal SIGSEGV, Segmentation fault.
0xb78db398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so
(gdb) backtrace
#0  0xb78db398 in zend_object_store_get_object () from /usr/lib/apache2/modules/libphp5.so
#1  0xb5710ebb in mgd_handle () at /var/repos/midgard-php5/midgard.c:736
#2  0xb57110b7 in zm_deactivate_midgard2 (type=1, module_number=46) at /var/repos/midgard-php5/midgard.c:656
#3  0xb78b66e0 in ?? () from /usr/lib/apache2/modules/libphp5.so
#4  0xb78c1768 in zend_hash_reverse_apply () from /usr/lib/apache2/modules/libphp5.so
#5  0xb78b4f21 in ?? () from /usr/lib/apache2/modules/libphp5.so
#6  0xb7859515 in php_request_shutdown () from /usr/lib/apache2/modules/libphp5.so
#7  0xb79470fc in ?? () from /usr/lib/apache2/modules/libphp5.so
#8  0x001487e1 in ap_run_handler ()
#9  0x0014c5e6 in ap_invoke_handler ()
#10 0x0015bdb4 in ap_internal_redirect ()
#11 0xb6f6f7fd in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#12 0x001487e1 in ap_run_handler ()
#13 0x0014c5e6 in ap_invoke_handler ()
#14 0x0015bf68 in ap_process_request ()
#15 0x00158a88 in ?? ()
#16 0x00151061 in ap_run_process_connection ()
#17 0x00161e0c in ?? ()
#18 0x00162121 in ?? ()
#19 0x001628af in ap_mpm_run ()
#20 0x00132f8a in main ()
flack commented 11 years ago

Seems related to https://github.com/midgardproject/midgard-php5/issues/39