Bug 181518 - phpldapadmin crashes apache php
Summary: phpldapadmin crashes apache php
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: 5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
: 186614 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-14 19:50 UTC by Erwin Rol
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-17 12:17:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Erwin Rol 2006-02-14 19:50:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1) Gecko/20060207 Fedora/1.5.0.1-2.1 Firefox/1.5.0.1

Description of problem:
When trying to login with phpldapadmin apache crashes with a sigsegv.

On the phpldapadmin site the following is mentioned, maybe it is the same thing. 

PHP/Zend: as soon as Zend Optimizer 2.5.10a is installed and enabled, it crashes. Cause unknown.

The backtrace of the apache core is as follows. 


#0  0x00002aaaab200826 in ldap_set_option () from /usr/lib64/libldap-2.3.so.0
#1  0x00002aaab2501e9b in zif_ldap_set_option (ht=Variable "ht" is not available.
) at /usr/src/debug/php-5.1.2/ext/ldap/ldap.c:1860
#2  0x00002aaab0628a5e in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffe427a0) at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:192
#3  0x00002aaab061a3cc in execute (op_array=0x5555559782f8) at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:92
#4  0x00002aaab06284ea in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffe443e0) at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:226
#5  0x00002aaab061a3cc in execute (op_array=0x55555592f7d8) at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:92
#6  0x00002aaab05fd79e in zend_execute_scripts (type=8, retval=Variable "retval" is not available.
) at /usr/src/debug/php-5.1.2/Zend/zend.c:1101
#7  0x00002aaab05c2c46 in php_execute_script (primary_file=0x7fffffe46980) at /usr/src/debug/php-5.1.2/main/main.c:1720
#8  0x00002aaab067a604 in php_handler (r=0x555555923538) at /usr/src/debug/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584
#9  0x000055555557df5a in ap_run_handler (r=0x555555923538) at /usr/src/debug/httpd-2.2.0/server/config.c:157
#10 0x00005555555813b2 in ap_invoke_handler (r=0x555555923538) at /usr/src/debug/httpd-2.2.0/server/config.c:371
#11 0x000055555558bc28 in ap_process_request (r=0x555555923538) at /usr/src/debug/httpd-2.2.0/modules/http/http_request.c:258
#12 0x0000555555588ec0 in ap_process_http_connection (c=0x555555919358) at /usr/src/debug/httpd-2.2.0/modules/http/http_core.c:171
#13 0x0000555555585192 in ap_run_process_connection (c=0x555555919358) at /usr/src/debug/httpd-2.2.0/server/connection.c:43
#14 0x000055555558f5fb in child_main (child_num_arg=Variable "child_num_arg" is not available.
) at /usr/src/debug/httpd-2.2.0/server/mpm/prefork/prefork.c:640
#15 0x000055555558f88a in make_child (s=0x5555556b2de8, slot=4) at /usr/src/debug/httpd-2.2.0/server/mpm/prefork/prefork.c:736
#16 0x000055555558f940 in startup_children (number_to_start=4) at /usr/src/debug/httpd-2.2.0/server/mpm/prefork/prefork.c:754
#17 0x0000555555590636 in ap_mpm_run (_pconf=Variable "_pconf" is not available.
) at /usr/src/debug/httpd-2.2.0/server/mpm/prefork/prefork.c:975
#18 0x000055555556b59c in main (argc=1, argv=0x7fffffe46f68) at /usr/src/debug/httpd-2.2.0/server/main.c:712



Version-Release number of selected component (if applicable):
phpldapadmin-0.9.7.2-2  php-5.1.2-4.3 httpd-2.2.0-5.1.2

How reproducible:
Always

Steps to Reproduce:
1. load the phpldapadmin page 
2. click login
3. enter login or use ano. login
4. press enter

  

Actual Results:  a save as dialog apears with the question to save the file login.php. This is probably because the browser gets no document at all and so doesn't know if it is html or not.

Expected Results:  The normal phpldapadmin page.

Additional info:

Comment 1 Erwin Rol 2006-02-17 00:09:05 UTC
I got a mail with the following info.

--
First: I have the same problem as you have with phpldapadmin, but on FC4 with
updated OpenLDAP 2.3.19 !!! Seems OpenLDAP related. In my case, eGroupWare also
stopped functioning with the same error: httpd stops.
--

So I think this is not php but more a openldap lib problem. 
I changed the component to openldap.


Comment 2 Rafał Dutko 2006-03-27 07:46:51 UTC
*** Bug 186614 has been marked as a duplicate of this bug. ***

Comment 3 Joe Orton 2006-03-27 10:25:29 UTC
1) is this reproducible without Zend Optimizer?

2) What LDAP option is being set here?  Can someone "yum install php-debuginfo"
and regenerate the backtrace?

Comment 4 Rafał Dutko 2006-03-28 14:24:42 UTC
Backtrace from apache. 
 
I have found two core files, this one is a first backtrace 
 
#0  ldap_set_option (ld=0x5597d8f0, option=17, invalue=0x7fffffabd838) 
at ../../../libraries/libldap/options.c:358 
        lo = Variable "lo" is not available. 
 
Second one was identical. 
 
