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
JVM Crash using Maven Multi-Module + Jetty #186
Comments
Problem is in dcevm look at this lines from hs_err_pid: Stack: [0x00007f8ce2eb3000,0x00007f8ce2fb4000], sp=0x00007f8ce2fb23e0, free space=1020k |
I've inspected the problematic place in DCEVM, what kind of method change did you do before redefinition? |
The changes are in the method body I believe the problem is related by the fact that the method is being called in scriplet from within the JSP. I did the tests in other classes of the modules and it is working. Another (related) error happens when i change a TagLib
Would the error be related to the jsps compiler? |
The problem is definitively in dcevm. It seems the jsp compiler produces some specific code that breaks DCEVM. I can check the problem but I need reproducible example project. |
Sample projetct:
|
Thanks! btw, why do you need -XX:+EnableInvokeDynamic ? |
I found recommendation in a blog |
Could you check it without it ? |
I tested it, it does not matter |
So, very interesting issue! The cause of the problem is missing lock on jvmti redefine method in dcevm. Dcevm redefinition works, if it is used from IDE, since it is not called parallely. But in your case the redefinition is called from HA's Hotswapper module. HotswapAgent creates one Hotswapper instance for each ClassLoader that is found. In your case there are 2 classloaders, both watching the same extraClasspath. Then, if some .class is changed on the extraClassPath, the HA calls dcevm jvmti redefinition parallelly and dcevm crashes. The most straightforward workaround is to disable JasperClassloader (as I think it is useless to register it) by putting following line to hotswap-agent.properties:
but the proper solution is the lock in dcevm jvmti redefinition! Thanks for nice and helpful example project ! |
Cool, Its working ... Could this be excluded by default in the Jetty plugin? Thanks |
Jasper is not used by Jetty only, but by many others containers as well. I'm not sure if it would be necesary in some very rare cases. If not it can be excluded by default. |
I'm having problems with a maven environment with multiple modules.
When I change anything in the main application it works normally, but when I change any line in a module, the JVM stops.
EDIT: I believe the problem is related by the fact that the method is being called in scriplet from within the JSP.
I am using:
-noverify -XX:+UnlockDiagnosticVMOptions -XX:+EnableInvokeDynamic -javaagent:/media/hotswap-agent-1.1.0-SNAPSHOT.jar -XXaltjvm=dcevm
Console error
The package br.com.criativasoft.modulo.boletim, is another WAR module.
Will the problem be that the class is being loaded twice?
I've attached the JVM error log
hs_err_pid2014.log.txt
The text was updated successfully, but these errors were encountered: