Bug 186152

Summary: azureus crash with java-sun installed
Product: [Fedora] Fedora Reporter: Eric Tanguy <eric.tanguy>
Component: azureusAssignee: Anthony Green <green>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bikehead, ch.nolte, extras-qa, overholt
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-06-03 02:09:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Tanguy 2006-03-21 21:48:11 UTC
Description of problem:
ince i installed java sun 1.5 in fedora core 5 using java source from
jpackage, azureus makes errors at startup :
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-pi-gtk-3139 in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at
org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
        at
org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at
org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:122)
        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:75)
        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:58)
        at
org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:109)
        at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:127)
        at org.gudy.azureus2.ui.swt.Main.main(Main.java:142)

Version-Release number of selected component (if applicable):
azureus-2.4.0.0-0.20060209cvs_1.fc5


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Eric Tanguy 2006-03-23 07:34:54 UTC
If i uninstall java-sun* azureus works fine and if i reintall java-sun* the
problem is still here.


Comment 2 Brian G. Anderson 2006-03-31 20:40:42 UTC
I can confirm this bug.  I run FC5 with sun-java: Java(TM) 2 Runtime
Environment, Standard Edition (build 1.5.0_06-b05).  I used the jpackage rpms to
build my rpms.

However if I do alternatives --config java and choose
/usr/lbi/jvm/jre-1.4.2-gcj/bin/java then azureus works again

Comment 3 Brian G. Anderson 2006-03-31 20:56:48 UTC
Acutally this is the same problem as bug #185998.  It runs out that the solution
there will fix your problem:  put export
LD_LIBRARY_PATH=/usr/lib/eclipse/:/usr/lib before invoking azureus.  This also
clears up the java keystore error that comes up even when using jre-1.4.2-gcj.

Comment 4 Anthony Green 2006-04-02 03:34:30 UTC
This is curious.  I'll ask the Eclipse guys if they understand what's going on.

In the meanwhile, azureus-2.4.0.3-0.20060328cvs_2 should show up in FC5's Extras
repository soon.  I've set LD_LIBRARY_PATH in the startup script.  Please let me
know if this fixes the problem.



Comment 5 Anthony Green 2006-04-02 03:38:53 UTC
Overholt - any idea why swt can find native libraries when run by
java-gcj-compat, but not by sun? 

Perhaps Sun doesn't ever look in /usr/lib, only $JAVAHOME/lib.  That would
explain it.



Comment 6 Anthony Green 2006-04-02 03:44:00 UTC
*** Bug 185998 has been marked as a duplicate of this bug. ***

Comment 7 Ben Konrath 2006-04-03 02:15:14 UTC
(In reply to comment #5)
> Perhaps Sun doesn't ever look in /usr/lib, only $JAVAHOME/lib.  That would
> explain it.

Yeah, I think that's right. I recall having to set java.library.path munually
when I was working with an SWT app in Eclipse with the Sun VM, but not with GCJ.

Comment 8 Andrew Overholt 2006-04-03 15:57:33 UTC
(In reply to comment #5)
> Overholt - any idea why swt can find native libraries when run by
> java-gcj-compat, but not by sun? 

The most common cause of this IME is using the 32-bit Sun JVM with the 64-bit
JNI libs of SWT.  Apparently that's not the case here, though ...

> Perhaps Sun doesn't ever look in /usr/lib, only $JAVAHOME/lib.  That would
> explain it.

I think you may be correct.  I don't have the Sun JVM handy to try, though.

Comment 9 Brian G. Anderson 2006-04-03 16:45:53 UTC
I just pulled the updated azureus (azureus-2.4.0.3-0.20060328cvs_2.fc5) off of
extras.  Under sun-java I always the the following error even when I set
LD_LIBRARY_PATH; azureus just hangs but no window appears:
changeLocale: *Default Language* != English (United States). Searching without
country..

changeLocale: Searching for language English in *any* country..

changeLocale: no message properties for Locale 'English (United States)'
(en_US), using 'English (default)'

DEBUG::Mon Apr 03 09:49:31 PDT
2006::org.gudy.azureus2.ui.swt.mainwindow.Initializer::run::304:

  java.lang.UnsatisfiedLinkError: no glibjni-0.2 in java.library.path

        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)

        at java.lang.Runtime.loadLibrary0(Runtime.java:822)

        at java.lang.System.loadLibrary(System.java:992)

        at org.gnu.glib.Struct.<clinit>(Struct.java:85)

        at
org.gudy.azureus2.ui.swt.ImageRepository.getThemedIcon(ImageRepository.java:72)

        at
org.gudy.azureus2.ui.swt.ImageRepository.loadImages(ImageRepository.java:129)

        at org.gudy.azureus2.ui.swt.mainwindow.Initializer.run(Initializer.java:208)

        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread$1.runSupport(SWTThread.java:110)

        at org.gudy.azureus2.core3.util.AERunnable.run(AERunnable.java:38)

        at java.lang.Thread.run(Thread.java:595)










switching back to gcj causes the program to eventually die after consuming all
available memory.  I get the following stack trace with no window:
DEBUG::Mon Apr 03 09:39:31 PDT
2006::org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl::ensureStoreExists::-1:

  java.security.KeyStoreException: JKS

   at java.security.KeyStore.getInstance (libgcj.so.7)

   at
org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl.ensureStoreExists
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl.initialise
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.security.SESecurityManager.initialise
(Azureus2.jar.so)

   at
org.gudy.azureus2.core3.config.impl.ConfigurationChecker.setSystemProperties
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.config.impl.ConfigurationManager.initialise
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.config.impl.ConfigurationManager.getInstance
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.logging.impl.LoggerImpl.init (Azureus2.jar.so)

   at org.gudy.azureus2.core3.logging.Logger.<clinit> (Azureus2.jar.so)

   at java.lang.Class.initializeClass (libgcj.so.7)

   at org.gudy.azureus2.core3.logging.Logger.isEnabled (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.StartServer.<init> (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.Main.<init> (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.Main.main (Azureus2.jar.so)



DEBUG::Mon Apr 03 09:39:31 PDT
2006::org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl::ensureStoreExists::-1:

  java.security.KeyStoreException: JKS

   at java.security.KeyStore.getInstance (libgcj.so.7)

   at
org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl.ensureStoreExists
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl.initialise
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.security.SESecurityManager.initialise
(Azureus2.jar.so)

   at
org.gudy.azureus2.core3.config.impl.ConfigurationChecker.setSystemProperties
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.config.impl.ConfigurationManager.initialise
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.config.impl.ConfigurationManager.getInstance
(Azureus2.jar.so)

   at org.gudy.azureus2.core3.logging.impl.LoggerImpl.init (Azureus2.jar.so)

   at org.gudy.azureus2.core3.logging.Logger.<clinit> (Azureus2.jar.so)

   at java.lang.Class.initializeClass (libgcj.so.7)

   at org.gudy.azureus2.core3.logging.Logger.isEnabled (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.StartServer.<init> (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.Main.<init> (Azureus2.jar.so)

   at org.gudy.azureus2.ui.swt.Main.main (Azureus2.jar.so)



changeLocale: *Default Language* != en (US). Searching without country..

changeLocale: Searching for language en in *any* country..

changeLocale: no message properties for Locale 'en (US)' (en_US), using 'English
(default)'

should load blocklist from: http://www.bluetack.co.uk/config/spconfig.txt

Retrieving data from: http://www.bluetack.co.uk/config/ads-trackers-and-bad-pr0n.txt

Retrieving data from: http://www.bluetack.co.uk/config/level1.txt

GC Warning: Repeated allocation of very large block (appr. size 261070848):

        May lead to memory leak and poor performance.

Comment 10 Anthony Green 2006-04-03 16:54:30 UTC
(In reply to comment #9)
> DEBUG::Mon Apr 03 09:49:31 PDT
> 2006::org.gudy.azureus2.ui.swt.mainwindow.Initializer::run::304:
> 
>   java.lang.UnsatisfiedLinkError: no glibjni-0.2 in java.library.path

Ok, I know what this is.  I forgot to add /usr/lib to LD_LIBRARY_PATH.  I'll fix
this today.


> 
> should load blocklist from: http://www.bluetack.co.uk/config/spconfig.txt
> 
> Retrieving data from:
http://www.bluetack.co.uk/config/ads-trackers-and-bad-pr0n.txt
> 
> Retrieving data from: http://www.bluetack.co.uk/config/level1.txt
> 
> GC Warning: Repeated allocation of very large block (appr. size 261070848):
> 
>         May lead to memory leak and poor performance.


Did you install an extra plugin manually?  If so, which one?


Comment 11 Brian G. Anderson 2006-04-03 17:32:57 UTC
No I didn't install a plugin, but I had been using a downloaded version of
azureus.  I moved ~/.azureus out of the way and I was able to bring azureus up
under gcj.  I still get a failure with sun-java though, even if I use export
LD_LIBRARY_PATH.  The splash screen appears, but I get the following stack trace
and then azureus hangs.  I assume it is looking for libglibjni which I do have
(/usr/lib/libglibjni-0.2.so)

changeLocale: *Default Language* != English (United States). Searching without
country..

changeLocale: Searching for language English in *any* country..

changeLocale: no message properties for Locale 'English (United States)'
(en_US), using 'English (default)'

DEBUG::Mon Apr 03 09:37:24 PDT
2006::org.gudy.azureus2.ui.swt.mainwindow.Initializer::run::304:

  java.lang.UnsatisfiedLinkError: no glibjni-0.2 in java.library.path

        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)

        at java.lang.Runtime.loadLibrary0(Runtime.java:822)

        at java.lang.System.loadLibrary(System.java:992)

        at org.gnu.glib.Struct.<clinit>(Struct.java:85)

        at
org.gudy.azureus2.ui.swt.ImageRepository.getThemedIcon(ImageRepository.java:72)

        at
org.gudy.azureus2.ui.swt.ImageRepository.loadImages(ImageRepository.java:129)

        at org.gudy.azureus2.ui.swt.mainwindow.Initializer.run(Initializer.java:208)

        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread$1.runSupport(SWTThread.java:110)

        at org.gudy.azureus2.core3.util.AERunnable.run(AERunnable.java:38)

        at java.lang.Thread.run(Thread.java:595)

Comment 12 drago01 2006-04-06 16:32:22 UTC
in my case it works but it has this bug :
LD_LIBRARY_PATH=/usr/lib64/eclipse:/usr/lib
should be *lib64* on x86_64
changing this makes it working on x86_64 with suns java

Comment 13 Anthony Green 2006-04-06 16:47:01 UTC
(In reply to comment #12)
> in my case it works but it has this bug :
> LD_LIBRARY_PATH=/usr/lib64/eclipse:/usr/lib
> should be *lib64* on x86_64

I forgot a 'g' in my sed command.  I'll create a new release right now.

Thanks!


Comment 14 Mephisto 2006-04-27 21:34:25 UTC
Azureus still doesn't work for me. i get the following error under sun-java:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:52)
        at
org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:108)
        at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:147)
        at org.gudy.azureus2.ui.swt.Main.main(Main.java:162)

and this one under gcj:

Exception in thread "main" java.lang.NoClassDefFoundError:
org.gudy.azureus2.ui.swt.StartServer
   at java.lang.Class.initializeClass(libgcj.so.7)
   at org.gudy.azureus2.ui.swt.Main.<init>(Azureus2.jar.so)
   at org.gudy.azureus2.ui.swt.Main.main(Azureus2.jar.so)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display not
found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/bin/build-classpath,file:/usr/share/azureus/Azureus2.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.7)
   at java.lang.ClassLoader.loadClass(libgcj.so.7)
   at java.lang.ClassLoader.loadClass(libgcj.so.7)
   at java.lang.Class.initializeClass(libgcj.so.7)
   ...2 more

I don't know if this is something on my system or a problem with the package,
but i hope this can be fixed somehow...

Comment 15 Anthony Green 2006-04-28 14:44:06 UTC
(In reply to comment #14)
> Azureus still doesn't work for me. 

Let's start with the gcj implementation.  Switch to the java-1.4.2-gcj-compat
alternative and please send me the output of: 

"uname -a"
"rpm -qa azureus libswt3-gtk2 libgcj"
"rpm -qs azureus libswt3-gtk2"
"which java && java -version"

AG


Comment 16 Anthony Green 2006-06-03 02:09:25 UTC
I'm going to close this.  I can't reproduce (I can run azureus with a Sun 1.5
alternative with no problems).  We can reopen if people are still having problems.