Closed
Bug 303372
Opened 19 years ago
Closed 19 years ago
linkageError duplicate class definition in multi processor HP platform
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: lila.ben_belgacem, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1
Hello,
i start a process which launch several threads.
Some of these never terminate and a java.lang.LinkageError: duplicate class
definition: inv3 is raised during execution of my method.
The problem was seen repetedly on a HP rp4440 multiprocessor (8 CPU) running HP
-UX/Java JRE-1.4.2_04 and JRE-1.4.2_08.
version of rhino is: Rhino 1.5R2
java.lang.LinkageError: duplicate class definition: inv3
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at org.mozilla.classfile.DefiningClassLoader.defineClass(DefiningClassLoader.ja
va:66)
at org.mozilla.javascript.optimizer.InvokerImpl.createInvoker(InvokerImpl.java:
281)
at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:514)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:433)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
at org.mozilla.javascript.gen.c116.call(:2)
Thank you.
Reproducible: Always
Steps to Reproduce:
1.start the multi thread process
2. executing some actions that use the call of js functions
3. execution of rhino function call
Actual Results:
the exception is thrown and the thread is blocked:
java.lang.LinkageError: duplicate class definition: inv3
Expected Results:
the thread should have terminated without blocking and the functions should have
been executed properly.
Comment 1•19 years ago
|
||
Rhino 1.5R2 is old release. Try to use the last release, Rhino 1.6R1 as it may
fix your problem.
Comment 2•19 years ago
|
||
Can you reproduce the issue with the latest Rhino releases? AFAICS it looks like
one of those threading bugs with class loading in Rhino that were addressed in
later Rhino releases.
And if you have to stick with 1.5R2 for whatever reason, try to remove
org/mozilla/javascript/optimizer/InvokerImpl.class from your Rhino jar. Besides
fixing the issue it could even make things slightly faster.
Comment 3•19 years ago
|
||
We have encountered the same issue in a Weblogic 8.1 environment. Bea chose to embed Rhino 1.5r2 into the weblogic.jar file instead of maintaining it as a separate .jar file, so it isn't a simple matter to replace the existing version with the latest. Also, Weblogic is known to have class loading issue when trying to load .jar files from WEB-INF/lib (for instance), and will actually fail to load the Rhino classes if there is a js.jar file in WEB-INF/lib.
Suggestions?
Comment 4•19 years ago
|
||
I'm positively certain that this bug can not occur with 1.6R2 as the classname generator has proper synchronization, i.e. the relevant code looks like this:
synchronized (globalLock) {
serial = ++globalSerialClassCounter;
}
String mainClassName = "org.mozilla.javascript.gen.c"+serial;
It is unfortunately possible that a race condition existed in 1.5R2 -- however, if it's cemented inside the weblogic.jar, then you might not have better options than ask BEA to fix this problem for you, preferrably by upgrading to 1.6R2
Comment 5•19 years ago
|
||
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Updated•19 years ago
|
Assignee: please_see_bug_288433 → nobody
Comment 6•19 years ago
|
||
This is already fixed in 1.6 -- Weblogic should provide a way for people to use Rhino 1.6 instead of the embedded 1.5, or embed 1.6
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•