You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/03/10 19:03:32 UTC

[Bug 56242] New: Deploying a Velocity-based web application can thwart Attach API connections for monitoring

https://issues.apache.org/bugzilla/show_bug.cgi?id=56242

            Bug ID: 56242
           Summary: Deploying a Velocity-based web application can thwart
                    Attach API connections for monitoring
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: chris@christopherschultz.net

This may not be a Tomcat bug, but I think it best to report it here as it's
more likely the Tomcat team will be able to find the root cause.

The attached web application WAR does nothing other than define a <servlet>
that comes out of the box with Velocity and Velocity Tools. The mere presence
of this servlet appears to cause the JVM to reject certain Attach API
connections -- such as those from jconsole, VisualVM, and other profiling
tools.

VisualVM will connect after an error ("attach: task_for_pid(23490) failed (5)"
in the console, longer stack trace available which basically says "couldn't
connect") but the JMX tab will be unavailable.

Any help with discovering the root cause of this issue would be greatly
appreciated.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56242] Deploying a Velocity-based web application can thwart Attach API connections for monitoring

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56242

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Created attachment 31379
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31379&action=edit
Minimal web application WAR that reproduces the problem.

I had to remove the following files to reduce the size enough to attach to the
BZ issue. They should be trivially-retrievable from ASF's web site(s):

deleting: WEB-INF/lib/commons-beanutils-1.8.3.jar
deleting: WEB-INF/lib/commons-collections-3.2.1.jar
deleting: WEB-INF/lib/commons-digester-1.8.jar
deleting: WEB-INF/lib/commons-lang-2.4.jar
deleting: WEB-INF/lib/commons-logging-1.1.1.jar

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56242] Deploying a Velocity-based web application can thwart Attach API connections for monitoring

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56242

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 OS|                            |All

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
If you start Tomcat with -Xverify:none (not something I'd recommend doing) the
problem goes away. This looks like a VisualVM bug that is triggered by one of
the velocity classes.

As an alternative, attach VisualVM and then deploy the Velocity app.

For those wondering how I stumbled across the solution:
1. Google "attach: task_for_pid(23490) failed (5)"
2. Read through the VisualVm bug reports that finds
3. Specifically read this one: https://java.net/jira/browse/VISUALVM-326
4. Experiment with the settings suggested in that report to see which are
actually required

I'd recommend opening a VisalVM bug for this.

I concur that this is a Mac specific error.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56242] Deploying a Velocity-based web application can thwart Attach API connections for monitoring

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56242

--- Comment #4 from Christopher Schultz <ch...@christopherschultz.net> ---
I'll give -x:verify:none a try (on the client?) but this also happens with both
jconsole and YourKit. Might this be an underlying JVM bug? I didn't try with
other versions (e.g. OpenJDK, IBM, or Sun/Oracle Java 6) yet.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56242] Deploying a Velocity-based web application can thwart Attach API connections for monitoring

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56242

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X 10.4               |Mac OS X 10.9

--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
Might me Mac/JVM specific. Konstantin was unable to reproduce on Windows.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org