ID: 21926
Comment by: huberfelix at web dot de
Reported By: arinto at almedina dot net
Status: No Feedback
Bug Type: Java related
Operating System: Red Hat Linux 7.1
PHP Version: 4CVS-2003-01-28 (stable)
New Comment:

Sorry I opened a other ticket for nearly the same problem
[url]http://bugs.php.net/bug.php?id=25663[/url]



Description:
------------
I use the Java feature to call a Lucene Proxy,
after a few hundert calls I get segmentation faults.

My php.ini:

java.class.path=/usr/share/php_java.jar:/usr/lib/j2sdk1.4.2_01/lib/tools
..jar:/usr/lib/j2sdk1.4.2_01/lib/dt.jar:/u
sr/lib/j2sdk1.4.2_01/jre/lib/rt.jar:/opt/jakarta/lucene/lucene.jar:/opt/
mysql-connector-java/mysql-connector-java
-3.0.8-stable-bin.jar:/opt/wddx/Java/wddx.jar
java.home = /usr/lib/j2sdk1.4.2_01
java.library = /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libjava.so
java.library.path = /usr/share/extensions/no-debug-non-zts-20020429

Reproduce code:
---------------
$query = trim(urldecode($_REQUEST["keywords"]));

$index = "/srv/www/lucene/index";

$obj = new Java("org.ew.lucene.SearchEngine")
or die("ARGHHHS");

$result = $obj->search($index,"AND",$query)
or die("ARGHHHS");

$rs = wddx_deserialize($result);
$meta = $rs["meta_data"];
$rows = $rs["rows"];

if (!stristr($rs,"No matches found for") && strlen(trim($rs)) >= 1)
{
....

Expected result:
----------------
A array with the Lucene results (works)

I get 50 segmentation faults on 10.000 searches

Actual result:
--------------
#0 0x45ceb300 in ?? ()
#1 0x45c8e0f1 in ?? ()
#2 0x45c8ddeb in ?? ()
#3 0x45c8ddeb in ?? ()
#4 0x45c8e0f1 in ?? ()
#5 0x45c8ddeb in ?? ()
#6 0x45c8ddeb in ?? ()
#7 0x45c8e0f1 in ?? ()
#8 0x45c8ddeb in ?? ()
#9 0x45c8ddeb in ?? ()
#10 0x45c8dd14 in ?? ()
#11 0x45c8dd14 in ?? ()
#12 0x45c8e01a in ?? ()
#13 0x45c8dd14 in ?? ()
#14 0x45c8b104 in ?? ()
#15 0x438b73f4 in JavaCalls::call_helper ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#16 0x4399c05d in os::os_exception_wrapper ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#17 0x438b7646 in JavaCalls::call ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#18 0x438bfe47 in jni_invoke_nonstatic ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#19 0x438c55ae in jni_CallVoidMethod ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#20 0x406a0160 in php4_module ()
from /usr/share/extensions/no-debug-non-zts-20020429/java.so
#21 0x405e1a15 in setenvif_module () from /usr/lib/apache/libphp4.so
---Type <return> to continue, or q <return> to quit---

#12 0x45c8e01a in ?? ()
#13 0x45c8dd14 in ?? ()
#14 0x45c8b104 in ?? ()
#15 0x438b73f4 in JavaCalls::call_helper ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#16 0x4399c05d in os::os_exception_wrapper ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#17 0x438b7646 in JavaCalls::call ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#18 0x438bfe47 in jni_invoke_nonstatic ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#19 0x438c55ae in jni_CallVoidMethod ()
from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#20 0x406a0160 in php4_module ()
from /usr/share/extensions/no-debug-non-zts-20020429/java.so
#21 0x405e1a15 in setenvif_module () from /usr/lib/apache/libphp4.so
---Type <return> to continue, or q <return> to quit---
#22 0x405e4bec in setenvif_module () from /usr/lib/apache/libphp4.so
#23 0x405d30cb in setenvif_module () from /usr/lib/apache/libphp4.so
#24 0x4059c052 in setenvif_module () from /usr/lib/apache/libphp4.so
#25 0x405e9870 in setenvif_module () from /usr/lib/apache/libphp4.so
#26 0x405ea826 in setenvif_module () from /usr/lib/apache/libphp4.so
#27 0x405ea8ac in setenvif_module () from /usr/lib/apache/libphp4.so
#28 0x08054f7a in ap_invoke_handler ()
#29 0x080692f4 in ap_some_auth_required ()
#30 0x0806957e in ap_process_request ()
#31 0x08061208 in ap_child_terminate ()
#32 0x080614b5 in ap_child_terminate ()
#33 0x0806154d in ap_child_terminate ()
#34 0x080620db in ap_child_terminate ()
#35 0x0806246e in main ()
#36 0x4015d4c2 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)


Previous Comments:
------------------------------------------------------------------------

[2003-08-18 19:45:05] [email]sniperphp.net[/email]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-08-13 12:15:50] [email]iliaaphp.net[/email]

Please try using this CVS snapshot:

[url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]

For Windows:

[url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]



------------------------------------------------------------------------

[2003-02-14 12:03:46] minusone at yahoo dot com

I would like to ammend this report by saying I am seeing something
similar... using Lucene...

Now... here's some more information. Using the CLI... my PHP script
works just fine. It instantiates my java object and executes perfectly
and returns results as I would expect... so it appears to be definitely
something with the libphp4.so module.

I have rebuilt it many many times.

I should also say that running on RedHat 8.0 everything works
perfectly... its just on RedHat 7.x appears to be a problem.

I am using Sun JDK 1.3.1_07 for Linux
Apache 1.24

------------------------------------------------------------------------

[2003-01-28 13:16:59] arinto at almedina dot net

Hi.

I'm using the PHP Java extension to run Jakarta Lucene to power my
internal site search. Whenever I call a Java object, Apache starts
between 1 to 5 new httpd processes and it keeps growing with each
subsequent call to the object.
After some time (and after more than 50 httpd processes are started)
the web site stops respondig for some clients. For others it continues
running as usual.
This happens with PHP 4.3.0 and the latest CVS (2003-01-28)

My configure line is as follows:

'./configure' '--with-mysql' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-apxs=/var/www/bin/apxs' '--enable-xslt'
'--with-xslt-sablot' '--with-xml' '--with-iconv' '--with-pgsql'
'--with-dom' '--with-zlib' '--with-gd'
'--with-java=/usr/java/j2sdk1.4.1_01'

Java Version: Sun J2SE 1.4.1
Apache Version 1.3.24

This also seems to be the same bug as #20270, that is closed.

------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=21926&edit=1[/url]