Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreaded calls to remote EJB may result in LinkageError #3087

Closed
svendiedrichsen opened this issue Aug 27, 2018 · 7 comments
Closed

Multithreaded calls to remote EJB may result in LinkageError #3087

svendiedrichsen opened this issue Aug 27, 2018 · 7 comments
Assignees
Labels
PR: TESTS REQUIRED PR Requires Tests to be merged

Comments

@svendiedrichsen
Copy link
Contributor

svendiedrichsen commented Aug 27, 2018

Description


When remote EJB methods are called with multiple threads a LinkageError may occur.

Expected Outcome

Remote EJB methods may be called without LinkageError.

Current Outcome

Caused by: java.lang.LinkageError: loader (instance of  org/glassfish/web/loader/WebappClassLoader): attempted  duplicate class definition for name: "de/edict/eoc/server/proxy/_CasinoEnvironmentConstructorApi5_Remote"
	at sun.misc.Unsafe.defineClass(Native Method)
	at org.glassfish.pfl.basic.reflection.BridgeBase.defineClass(BridgeBase.java:227)
	at org.glassfish.pfl.dynamic.codegen.impl.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:70)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._generate(Wrapper.java:1083)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._generate(Wrapper.java:1067)
	at com.sun.ejb.EJBUtils.generateAndLoad(EJBUtils.java:599)
	at com.sun.ejb.EJBUtils.loadGeneratedRemoteBusinessClasses(EJBUtils.java:513)
	at com.sun.ejb.EJBUtils.loadGeneratedRemoteBusinessClasses(EJBUtils.java:471)
	at com.sun.ejb.containers.RemoteBusinessWrapperBase.readObject(RemoteBusinessWrapperBase.java:122)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1813)
	at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1195)
	at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:407)
	at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:307)
	at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:273)
	at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:899)
	... 181 more

Steps to reproduce (Only for bug reports)

Difficult. Same symptoms like #525.

Environment

  • Payara Version: 4.1.1.174
  • Edition: full
  • JDK Version: 8.0.131
  • Operating System: Linux
  • Database: none
@lprimak
Copy link
Contributor

lprimak commented Aug 27, 2018

I wasn’t able to reproduce the other issue and doubt I can do anything without being able to reproduce.

If you can create a reproducer i’d take a look

@lprimak
Copy link
Contributor

lprimak commented Aug 27, 2018

The other issue was primarily due to method calls during redeployment or at least its what it seems like to me.

@svendiedrichsen
Copy link
Contributor Author

svendiedrichsen commented Aug 28, 2018

@lprimak I will try to create a reproducer. Difficult as it surely may be.

@lprimak
Copy link
Contributor

lprimak commented Aug 28, 2018

thanks! I appreciate it

@lprimak lprimak self-assigned this Aug 28, 2018
@smillidge smillidge added the PR: TESTS REQUIRED PR Requires Tests to be merged label Sep 20, 2018
@smillidge
Copy link
Contributor

Any look with the reproducer?

@svendiedrichsen
Copy link
Contributor Author

I'm sorry but I haven't had time to put one together. I will close this bug until I have managed to build one.

@svendiedrichsen
Copy link
Contributor Author

svendiedrichsen commented Nov 13, 2018

I have spotted the problematic code and put together a fix. Still haven't built a repoducer which seems way more difficult to write than the fix. (Our production code would be one but I can't put it here, obviously.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: TESTS REQUIRED PR Requires Tests to be merged
Projects
None yet
Development

No branches or pull requests

3 participants