ID:               15702
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:      4.1.1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


And use MINIMUM amount of configure options when you test it.



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

[2002-10-15 11:24:28] [EMAIL PROTECTED]

I think you have not read it properly. My first comment was related
apache 1.3.23 Yes this happens with all versions of apache only when
using any jdk other later than 1.2.2.

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

[2002-09-09 01:00:04] [EMAIL PROTECTED]

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2002-08-08 10:14:53] [EMAIL PROTECTED]

1) Can you please try not using Apache2, it's support is not stable
with PHP.

2) Does this happen with the PHP 4.2.x and Apache1.XX releases?

3) Can you please please please please please please please please try
making your configure script the bare minimum for these tests?  It
helps us to determine where things are going wrong.  

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

[2002-05-01 19:54:22] [EMAIL PROTECTED]

I tried --with-java this time with php-4.2.0 and apache/2.0.35 (Unix) 
mod_ssl/2.0.35 OpenSSL/0.9.6 DAV/2 but instead of producing errors this
time when sample file php jver.php is accessed page returned contains
only single line "<HTML>" and response is http 1.1 ok. Other
configuration were same as before.

----------
CONFIGURE
----------
 ./configure --with-apxs2=/wwwroot/bin/apxs --prefix=/wwwroot/php 
--with-config-file-path=/wwwroot/php --enable-bcmath --enable-calendar

--enable-dbase --enable-dbx --enable-dio --enable-exif --enable-filepro

--enable-ftp --enable-gd-native-ttf --enable-mbstring 
--enable-mbstr-enc-trans --enable--mbregex --enable-overload 
--enable-shmop --enable-ucd-snmp-hack --enable-sockets
--enable-aggregate 
--enable-sysvsem --enable-sysvshm --enable-tokenizer --enable-wddx 
--enable-xslt --enable-yp --enable-versioning --with-mod-charset 
--with-openssl --with-zlib-dir --with-zlib --with-bz2 --with-cpdflib 
--with-jpeg-dir --with-tiff-dir --with-curl --with-db --with-db3 
--with-dom --with-dom-xslt --with-dom-exslt --with-gd --with-png-dir 
--with-xpm-dir --with-freetype-dir --with-ttf --with-t1lib
--with-gettext 
--with-gmp --with-hyperwave --with-imap --with-kerberos --with-imap-ssl

--with-ircg --with-ircg-config=/usr/local/bin/ircg-config --with-java 
--with-ldap --with-mcal=/usr/src/libmcal --with-mcrypt --with-mhash 
--with-ming --with-mnogosearch=/usr/local/mnogosearch --with-mysql 
--with-pdflib --with-pgsql --with-pspell --with-qtdom --with-snmp 
--with-regex=php --with-xmlrpc --with-xslt-sablot --with-sablot-js 
--with-yaz=/usr/local/lib --with-zip --with-iconv --enable-track-vars 
--enable-trans-sid --enable-debug

No error nothing is displayed. I have enabled php error logging also.
But 
no error message added to this file.
When I used gdb then only I was able to know that it was unable to find

libjvm.so

(gdb)
(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 788)]
Error occurred during initialization of VM
Unable to load native library: libjvm.so: cannot load shared object
file: 
No such file or directory

After I exported these java libraries path and again ran gdb response
returned was http 1.1 ok But gdb produced this:

(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 842)]
[New Thread 2049 (LWP 848)]
Delayed SIGSTOP caught for LWP 848.
[New Thread 1026 (LWP 849)]
Delayed SIGSTOP caught for LWP 849.
[New Thread 2051 (LWP 850)]
Delayed SIGSTOP caught for LWP 850.
[New Thread 3076 (LWP 851)]
Delayed SIGSTOP caught for LWP 851.
[New Thread 4101 (LWP 852)]
[New Thread 5126 (LWP 853)]
Delayed SIGSTOP caught for LWP 853.
[New Thread 6151 (LWP 854)]
Delayed SIGSTOP caught for LWP 854.
[New Thread 7176 (LWP 855)]
Delayed SIGSTOP caught for LWP 855.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7176 (LWP 855)]
__pthread_mutex_lock (mutex=0x400040e) at mutex.c:99
99      mutex.c: No such file or directory.
        in mutex.c

------------------
BACKTRACE
------------------

(gdb) bt
#0  __pthread_mutex_lock (mutex=0x400040e) at mutex.c:99
#1  0x403d17ac in __libc_free (mem=0x40479490) at malloc.c:3052
#2  0x409063aa in Arena::dispose (this=0x8313220) at arena.cpp:67
#3  0x409063f8 in Arena::~Arena (this=0x8313220, __in_chrg=3) at 
arena.cpp:79
#4  0x41a36a87 in ciEnv::~ciEnv ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#5  0x41a4bea5 in CompileBroker::invoke_compiler_on_method ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#6  0x41a4b9c8 in CompileBroker::compiler_thread_loop ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#7  0x41a1997a in compiler_thread_entry ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#8  0x41a162fb in JavaThread::thread_main_inner ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#9  0x41a162a6 in JavaThread::run ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#10 0x419dd799 in _start ()
   from /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#11 0x40346078 in pthread_start_thread_event (arg=0xbebffc00) at 
manager.c:262

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

[2002-03-08 14:48:46] [EMAIL PROTECTED]

I have generated backtrace this time which showed that problem was
related 
to mutex.c. I used Apache 2.0 because there was also a problem in swf.c
which 
resulted in segmentation fault when using Apache 2 only not Apache
1.3.