php-debuginfo and openldap-debuginfo was installed. 
 

Comment 5 Joe Orton 2006-03-28 14:32:07 UTC
Can you get backtraces with just "bt" rather than "bt full", since they are
truncated?

Comment 6 Rafał Dutko 2006-03-28 14:35:25 UTC
Done. 
 
#0  ldap_set_option (ld=0x559798d0, option=17, invalue=0x7fffffc6c498) 
at ../../../libraries/libldap/options.c:358 
#1  0x00002b263c07fe9b in zif_ldap_set_option (ht=Variable "ht" is not 
available. 
) at /usr/src/debug/php-5.1.2/ext/ldap/ldap.c:1860 
#2  0x00002b263a1c1a6e in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffffc6ead0) 
    at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:192 
#3  0x00002b263a1b33dc in execute (op_array=0x55555598f088) 
at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:92 
#4  0x00002b263a1c14fa in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fffffc70710) 
    at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:226 
#5  0x00002b263a1b33dc in execute (op_array=0x555555971198) 
at /usr/src/debug/php-5.1.2/Zend/zend_vm_execute.h:92 
#6  0x00002b263a1967ae in zend_execute_scripts (type=8, retval=Variable 
"retval" is not available. 
) at /usr/src/debug/php-5.1.2/Zend/zend.c:1101 
#7  0x00002b263a15bc46 in php_execute_script (primary_file=0x7fffffc72cb0) 
at /usr/src/debug/php-5.1.2/main/main.c:1720 
#8  0x00002b263a213614 in php_handler (r=0x55555595cf28) 
at /usr/src/debug/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584 
#9  0x000055555557df5a in ap_run_handler () from /usr/sbin/httpd 
#10 0x00005555555813b2 in ap_invoke_handler () from /usr/sbin/httpd 
#11 0x000055555558bc28 in ap_process_request () from /usr/sbin/httpd 
#12 0x0000555555588ec0 in ap_register_input_filter () from /usr/sbin/httpd 
#13 0x0000555555585192 in ap_run_process_connection () from /usr/sbin/httpd 
#14 0x000055555558f5fb in ap_graceful_stop_signalled () from /usr/sbin/httpd 
#15 0x000055555558f88a in ap_graceful_stop_signalled () from /usr/sbin/httpd 
#16 0x000055555558f940 in ap_graceful_stop_signalled () from /usr/sbin/httpd 
#17 0x0000555555590636 in ap_mpm_run () from /usr/sbin/httpd 
#18 0x000055555556b59c in main () from /usr/sbin/httpd 
 

Comment 7 Ola Thoresen 2006-04-06 20:24:35 UTC
Could this be a related issue?
http://thread.gmane.org/gmane.comp.horde.user/14474/focus=14474


Comment 8 Joe Orton 2006-04-07 08:28:16 UTC
Bets are this is the same root cause as bug 188073 - it's a one-line spec file
fix, I'll produce test packages shortly, hang on.

Comment 9 Joe Orton 2006-04-07 13:48:05 UTC
Please try the packages in updates-testing:

  # yum --enablerepo=updates-testing update php


Comment 10 Ola Thoresen 2006-04-07 14:18:51 UTC
The updates-testing packages seems to work fine, but they seem to have a _lot_
of debug enabled.
My logs are filled with these:

Apr  7 16:18:34 poseidon httpd: [0.002] template_engine.php(1):
get_cached_item(): Returning MEMORY cached [schema] (attributes)
Apr  7 16:18:34 poseidon httpd: template_engine.php(1): get_cached_item():
Returning MEMORY cached [schema] (attributes)
Apr  7 16:18:34 poseidon httpd: [0.003] template_engine.php(1):
get_cached_item(): Entered with (0,schema,attributes), Returning (298)

Comment 11 Joe Orton 2006-04-07 14:21:43 UTC
Thanks for the feedback.  The log output seems to be coming from your web
application, not php itself.

Comment 12 Ola Thoresen 2006-04-07 14:31:32 UTC
Sorry. You are right.  I had enabled a _lot_ of debug in phpldapadmin to find
out what was wrong.

Great.  Thanks a lot!

Comment 13 Rafał Dutko 2006-04-07 16:17:30 UTC
(In reply to comment #9) 
> Please try the packages in updates-testing: 
>  
>   # yum --enablerepo=updates-testing update php 
>  
 
There is some change, but still not working. I can login - either anonymously 
or as user but then apache thread quits with message: 
 
Allowed memory size of 8388608 bytes exhausted (tried to allocate 144 bytes) 
Allowed memory size of 8388608 bytes exhausted (tried to allocate 144 bytes) 
Allowed memory size of 8388608 bytes exhausted (tried to allocate 85 bytes) 
Allowed memory size of 8388608 bytes exhausted (tried to allocate 85 bytes) 
Allowed memory size of 8388608 bytes exhausted (tried to allocate 85 bytes) 
 
Rafal 
 

Comment 14 Joe Orton 2006-05-17 12:17:24 UTC
The 64-bit issue is fixed; if the memory_limit is legitimately being exceeded by
your app on x86_64 you may need to increase it.


Note You need to log in before you can comment on or make changes to this bug.