[VISUALVM-224] Cannot memory profile JBoss AS 4.2.3.GA Created: 25/Nov/08  Updated: 04/Aug/11

Status: Open
Project: VisualVM
Component/s: code
Affects Version/s: 1.0.1
Fix Version/s: 1.2

Type: Bug Priority: Blocker
Reporter: rholder Assignee: yardus
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: All


Attachments: Text File visualvm-log-JDK-1.6.0_10.txt    
Issuezilla Id: 224

 Description   

Activating memory profiling renders the connected JBoss AS instance unusable
with the following stack trace on every page of all applications:

Profiler Agent Warning: Failed to lookup cached class javax/servlet/ServletException
16:33:53,750 ERROR [[default]] Servlet.service() for servlet default threw exception
java.lang.ClassNotFoundException: No ClassLoaders found for:
org.netbeans.lib.profiler.server.ProfilerRuntimeObjLiveness
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:320)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:533)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:238)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:238)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:177)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:188)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:438)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:163)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)

Steps to reproduce:
1. Deploy any Seam example application (i.e. Booking) to JBoss AS
2. Connect Visual VM console to the running JBoss AS instance
3. Profiler -> Memory, wait patiently to instrument all classes, clicking "no"
when prompted to disconnect because application hasn't responded yet.
4. Access any page on from the application server.

Live results are recorded and all the classes appear to be instrumented (visible
via the console and "Profiler Agent" output). However, the instrumentation
appears to have broken a class somewhere. Any ideas on why this might have
occurred?

JBoss Seam 2.0.3.CR1
JBoss AS 4.2.3.GA
Windows XP SP3



 Comments   
Comment by rholder [ 25/Nov/08 ]

It's also an issue with the version of VisualVM that ships with the JDK 1.6.0_10.

Comment by rholder [ 25/Nov/08 ]

Created an attachment (id=95)
Log file for VisualVM that ships with Sun JDK 1.6.0_10

Comment by mosabua [ 25/Nov/08 ]

Probably related to issue 208

Comment by yardus [ 26/May/09 ]

Could you try supplying JAVA_OPTS=-XX:MaxPermSize=200m to JBoss?

It seems that the permgen space is getting depleted and that makes the profiled
process to fail.

Comment by wayfarer3130 [ 04/Aug/11 ]

I've tried this with MaxPermSize=256m and it makes no difference whatsoever.
I expect this issue is that the classloader that manages the web archives isn't the one that was used to load ProfilerRuntimeObjLiveness and that causes the object to be unuseable once it has been rewritten. It might be possible to drop the class into the global classpath and get things running that way.

Comment by wayfarer3130 [ 04/Aug/11 ]

My previous comment was correct. If you drop jfluid-server.jar into server/default/lib (or the appropriate instance in jboss if not default instance), then VisualVM works fine and the application works fine.

Generated at Mon Mar 30 00:25:54 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.