Bug #15702 Updated: Segmentation fault (using jdk1.4 with php 4.1.1) libphp_java.so not created

2002-05-01 Thread sukhruprai

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

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


Previous Comments:


[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

Bug #15702 Updated: Segmentation fault (using jdk1.4 with php 4.1.1) libphp_java.so not created

2002-02-24 Thread elixer

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

Can you please try to minimize the number of options you pass to PHPs
configure command and still have this error occur?  i.e. does it happen
when you use this as your configure command:

./configure --prefix=/wwwroot/php --with-apxs=/wwwroot/bin/apxs
--with-java=/usr/java/j2sdk1.4.0


Previous Comments:


[2002-02-24 17:02:50] [EMAIL PROTECTED]

Hello,
I tried to compile php with Java support and faced these problems. My
configuration is RedHat Linux 7.1, apache_1.3.23, php-4.1.1 and Jdk1.4
beta 2.

I must mention here that earlier php versions 4.0.6 (or earlier) and
jdk1.2.2 worked without any problems (and without exporting
LD_LIBRARY_PATH

With php 4.1.1 and jdk1.4, I faced many problems:

***Results with Apache
1.3.23**

I first tried to compile php and apache with almost all options
available as below: 

/PHP

./configure --prefix=/wwwroot/php --with-apache=/usr/src/apache_1.3.23

--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
--with-swf 
--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 
--with-xmlrpc

APACHE

./configure --prefix=/wwwroot
--activate-module=src/modules/php4/libphp4.a --with-perl=/usr/bin/perl
--enable-module=auth_anon --enable-module=auth_dbm
--enable-module=auth_db --enable-module=auth_digest
--enable-module=cern_meta 
--enable-module=example --enable-module=expires --enable-module=headers
--enable-module=info --enable-module=log_agent
--enable-module=log_referer --enable-module=mime_magic
--enable-module=mmap_static --enable-module=proxy
--enable-module=rewrite --enable-module=so 
--enable-module=speling --enable-module=unique_id
--enable-module=usertrack --enable-module=vhost_alias


No libphp_java.so was created with these options under
/usr/src/php-4.1.1/modules or under /usr/src/php-4.1.1/ext/java and
only libphp_java.a was created. Under /wwwroot/php/lib/php/20010901
also only libphp_java.a was installed after make install.

Then thinking that java support might have been built in with this
version. I tried to access sample jver.php file. But message, unable to
create instance of non-existing class etc. was displayed.


Then I tried to compile php with only
--with-apache=/usr/src/apache_1.3.23 and
--with-java=/usr/java/j2sdk1.4.0 options and this time libphp_java.so
was created. But java didn't work (even after enabling [java] in
php.ini and exporting LD_LIBRARY_PATH as mentioned below).

I wanted to enable other php options so I deleted apache and php source
and install directories and tried to install php again as apache shared
module (libphp4.so) with following options

//PHP

./configure --prefix=/wwwroot/php --with-apxs=/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 

Bug #15702 Updated: Segmentation fault (using jdk1.4 with php 4.1.1) libphp_java.so not created

2002-02-24 Thread elixer

 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


Previous Comments:


[2002-02-24 17:23:21] [EMAIL PROTECTED]

Can you please try to minimize the number of options you pass to PHPs
configure command and still have this error occur?  i.e. does it happen
when you use this as your configure command:

./configure --prefix=/wwwroot/php --with-apxs=/wwwroot/bin/apxs
--with-java=/usr/java/j2sdk1.4.0



[2002-02-24 17:02:50] [EMAIL PROTECTED]

Hello,
I tried to compile php with Java support and faced these problems. My
configuration is RedHat Linux 7.1, apache_1.3.23, php-4.1.1 and Jdk1.4
beta 2.

I must mention here that earlier php versions 4.0.6 (or earlier) and
jdk1.2.2 worked without any problems (and without exporting
LD_LIBRARY_PATH

With php 4.1.1 and jdk1.4, I faced many problems:

***Results with Apache
1.3.23**

I first tried to compile php and apache with almost all options
available as below: 

/PHP

./configure --prefix=/wwwroot/php --with-apache=/usr/src/apache_1.3.23

--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
--with-swf 
--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 
--with-xmlrpc

APACHE

./configure --prefix=/wwwroot
--activate-module=src/modules/php4/libphp4.a --with-perl=/usr/bin/perl
--enable-module=auth_anon --enable-module=auth_dbm
--enable-module=auth_db --enable-module=auth_digest
--enable-module=cern_meta 
--enable-module=example --enable-module=expires --enable-module=headers
--enable-module=info --enable-module=log_agent
--enable-module=log_referer --enable-module=mime_magic
--enable-module=mmap_static --enable-module=proxy
--enable-module=rewrite --enable-module=so 
--enable-module=speling --enable-module=unique_id
--enable-module=usertrack --enable-module=vhost_alias


No libphp_java.so was created with these options under
/usr/src/php-4.1.1/modules or under /usr/src/php-4.1.1/ext/java and
only libphp_java.a was created. Under /wwwroot/php/lib/php/20010901
also only libphp_java.a was installed after make install.

Then thinking that java support might have been built in with this
version. I tried to access sample jver.php file. But message, unable to
create instance of non-existing class etc. was displayed.


Then I tried to compile php with only
--with-apache=/usr/src/apache_1.3.23 and
--with-java=/usr/java/j2sdk1.4.0 options and this time libphp_java.so
was created. But java didn't work (even after enabling [java] in
php.ini and exporting LD_LIBRARY_PATH as mentioned below).

I wanted to enable other php options so I deleted apache and php source
and install directories and tried to install php again as apache shared
module (libphp4.so) with following options

//PHP

./configure --prefix=/wwwroot/php --with-apxs=/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