After I removed --with-swf from configure Apache and php worked fine. I

have also submitted that bug report.

Then I decided to find the source of segmentation fault caused by Java

extension. 
This time I used --enable-debug configure option and Apache 2 beta 
(Apache 2_0_28) and compiled php 4.1.1 as Apache shared module 
(libphp4.so).
-
---------------------------APACHE 2_0_28--------------------------

./configure --prefix=/wwwroot --enable-auth-anon --enable-auth-db 
--enable-auth-dbm --enable-auth-digest --enable-file-cache
--enable-echo 
--enable-cache --enable-mem-cache --enable-example --enable-ext-filter

--enable-case-filter --enable-case-filter-in --enable-mime-magic 
--enable-cern-meta --enable-expires --enable-usertrack
--enable-unique-id 
--enable-ssl --enable-optional-hook-export
--enable-optional-hook-import 
--enable-optional-fn-import --enable-optional-fn-export --enable-http 
--enable-dav --enable-cgi --enable-info --enable-cgid --enable-dav-fs 
--enable-vhost-alias --enable-speling --enable-actions --enable-rewrite

--enable-so

 --------------------------PHP 4.1.1--------------------------------
  ./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs 
--with-mod_charset --with-config-file-path=/wwwroot/php/ --with-openssl

--with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-cpdflib

--with-png-dir --with-jpeg-dir --with-tiff-dir --enable-ctype
--with-curl 
--with-db3 --with-dom --enable-exif --enable-filepro --enable-ftp
--with-gd 
--enable-gd-native-ttf --with-xpm-dir --with-freetype-dir=/usr
--with-ttf 
--with-t1lib --with-gettext --with-gmp --with-hyperwave --with-iconv 
--with-imap --with-kerberos --with-imap-ssl --with-ircg --with-ldap 
--enable-mbstring --enable-mbstr-enc-trans --with-mcal=/usr/src/libmcal

--with-mhash --with-mnogosearch=/usr/local/mnogosearch --with-mysql 
--with-pgsql --with-pspell --with-qtdom --enable-trans-sid
--enable-shmop 
--with-snmp -enable-ucd-snmp-hack --enable-sockets --with-regex=php 
--enable-wddx --with-expat-dir=/usr/local --enable-xslt
--with-xslt-sablot 
--with-yaz=/usr/local/lib --enable-yp --with-zip --with-pdflib 
--enable-versioning --with-tsrm-st --with-tsrm-pthreads 
--enable-track-vars --enable-overload --with-mcrypt
--with-Java=/usr/Java/j2sdk1.4.0 --enable-sysvsem --enable-sysvshm 
--enable-debug
------------------------------------------------------------------------
Apache and php worked well no segmentation fault etc. But Java didn't 
work. I had to stop Apache and export LD_LIBRARY_PATH as below:

export
LD_LIBRARY_PATH=/usr/Java/j2sdk1.4.0/jre/lib/i386/native_threads:/usr/java/j2sdk1.4.0/jre/lib/i386/client:/usr/java/j2sdk1.4.0/jre/lib/i386;


Then I started Apache using gdb.
$gdb /wwwroot/bin/httpd
(gdb)run -X

and accessed http://localhost/jver.php (test file supplied with Java
ext)

Browser waited for ever and gdb produced this:

--------------------------------------------------
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 828)]
[New Thread 2049 (LWP 835)]
Delayed SIGSTOP caught for LWP 835.
[New Thread 1026 (LWP 836)]
Delayed SIGSTOP caught for LWP 836.
[New Thread 2051 (LWP 837)]
Delayed SIGSTOP caught for LWP 837.
[New Thread 3076 (LWP 838)]
Delayed SIGSTOP caught for LWP 838.
[New Thread 4101 (LWP 839)]
[New Thread 5126 (LWP 840)]
Delayed SIGSTOP caught for LWP 840.
[New Thread 6151 (LWP 841)]
Delayed SIGSTOP caught for LWP 841.
[New Thread 7176 (LWP 842)]
Delayed SIGSTOP caught for LWP 842.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7176 (LWP 842)]
__pthread_mutex_lock (mutex=0x2a00040c) at mutex.c:99
99      mutex.c: No such file or directory.
        in mutex.c

backtrace produced this:

---------------------------------------------
(gdb) bt

#0  __pthread_mutex_lock (mutex=0x2a00040c) at mutex.c:99
#1  0x4033f7ac in __libc_free (mem=0x403e7490) at malloc.c:3052
#2  0x408953aa in Arena::dispose (this=0x82ad4b0) at arena.cpp:67
#3  0x408953f8 in Arena::~Arena (this=0x82ad4b0, __in_chrg=3) at 
arena.cpp:79
#4  0x4193ea87 in ciEnv::~ciEnv ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#5  0x41953ea5 in CompileBroker::invoke_compiler_on_method ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#6  0x419539c8 in CompileBroker::compiler_thread_loop ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#7  0x4192197a in compiler_thread_entry ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#8  0x4191e2fb in JavaThread::thread_main_inner ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#9  0x4191e2a6 in JavaThread::run ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#10 0x418e5799 in _start ()
   from /usr/Java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
#11 0x402b4078 in pthread_start_thread_event (arg=0xbebffc00) at 
manager.c:262
(gdb)

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15702

-- 
Edit this bug report at http://bugs.php.net/?id=15702&edit=1

Reply via email to