RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-23 Thread Rahul Kumar Singh
Dear Konstantin,
Sorry for the inconvenience caused due to the below!!
We will take care this in future post.


-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Thursday, July 23, 2015 2:09 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-23 8:49 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in:
 Dear Christopher,

 The solution is fine, but first thing we need to identify the root cause.
 If it is the problem of loading a JSP-based class file. Why it is happened 
 in production environment?
 Any solid reason ?


Who knows?  It is your environment and your file.  It is up to you to perform 
the diagnostics.

(Or hire some 3rd party and to provide them access to your system).


For starters, we do not know what file is broken.

Also you stacktrace does not show the root cause. Where this class loading 
error was detected?  There shall be stacktrace from java.lang.ClassFormatError 
that was wrapped by ServletException.  You only provided 3 lines of stacktrace 
of ServletException.

It may be compiler's fault -- current version is 7.0.63 and it has a newer 
version of compiler, or you are hitting some size limit -- quotas, disk 
partition size, 2Gb limit, etc., or you have broken file / faulty HDD --

Maybe not the class file for a JSP page is broken, but some other class file on 
your system

http://tomcat.apache.org/lists.html#tomcat-users
Rules:
- 6. no top-posting

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7

2015-07-23 Thread Rahul Kumar Singh
Dear Christopher,

On further debugging, I found out the difference is seen between 6.0.32 (same 
behavior as in 6.0.28 reported earlier) and 6.0.33 (same as in 7.0.54 reported 
earlier ) I could not figure out which change ( as mentioned in link 
https://tomcat.apache.org/tomcat-6.0-doc/changelog.html  ) has caused this 
difference.

Step to reproduce it?
1.  Untar tomcat versions(Tomcat V6.0.32 and Tomcat V6.0.33)
2.  Enable access log by uncommenting 'AccessLogValve' in conf/server.xml  
as shown below

Valve className=org.apache.catalina.valves.AccessLogValve 
directory=${catalina.base}/logs  
   prefix=localhost_access_log. suffix=.txt pattern=common 
resolveHosts=false/

3.  Deploy a  simple web application (login.jsp) in Tomcat.
// login.jsp in tomcat 
html
   body
%
   String str = request.getRequestURI();
   System.out.println(str);
   out.println(str);
 %
   /body
  /html

4.  Start tomcat
5.  Run client  wget to execute the login.jsp
6.  View access log file entry



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, July 21, 2015 8:47 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why 
there is different behaviour in Tomcat 6 and Tomcat 7

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rahul,

On 7/21/15 6:38 AM, Rahul Kumar Singh wrote:
 “;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL 
 localhost:8080/login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B

 
is not received in tomcat 6(V6.0.28). It is received in tomcat
 7(V7.0.54). What is reason for the different  behavior?

I'm not sure why the change in behavior, but when a client requests a protected 
resource, the container has to redirect that client to the login page.

Before the redirect, a session is created to hold the saved-request to the 
originally-requested protected resource. This session id needs to be preserved. 
If the container can't tell if the client supports cookie-based session 
tracking, it must encode the session id in the login URL just in case. You'll 
find that, if you use a browser with cookies enabled, after the login page 
there will be no jsessionid path parameters in your URLs.

Is the presence of the jsessionid path parameter a problem for you?

(And at this point, it's really a good idea to start planning your upgrade path 
to Tomcat 8, which is quite reliable and stable. Tomcat 6 will EOL 2016-12-31: 
http://tomcat.apache.org/tomcat-60-eol.html)

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVrmJmAAoJEBzwKT+lPKRYhZ4P/0CcVBy4y8S4uXbgc/0ClZ3Z
nD5IBoCei2B3Nek1ioK9gTKpvC+ft0XmQ8ZSoqLKKaz8yuBR8S4Ghts6XzTKogSL
LKLm/WBoNlVw9WcD22HyiVx614irOWow1Z/kuWOHywxC1D+D9YGgN+I85xdc0ubo
gV/7831REdUZdBM0m9D58p/LBZn57cBC79/MPFNOY+jgh2vRuvTjQ2wugH1F4GMi
ll3Oj7DivwusVH5NBzR1kdr+8doM8IRTqpPJIXhptTlyZwCvo9BcdgQgapbAG0Ds
mn3DKBSfiAbxXt64syerLyZWsU0kHWu9nMFaglprFSN+enGXZIDOsi1VxhUbms+A
9n3mFJn4oXNnQ4dIy6V2ZKmRNiMYspSqeVh0qNb34qZYqfQHTjV2e7MYU+cwBk44
qy77vB2FAiwrAu73bF/E0U+aw6PrvjX/S2/6hfN6rePh7+nwX2cYrEGMHd57rUQA
OZWaJZ5YQAuguglkKQy7Kz6i7zpUy8IA0oKd7fEYweMBb8TxpxO9sck1UgRRu/Xl
SvUGShSVgOSGqR22mHzIawmCiPacDQBg/c3IdqkegRhMnOuLnkM8s08/oeNRazSC
ZLi8Ano7Yy97Mc064yKFn5pwFWSLCYN3p4brHkNrv49rulp5CUSU3jRZTdVCBueh
MG41DNmnywwNsl4yaJBG
=Ieud
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7

2015-07-23 Thread Rahul Kumar Singh
Dear Konstantin,

On further debugging, I found out the difference is seen between 6.0.32 (same 
behavior as in 6.0.28 reported earlier) and 6.0.33 (same as in 7.0.54 reported 
earlier ) I could not figure out which change ( as mentioned in link 
https://tomcat.apache.org/tomcat-6.0-doc/changelog.html  ) has caused this 
difference.

Step to reproduce it?
1.  Untar tomcat versions(Tomcat V6.0.32 and Tomcat V6.0.33)
2.  Enable access log by uncommenting 'AccessLogValve' in conf/server.xml  
as shown below

Valve className=org.apache.catalina.valves.AccessLogValve 
directory=${catalina.base}/logs  
   prefix=localhost_access_log. suffix=.txt pattern=common 
resolveHosts=false/

3.  Deploy a  simple web application (login.jsp) in Tomcat.
// login.jsp in tomcat 
html
   body
%
   String str = request.getRequestURI();
   System.out.println(str);
   out.println(str);
 %
   /body
  /html

4.  Start tomcat
5.  Run client  wget to execute the login.jsp
6.  View access log file entry

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Tuesday, July 21, 2015 5:32 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why 
there is different behaviour in Tomcat 6 and Tomcat 7

2015-07-21 14:38 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in:
 Hello Tomcat Team,

 “;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL  
 localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B
  is not received in tomcat 6(V6.0.28) . It is received in tomcat 7(V7.0.54) . 
  What is reason for the different  behavior?

 I used WGET command to send same request to both version of tomcats.  Access 
 logs (logs/localhost_access_log.txt ) of both tomcat versions show the 
 difference


 WGET REQUEST:
 wget localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B  
 .


 Observations:
 TOMCAT 7.0.54 ACCESS LOGS:
 127.0.0.1 - - [21/Jul/2015:08:30:13 +] GET 
 /login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B HTTP/1.0 200 1063


 -Original Message-
 From: Rahul Kumar Singh
 Sent: Tuesday, June 23, 2015 6:17 PM
 To: 'Tomcat Users List'
 Subject: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID.

 Hello Tomcat team,

 In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID 
 parameter in our Web Application
 Example:
 /framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B

 System Configuration (WINDOW7+IE-8)

 Due to this session authentication get failed.



1. Step by step recipe to reproduce your issue  = ?

2. 6.0.28 is old. The current one is 6.0.44

3. http://tomcat.apache.org/security-6.html
CVE-2013-2067 ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-22 Thread Rahul Kumar Singh
Dear Christopher,

The solution is fine, but first thing we need to identify the root cause.
If it is the problem of loading a JSP-based class file. Why it is happened in 
production environment?
Any solid reason ?

Regads,
Rahul Kumar Singh



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, July 22, 2015 7:21 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rahul,

On 7/21/15 11:02 PM, Rahul Kumar Singh wrote:
 Dear Christopher,
 Any quotas on the filesystem?
 No.
 Any idea which class it's having trouble loading?
 
 I have no idea on this but I have got the below exception:
 
 ==


 
2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException:
 java.lang.ClassFormatError: Truncated class file at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:303)

 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:208)
 

Well,
 
it looks like you are having a problem loading a JSP-based class file. You 
could write a script to try to load each JSP .class file to see which one is 
broken. Something like this:

$ for class in $(find . -name *.class) ; \
  do \
echo $class \
javap -classpath [classpath] $(sed -e 's/\.class//' ) \
  done

 For more reference there is some logs from Catalina.out after tomcat 
 startup.
 
 Jul 17, 2015 11:58:33 AM
 org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: At least 
 one JAR was scanned for TLDs yet contained no TLDs. Enable debug 
 logging for this logger for a complete list of JARs that were scanned 
 but no TLDs were found in them. Skipping unneeded JARs during scanning 
 can improve startup time and JSP compilation time.

This is unrelated to your real problem.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVr5+oAAoJEBzwKT+lPKRY54YQAJWJpc9wtHX5jZQS2eX0EqDD
nPvlA9P7w3Oc27w8cTMDdLCXFT60ZqnNFjO3h3UHspJ0B6vBhn1xBUTePRzlnFPn
0qdcTVuTgyAfQzBPh1luqXaEFMi815OV+ptzte8PQtkfcZbwzuAmbt//i4SJdWPt
2ES2FMQlaydv+LpQwUst11eXJtvsLXixKBWlD3BkplZ1tWkHl0xsWHlV7E8qupAG
LslCIV8hVLxYH1rOHbvirtmxDVpaqWGVEbFKq5oT/nBwDRmZWhyB+YcjOluY1KBl
1OtbhEAOuBjYMrtiYvc+gT2FcGk73U0V/diL5niq5LhzsoSwvthRTSp/abSZlzhd
PF5RjtyS5AygdwqJMkYFeIcl3Di3/eFQhq/FQobdcuOXO+QcL4TMUTjrFc80rlE6
hIaQM0XgJbr7aIzLBDsY0WvksGnROwPt6PAlWBisSN9GAD/P2oqUNSzkQmH7UvPp
gF2pGhLZvamNsWqcq+XUfrE2OwGrUsGfHmlxwdXg6ZbWpZ900rVJmLOSfg3xLW8x
lYTKNofdofrZBX93ahp4/xK/UjmBH/ORP7JzXIuirhct3DvDnACPt0JC+WrVKWee
N6aWxKJIIao5YIcT6h3wKY5Oo8Buakteds0xGmTbhzeAdc3oRxyqYQ/jyiRfjsNL
issppLvjG+tCLBboK+3+
=a0Du
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 Thread Rahul Kumar Singh
Do you have sufficient free space on your hard drive?  Maybe your disk is full.
No, Disk Space is enough approx. ~ 96 GB
Did it happen once only, or this is a repeating error?
No it occurs multiple times.


-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Tuesday, July 21, 2015 3:50 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 11:41 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in:
 Hello Tomcat team,

 Thanks for your always support !!

 Please do the needful on below problem.

 Web Application credential:
 -
 Servlet used :servelet3.0
 MVC framework: Struts2.0
 Java: Open JDK 1.7
 

 We have observe the below error in production environment. What is the cause 
 of the issue.

 ==
 ==
 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: 
 java.lang.ClassFormatError: Truncated class file
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
 lterChain.java:208)

 ==
 ==

 Use case:
 1- Http request Start.
 2- Struts 2.0 filter executed.
 3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : 
 error occurs here


 More log reference:

 ==
 === at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 at 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
 at 
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
 at 
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
 at 
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at 
 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.ClassFormatError: Truncated class file
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

 at 
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
 at 
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
 at 
 org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145)
 at 
 org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 ... 83 more
 ==
 ===

 Your Help would be highly appreciated.


Do you have sufficient free space on your hard drive?  Maybe your disk is full.

Did it happen once only, or this is a repeating error?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional

RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 Thread Rahul Kumar Singh
Dear Konstantin,


Do you have sufficient free space on your hard drive?  Maybe your disk is full.

Did it happen once only, or this is a repeating error?
-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Tuesday, July 21, 2015 3:50 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 11:41 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in:
 Hello Tomcat team,

 Thanks for your always support !!

 Please do the needful on below problem.

 Web Application credential:
 -
 Servlet used :servelet3.0
 MVC framework: Struts2.0
 Java: Open JDK 1.7
 

 We have observe the below error in production environment. What is the cause 
 of the issue.

 ==
 ==
 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: 
 java.lang.ClassFormatError: Truncated class file
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
 lterChain.java:208)

 ==
 ==

 Use case:
 1- Http request Start.
 2- Struts 2.0 filter executed.
 3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : 
 error occurs here


 More log reference:

 ==
 === at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 at 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
 at 
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
 at 
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
 at 
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at 
 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.ClassFormatError: Truncated class file
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

 at 
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
 at 
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
 at 
 org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145)
 at 
 org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 ... 83 more
 ==
 ===

 Your Help would be highly appreciated.


Do you have sufficient free space on your hard drive?  Maybe your disk is full.

Did it happen once only, or this is a repeating error?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 Thread Rahul Kumar Singh
Some more reference from catalina.out

Jul 17, 2015 10:15:36 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)


-Original Message-
From: Rahul Kumar Singh [mailto:rahul.si...@nectechnologies.in] 
Sent: Wednesday, July 22, 2015 9:33 AM
To: Tomcat Users List
Subject: RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

Dear Christopher,
Any quotas on the filesystem?
No.
Any idea which class it's having trouble loading?

I have no idea on this but I have got the below exception:

==
2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: 
java.lang.ClassFormatError: Truncated class file
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)


For more reference there is some logs from Catalina.out after tomcat startup.

Jul 17, 2015 11:58:33 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug 
logging for this logger for a complete list of JARs that were scanned but no 
TLDs were found in them. Skipping unneeded JARs during scanning can improve 
startup time and JSP compilation time.


Regards,
Rahul

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, July 21, 2015 10:49 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rahul,

On 7/21/15 10:32 AM, Rahul Kumar Singh wrote:
 Do you have sufficient free space on your hard drive?  Maybe your 
 disk is full.
 
 No, Disk Space is enough approx. ~ 96 GB

Any quotas on the filesystem?

 Did it happen once only, or this is a repeating error?
 
 No it occurs multiple times.

Any idea which class it's having trouble loading?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVrn7wAAoJEBzwKT+lPKRYprcP/AmH3h58sRRF36LyDEm8ixwI
JvbACxfAIcGJcGEi976zjcCQwVDe5jjUcPtMm83ygH1dA5p9u3qAFHXJehRS4T6W
Xq1ZlXF1KrxWNY6jIwWoX2Ut1+3OkBWw2AMuzyR6HcKCHm9975JEzg5lXgpQLcMU
tC2iRHWNZVYGUzq4mCBSqyn27H3z+8uxn14a2tBetxBdimAwyGThxLhJsQUfjUc7
cpbw2nnv9E+RnjamU6zGIqPPTUiY7PzChCiBhfJVWRRig1nxqAg3VOi0rYkC3EL8
iAntsUfJsYc6thLm8dv2dRsrm6Nxc1P9gLE/3mPJfae84ya2knSRkADGtNs8JNwi
rYokc6T8KgPNWNvNO5OjEIZIUR4idaBenw9mjVwGrjH0WRvt7OQ7hoVGPq9kzce5
h0Ob+UL7zWrPXJ+F7AAB4SwfGnToq6WFOtQCt4cOhSIIySxsJsESdKN0G0hudLYp
WHrVh9cD6t7e4T1YJCcrrs5YP5XAuT5A2SIxtXexGsJ4D52HuvdiyD9O4RWCXNnm
j9/dDiPKmhsRYbg7TcEC6O+ggxFdDSzLosM+sPe41eAmhgAYguWskRwdKpE/MYAx
/ZLMsvieGtkoQkbWHBrx9JU6tlKiwh1u5hyGEu4B/IR3JWVL4/5PVozBL2LYq9jT
O5gV21MzzkL2lB5Oy5al
=wMn+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its affiliates. 
Any views or opinions presented in this email are solely those of the author 
and may not necessarily reflect the opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of this message without the prior written 
consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. .
---B
 CB  [  X 
 ܚX KK[XZ[
 \ \  ][  X  ܚX P X ]
 \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \  Z[ X ]
 \X K ܙ B 



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC

RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 Thread Rahul Kumar Singh
Dear Christopher,
Any quotas on the filesystem?
No.
Any idea which class it's having trouble loading?

I have no idea on this but I have got the below exception:

==
2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: 
java.lang.ClassFormatError: Truncated class file
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)


For more reference there is some logs from Catalina.out after tomcat startup.

Jul 17, 2015 11:58:33 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug 
logging for this logger for a complete list of JARs that were scanned but no 
TLDs were found in them. Skipping unneeded JARs during scanning can improve 
startup time and JSP compilation time.


Regards,
Rahul

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, July 21, 2015 10:49 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rahul,

On 7/21/15 10:32 AM, Rahul Kumar Singh wrote:
 Do you have sufficient free space on your hard drive?  Maybe your 
 disk is full.
 
 No, Disk Space is enough approx. ~ 96 GB

Any quotas on the filesystem?

 Did it happen once only, or this is a repeating error?
 
 No it occurs multiple times.

Any idea which class it's having trouble loading?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVrn7wAAoJEBzwKT+lPKRYprcP/AmH3h58sRRF36LyDEm8ixwI
JvbACxfAIcGJcGEi976zjcCQwVDe5jjUcPtMm83ygH1dA5p9u3qAFHXJehRS4T6W
Xq1ZlXF1KrxWNY6jIwWoX2Ut1+3OkBWw2AMuzyR6HcKCHm9975JEzg5lXgpQLcMU
tC2iRHWNZVYGUzq4mCBSqyn27H3z+8uxn14a2tBetxBdimAwyGThxLhJsQUfjUc7
cpbw2nnv9E+RnjamU6zGIqPPTUiY7PzChCiBhfJVWRRig1nxqAg3VOi0rYkC3EL8
iAntsUfJsYc6thLm8dv2dRsrm6Nxc1P9gLE/3mPJfae84ya2knSRkADGtNs8JNwi
rYokc6T8KgPNWNvNO5OjEIZIUR4idaBenw9mjVwGrjH0WRvt7OQ7hoVGPq9kzce5
h0Ob+UL7zWrPXJ+F7AAB4SwfGnToq6WFOtQCt4cOhSIIySxsJsESdKN0G0hudLYp
WHrVh9cD6t7e4T1YJCcrrs5YP5XAuT5A2SIxtXexGsJ4D52HuvdiyD9O4RWCXNnm
j9/dDiPKmhsRYbg7TcEC6O+ggxFdDSzLosM+sPe41eAmhgAYguWskRwdKpE/MYAx
/ZLMsvieGtkoQkbWHBrx9JU6tlKiwh1u5hyGEu4B/IR3JWVL4/5PVozBL2LYq9jT
O5gV21MzzkL2lB5Oy5al
=wMn+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7

2015-07-21 Thread Rahul Kumar Singh
Hello Tomcat Team,

“;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL  
localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B 
 is not received in tomcat 6(V6.0.28) . It is received in tomcat 7(V7.0.54) .  
What is reason for the different  behavior?

I used WGET command to send same request to both version of tomcats.  Access 
logs (logs/localhost_access_log.txt ) of both tomcat versions show the 
difference


WGET REQUEST:
wget localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B  . 


Observations: 
TOMCAT 7.0.54 ACCESS LOGS: 
127.0.0.1 - - [21/Jul/2015:08:30:13 +] GET 
/login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B HTTP/1.0 200 1063


-Original Message-
From: Rahul Kumar Singh 
Sent: Tuesday, June 23, 2015 6:17 PM
To: 'Tomcat Users List'
Subject: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID.

Hello Tomcat team,

In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID 
parameter in our Web Application
Example:
/framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B

System Configuration (WINDOW7+IE-8)

Due to this session authentication get failed.


But in Tomcat 6 It is not happening.
Could any one help me on this from Apache Tomcat community.

Regards,
Rahul Kumar Singh




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file

2015-07-21 Thread Rahul Kumar Singh
Hello Tomcat team,

Thanks for your always support !!

Please do the needful on below problem.

Web Application credential:
-
Servlet used :servelet3.0
MVC framework: Struts2.0
Java: Open JDK 1.7


We have observe the below error in production environment. What is the cause of 
the issue.


2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: 
java.lang.ClassFormatError: Truncated class file
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)



Use case:
1- Http request Start.
2- Struts 2.0 filter executed.
3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : error 
occurs here 


More log reference:

=
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at 
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
at 
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
at 
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145)
at 
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
... 83 more
=

Your Help would be highly appreciated.


Regards,
Rahul Kumar Singh




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately

Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID.

2015-06-23 Thread Rahul Kumar Singh
Hello Tomcat team,

In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID 
parameter in our Web Application
Example:
/framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B

System Configuration (WINDOW7+IE-8)

Due to this session authentication get failed.


But in Tomcat 6 It is not happening.
Could any one help me on this from Apache Tomcat community.

Regards,
Rahul Kumar Singh




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SSL / TLS compression | SPDY service|CVE-2012-4929

2015-03-27 Thread Rahul Kumar Singh
Hello Tomcat support team,

Thanks for your continuous support.


Problem : Security issue | CVE-2012-4929

Overview:
The TLS protocol 1.2 and earlier, as used in Mozilla Firefox, Google Chrome, 
Qt, and other products, can encrypt compressed data without properly 
obfuscating the length of the unencrypted data, which allows man-in-the-middle 
attackers to obtain plaintext HTTP headers by observing length differences 
during a series of guesses in which a string in an HTTP request potentially 
matches an unknown string in an HTTP header, aka a CRIME attack.



The remote service has one of two configurations that are known to be
required for the CRIME attack:
- SSL / TLS compression is enabled.


The attack allows an attacker to reveal sensitive information that is being 
passed inside an encrypted SSL tunnel. The most straightforward way to leverage 
this vulnerability is to use it to retrieve cookies being passed by an 
application and use them to login to the application as the victim
The TLS protocol encrypts compressed data without properly obfuscating the 
length of the unencrypted data. Successful exploitation may result in a remote 
attacker conducting man-in-the-middle attacks.
According to our analysis seems:
(No SSL compression in IE, Firefox has disabled it from V15.0 in 2012 and 
already disbaled in latest version of chrome).- TLS advertises the SPDY 
protocol earlier than version 4.

Solution: Disable compression and / or the SPDY service.

So how to disable compression and / or the SPDY service in tomcat6.


Regards,
Rahul Kumar Singh



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: SSL / TLS compression | SPDY service|CVE-2012-4929

2015-03-27 Thread Rahul Kumar Singh
Ok I understand, 
Is it mentioned somewhere in tomcat spec. That it is not being used in JSSE 
connector.

Based on the above answer my next question:
If any browser is affected with this CVE , then what happen, e.g IE-11.
If user tries to open the web application from IE-11 , then what happen.

From: Ognjen Blagojevic [ognjen.d.blagoje...@gmail.com]
Sent: Friday, March 27, 2015 8:34 PM
To: Tomcat Users List
Subject: Re: SSL / TLS compression | SPDY service|CVE-2012-4929

Rahul,

On 27.3.2015 14:42, Rahul Kumar Singh wrote:
 So how to disable compression and / or the SPDY service in tomcat6.

If you are using JSSE connectors (BIO/NIO/NIO2), compression is already
disabled because JSSE does not support it, and there is no support for
SPDY protocol on those connectors.

If you are using APR/Native connector, if you didn't explicitly enabled
it, SPDY is disabled by default. You may disable TLS compression using
APR/Native connector parameter SSLDisableCompression=true.

-Ognjen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-25 Thread Rahul Kumar Singh
Hello Tomcat support Team,

One important observation from the GC logs reported in tomcat 7.


GC execution time is increased in tomcat7, which increased the young gen 
capacity of java heap and resident memory of tomcat process is reported by 
Linux top , which is bounded by the java virtual memory. That is why resident 
memory is also increase.

Could anyone from apache Group look into this observation/problem.
GC Logs are attached in the mail for both tomcat 6 and tomcat 7.

=

Regards,
Rahul Kumar Singh






-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Wednesday, March 25, 2015 4:11 AM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Rainer Jung wrote:
 Some numbers from a test here on RHEL 6, using Java 1.7.0_76 and TC 
 6.0.43, 7.0.59 and 8.0.20.
 
 Measurement is taken directly after start (a) plus once after one 
 request to a non-existing page and two full GCs (b). Only manager was 
 deployed, not example webapps or docs. GC was run using jcmd PID GC.run
 
 Numbers from ps
 
  RSSa  RSSb   SZaSZbVSZaVSZb
 tc6 62372 68336 272952 273532 1091808 1094128
 tc7 63608 70456 271710 271978 1086840 1087912
 tc8 72576 79140 272257 272525 1089028 1090100
 
 Differences between TC6 and 7 marginal, differences between tc7 and 8 
 only noticable in RSS, around 9MB.
 
 Numbers from jstat -gc. First Capacity:
 
 Semi Spaces start with 512KB and grow to 768.0KB (TC6), 896.0KB (tc7) 
 and 1024.0 (tc8). Those indicate increasing allocations, but are not 
 relevant for total memory use.
 
  Edena  EdenbOldaOldb   Perma   Permb
 tc6 4288.0 6656.0 10688.0 16320.0 21248.0 21248.0
 tc7 4288.0 7168.0 10688.0 17904.0 21248.0 21248.0
 tc8 6144.0 8640.0 15316.0 21316.0 21248.0 21248.0
 
 Again this is capacity so including garbage and unused. We see that 
 Perm is unchanged. For all versions Eden grows by 2.4-2.9 MB due to 
 allocation activity. Numbers for tc6 and 7 are again very similar, tc8 
 numbers are slightly higher already after startup. Old (Tenured) grows 
 by about 6-7MB, again very similar for tc 6 and tc 7 and slightly 
 higher for TC 8.
 
 Now for the used numbers after GC, which are more relevant (allocation 
 rates are another topic):
 
  Edena  EdenbOldaOldb   Perma   Permb
 tc6 2910.8   69.3  7231.7  7984.1 13923.0 14429.1
 tc7 2326.1   73.8  8504.4  9661.2 13910.1 15340.1
 tc8  203.7   60.9 10577.6 12599.7 16183.3 17653.8
 
 So the live objects are Edenb+Oldb:
 
 Edenb+Oldb
 tc6  8053.4
 tc7  9735.0
 tc8 12660.6
 
 And here we see some increase but the total amount of about 2MB 
 between tc 6 and 7 and about another 3 MB between 7 and 8 seems to be 
 not really problematic. The same holds true for perm, there's an 
 increase of about 1MB between 6 and 7 and 2 MB between 7 and 8.
 
 Finally: where does the difference between RSS, Sz and the sum of heap 
 and eden come from?
 
 Example for TC 8 case b:
 
 RSS: 79140
 SZ: 272525
 
 Sum of RSS due to smaps: 79088 so roughly consistent.
 
 S0+S1+E+O+P capacity: 53252, but Rss 40872, so a delta of 38MB to RSS.
 
 smaps entries that can be identified:
 
 TypeSize   Rss
 Perm   21248 17656
 Old21316 15040
 Eden+S0+S1 10688  8176
 libjvm.so  11732  7712 (read-only)
 
 Then about 21 thread stack reservations, total Size 21676, total Rss 2804.
 
 So the delta goes down to 38 - 7.7 - 2.8 = 28MB.
 
 Some more segments, that I can't fully interprete are:
 
 Size  Rssfrom -to   Perm File
 8852 7648 7f281800-7f28188a5000 rw-p
 8940 6496 7f281400-7f28148bb000 rw-p
 51116 4064 7f283527-7f283845b000 rw-p
 2496 2048 7f283500-7f283527 rwxp
 1788 1732 7f283d443000-7f283d602000 r--s .../lib/rt.jar
 3304 1444 7f282c00-7f282c33a000 rw-p
 784 784 7f283f1d9000-7f283f29d000 rw-p .../lib/amd64/server/libjvm.so
 1564 648 3f6d20-3f6d387000 r-xp /lib64/libc-2.12.so
 536 524 7f283000-7f2830086000 rw-p
 272 208 7f283f29d000-7f283f2e1000 rw-p
 
 and those nearly make up the missing 28MB Rss (whatever they are).
 

I don't know how to describe the above, nor the dedication that went into 
gathering that (and at this late European hour at that). Brilliant ?
In any case, thank you.

But now, for the mere humans among us, what does it mean in terms of the OP and 
his original question : why does Tomcat 7 seem to be using 70 MB more memory at 
startup than Tomcat 6 ?
Is it :
- it doesn't matter. The numbers shown are wrong, and if you run 10 instances 
of Tomcat 7 at the same time, you will see that they are not really using 700 
MB more than before.
or
- it is normal and expected. Tomcat 7 - because of the new Servlet Spec - needs 
to borogrove the watchamecalits, and this is using 70 MB more heap than before. 
In return, you get a 25% performance improvement later

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-24 Thread Rahul Kumar Singh
Some of the observations during the GC call monitoring / heap dump from JMAP:


Tomcat Version

Stages

Java Heap Usage

Java Heap Capacity

Virtual memory
(by top)

Resident Memory
(by top)

Tomcat 6

After tomcat startup

17.18 MB

367.8 MB

6712 MB

175 MB

After functional operation

18.77 MB

367.8 MB

6745 MB

207 MB

After Operation

45.51 MB

331.0 MB

6745 MB

235 MB

Tomcat 7

After tomcat startup

57.90 MB

655.8 MB

6795 MB

423 MB

After functional operation

97.64 MB

655.8 MB

6828 MB

558 MB

After Operation

142.58 MB

1864.0 MB

6828 MB

1000 MB






Observation:

•   Top’s reported virtual memory is approximately same.

•   Resident memory correlates with Java heap capacity. Refer to next slide 
for details.





-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, March 24, 2015 9:00 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)



Johan Compagner wrote:



 I understand all that.  But the basic view, from a sysadmin's point

 of view is this :



 Tomcat 6(6.0.28)

 Virtual Memory: 6772 MB

 Resident Memory: 81 MB



 Tomcat 7(7.0.54)

 Virtual Memory: 6778 MB

 Resident Memory: 148 MB





 what does that Resident exactly mean here?

 i guess the total heap the java vm has taken after startup?



 Because that could be quite logical, maybe tomcat 7 needs a lot more

 data because of that annotation scanning Doesn't it load in way more

 classes?

 All that processing and then also maybe loading in up front way more

 classes then before will mean that the heap (and none heap in this

 scenario) is already way more loaded.





That's the kind of thing that I mean.

The OP is asking : assuming the same host, the same JVM, the same startup 
parameters, the same default ROOT application, why does Tomcat 7 seem to be 
using 70 MB more RAM at startup than Tomcat 6 ?

The answer can be :

- it doesn't matter. The numbers shown are wrong, and if you run 10 instances 
of Tomcat 7 at the same time, you will see that they are not really using 700 
MB more than before.

or

- it is normal and expected. Tomcat 7 - because of the new Servlet Spec - needs 
to borogrove the watchamecalits, and this is using 70 MB more heap than before. 
In return, you get a 25% performance improvement later..

or

- we have no clue. It does not happen on other machines, so there must be 
something special on your machine, and to find out what we need heap dumps.

or

???



The OP just wants to know which, but instead we are just telling him that he 
should take heap dumps or examine cryptic memory allocation displays etc.. He 
may not be adverse to that in the end, but some basic preliminary guidance may 
be helpful.







-

To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.orgmailto:users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: 
users-h...@tomcat.apache.orgmailto:users-h...@tomcat.apache.org





DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) 
:
Tomcat7
application user  5597 1 38 02:11 ?00:00:13 
/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java 
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar 
-Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat 
-Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start

Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) 
:
Tomcat6
application user  2860 1  0 10:34 ?00:01:35 
/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java 
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
/opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat 
-Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp 
org.apache.catalina.startup.Bootstrap start

Also, which exact example Tomcat application are you deploying in both cases 
above ?
The default application came with apache tomcat 6 and tomcat7

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, March 23, 2015 5:27 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Rahul Kumar Singh wrote:
 Hello André Warnier,
 
 Thanks for your response.
 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 Yes, we have done the above suggested exercise. And got  the below output of 
 top command result.
 
 Development environment:
 ===
 RAM: 25 GB 
 CPU: CPU Intel(R) Xeon(R) CPU  X5450  @ 3.00GHz
 OS: RHEL Linux (5.8)
 ==
 
 Tomcat 6(6.0.28) 
 Virtual Memory: 6772 MB
 Resident Memory: 81 MB
 

Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) :


 Tomcat 7(7.0.54)
 Virtual Memory: 6778 MB
 Resident Memory: 148 MB


Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) :

(That is for us to know if, for example, there are any command-line parameters 
that might 
explain the difference)

Also, which exact example Tomcat application are you deploying in both cases 
above ?

Note: these questions are not asked to annoy you, or to delay a response.  You 
realise 
that Tomcat is open-source free software, and that the people manning this 
forum are doing 
that for free, on their own time.  Also simulating your case will require 
someone to spend 
some time creating the same setup as yours.  So all in all, the more precise 
information 
which you provide, the more time you allow these people to save in order to 
give you an 
accurate answer, and the faster you will have that answer.

And if you want to know about heap dumps, this looks like a good start : 
http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine
(searching Google for tomcat heap dump)

 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to 
 have a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what.
 
 The initial value is also somewhere double of tomcat6.
 
 
 Regards,
 Rahul Kumar Singh
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Monday, March 23, 2015 2:32 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
 Tomcat 6 (6.0.28)
 
 Rahul Kumar Singh wrote:
 Dear Thomas,

 Thanks for your quick response,



 Tomcat doesn't use anything like that much memory on its own. I suspect it 
 is the application although the difference between Tomcat 6 and Tomcat 7 is 
 unexpected.


 Ok, I understand,

 But could you please confirm us theoretically that is there any difference 
 in initial memory requirement of tomcat6 and tomcat 7?


 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to have 
 a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Plz ignore previous mail

-Original Message-
From: Rahul Kumar Singh 
Sent: Monday, March 23, 2015 6:05 PM
To: Tomcat Users List
Subject: RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) 
:

application user  2860 1  0 10:34 ?00:01:35 
/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java 
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
/opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat 
-Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/hydra-tomcat/temp 
org.apache.catalina.startup.Bootstrap start


Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) :




-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, March 23, 2015 5:27 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Rahul Kumar Singh wrote:
 Hello André Warnier,
 
 Thanks for your response.
 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 Yes, we have done the above suggested exercise. And got  the below output of 
 top command result.
 
 Development environment:
 ===
 RAM: 25 GB 
 CPU: CPU Intel(R) Xeon(R) CPU  X5450  @ 3.00GHz
 OS: RHEL Linux (5.8)
 ==
 
 Tomcat 6(6.0.28) 
 Virtual Memory: 6772 MB
 Resident Memory: 81 MB
 

Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) :


 Tomcat 7(7.0.54)
 Virtual Memory: 6778 MB
 Resident Memory: 148 MB


Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) :

(That is for us to know if, for example, there are any command-line parameters 
that might 
explain the difference)

Also, which exact example Tomcat application are you deploying in both cases 
above ?

Note: these questions are not asked to annoy you, or to delay a response.  You 
realise 
that Tomcat is open-source free software, and that the people manning this 
forum are doing 
that for free, on their own time.  Also simulating your case will require 
someone to spend 
some time creating the same setup as yours.  So all in all, the more precise 
information 
which you provide, the more time you allow these people to save in order to 
give you an 
accurate answer, and the faster you will have that answer.

And if you want to know about heap dumps, this looks like a good start : 
http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine
(searching Google for tomcat heap dump)

 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to 
 have a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what.
 
 The initial value is also somewhere double of tomcat6.
 
 
 Regards,
 Rahul Kumar Singh
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Monday, March 23, 2015 2:32 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
 Tomcat 6 (6.0.28)
 
 Rahul Kumar Singh wrote:
 Dear Thomas,

 Thanks for your quick response,



 Tomcat doesn't use anything like that much memory on its own. I suspect it 
 is the application although the difference between Tomcat 6 and Tomcat 7 is 
 unexpected.


 Ok, I understand,

 But could you please confirm us theoretically that is there any difference 
 in initial memory requirement of tomcat6 and tomcat 7?


 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to have 
 a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 DISCLAIMER:
 ---
 The contents of this e-mail and any attachment(s) are confidential

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) 
:

application user  2860 1  0 10:34 ?00:01:35 
/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java 
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
/opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat 
-Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/hydra-tomcat/temp 
org.apache.catalina.startup.Bootstrap start


Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) :




-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, March 23, 2015 5:27 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Rahul Kumar Singh wrote:
 Hello André Warnier,
 
 Thanks for your response.
 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 Yes, we have done the above suggested exercise. And got  the below output of 
 top command result.
 
 Development environment:
 ===
 RAM: 25 GB 
 CPU: CPU Intel(R) Xeon(R) CPU  X5450  @ 3.00GHz
 OS: RHEL Linux (5.8)
 ==
 
 Tomcat 6(6.0.28) 
 Virtual Memory: 6772 MB
 Resident Memory: 81 MB
 

Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) :


 Tomcat 7(7.0.54)
 Virtual Memory: 6778 MB
 Resident Memory: 148 MB


Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) :

(That is for us to know if, for example, there are any command-line parameters 
that might 
explain the difference)

Also, which exact example Tomcat application are you deploying in both cases 
above ?

Note: these questions are not asked to annoy you, or to delay a response.  You 
realise 
that Tomcat is open-source free software, and that the people manning this 
forum are doing 
that for free, on their own time.  Also simulating your case will require 
someone to spend 
some time creating the same setup as yours.  So all in all, the more precise 
information 
which you provide, the more time you allow these people to save in order to 
give you an 
accurate answer, and the faster you will have that answer.

And if you want to know about heap dumps, this looks like a good start : 
http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine
(searching Google for tomcat heap dump)

 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to 
 have a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what.
 
 The initial value is also somewhere double of tomcat6.
 
 
 Regards,
 Rahul Kumar Singh
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Monday, March 23, 2015 2:32 PM
 To: Tomcat Users List
 Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
 Tomcat 6 (6.0.28)
 
 Rahul Kumar Singh wrote:
 Dear Thomas,

 Thanks for your quick response,



 Tomcat doesn't use anything like that much memory on its own. I suspect it 
 is the application although the difference between Tomcat 6 and Tomcat 7 is 
 unexpected.


 Ok, I understand,

 But could you please confirm us theoretically that is there any difference 
 in initial memory requirement of tomcat6 and tomcat 7?


 
 That should be much easier and quicker to check this by yourself, as you 
 obviously already have the 2 Tomcat versions up and running.
 Remove your own application, deploy one of the standard Tomcat-examples 
 applications, and have a look.
 
 If there is still a big difference between v6 and v7, then come back here.  
 At least then there will be a reproducible test case for someone here to have 
 a closer look.
 And if there is not a big difference, then obviously it must have something 
 to with your application.  And then, follow Mark's already-given advice to 
 find out what.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 DISCLAIMER:
 ---
 The contents of this e-mail and any attachment(s) are confidential and
 intended
 for the named recipient(s) only. 
 It shall not attach any liability on the originator or NEC or its
 affiliates. Any views or opinions presented in 
 this email are solely those of the author and may not necessarily reflect

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Dear Thomas,

Thanks for your quick response,



Tomcat doesn't use anything like that much memory on its own. I suspect it is 
the application although the difference between Tomcat 6 and Tomcat 7 is 
unexpected.



Ok, I understand,

But could you please confirm us theoretically that is there any difference in 
initial memory requirement of tomcat6 and tomcat 7?



Above question is because of the below observation.

1-The deployed application is same. Even no difference in deployment scenario 
and no change in application.

2-The underlining java environment is also same.

(java version 1.7.0_09-icedtea

OpenJDK Runtime Environment (rhel-2.3.3.el5.1-x86_64)

OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)),



3-The initial memory of tomcat is increased by three times.





Regards,

Rahul Kumar Singh









-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Monday, March 23, 2015 1:13 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)



On 23/03/2015 07:05, Rahul Kumar Singh wrote:

 Hi Tomcat support team,



 While upgrading Tomcat from tomcat 6(6.0.28) to tomcat 7 (7.0.54).

 the following problem happens. TOMCAT 7 (7.0.54) memory consumption

 increased about approx. 3 times compare to the existing tomcat 6

 (6.0.28) memory consumption.



 Tomcat 6.0.28 memory consumption MAP. RESIDENT MEMORY:300-400 MB

 Approx.



 Tomcat 7.0.54 memory consumption MAP. RESIDENT MEMORY:900-1800 MB

 Approx.



 Underline java platform is same(OpenJDK7) in both tomcat 6 and tomcat

 7. Now question is that, why the memory consumption increased about 3

 times in Tomcat 7.



Tomcat doesn't use anything like that much memory on its own. I suspect it is 
the application although the difference between Tomcat 6 and Tomcat 7 is 
unexpected.



The only way to find out what is going on is to look at what is using that 
memory. You'll need to take a heap dump and/or use a profiler to find out.



Mark



-

To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.orgmailto:users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: 
users-h...@tomcat.apache.orgmailto:users-h...@tomcat.apache.org





DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Really? The Tomcat ROOT web application is taking up 3 times as much heap 
space in Tomcat 6 as Tomcat 7?
Yes.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, March 23, 2015 7:52 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rahul,

On 3/23/15 8:39 AM, Rahul Kumar Singh wrote:
 Exact command-line that starts Tomcat7 (as given e.g. by ps -ef
 | grep java) :
 Tomcat7 application user  5597 1 38 02:11 ?00:00:13
 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java
 -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
 /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
 -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat 
 -Djava.io.tmpdir=/opt/tomcat/temp 
 org.apache.catalina.startup.Bootstrap start
 
 Exact command-line that starts Tomcat6 (as given e.g. by ps -ef
 | grep java) :
 Tomcat6 application user  2860 1  0 10:34 ?00:01:35
 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java
 -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath 
 /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat 
 -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp 
 org.apache.catalina.startup.Bootstrap start
 
 Also, which exact example Tomcat application are you deploying in 
 both cases above ?
 The default application came with apache tomcat 6 and tomcat7

Really? The Tomcat ROOT web application is taking up 3 times as much heap space 
in Tomcat 6 as Tomcat 7?

- -chris

 -Original Message- From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Monday, March 23, 2015 5:27 PM To:
 Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is 
 very high(3 times) than Tomcat 6 (6.0.28)
 
 Rahul Kumar Singh wrote:
 Hello André Warnier,
 
 Thanks for your response.
 
 That should be much easier and quicker to check this by yourself, as 
 you obviously already have the 2 Tomcat versions up and running. 
 Remove your own application, deploy one of the standard 
 Tomcat-examples applications, and have a look.
 
 Yes, we have done the above suggested exercise. And got  the below 
 output of top command result.
 
 Development environment: === RAM: 25 GB
 CPU: CPU Intel(R) Xeon(R) CPU  X5450  @ 3.00GHz OS: RHEL Linux
 (5.8) ==
 
 Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB
 
 
 Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | 
 grep java) :
 
 
 Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB
 
 
 Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | 
 grep java) :
 
 (That is for us to know if, for example, there are any command-line 
 parameters that might explain the difference)
 
 Also, which exact example Tomcat application are you deploying in both 
 cases above ?
 
 Note: these questions are not asked to annoy you, or to delay a 
 response.  You realise that Tomcat is open-source free software, and 
 that the people manning this forum are doing that for free, on their 
 own time.  Also simulating your case will require someone to spend 
 some time creating the same setup as yours.  So all in all, the more 
 precise information which you provide, the more time you allow these 
 people to save in order to give you an accurate answer, and the faster 
 you will have that answer.
 
 And if you want to know about heap dumps, this looks like a good start 
 :
 http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-jav
 a-virtual-machine

 
(searching Google for tomcat heap dump)
 
 If there is still a big difference between v6 and v7, then come back 
 here.  At least then there will be a reproducible test case for 
 someone here to have a closer look. And if there is not a big 
 difference, then obviously it must have something to with your 
 application.  And then, follow Mark's already-given advice to find 
 out what.
 
 The initial value is also somewhere double of tomcat6.
 
 
 Regards, Rahul Kumar Singh
 
 -Original Message- From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Monday, March 23, 2015 2:32 PM To:
 Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is 
 very high(3 times) than Tomcat 6 (6.0.28)
 
 Rahul Kumar Singh wrote:
 Dear Thomas,
 
 Thanks for your quick response,
 
 
 
 Tomcat doesn't use anything like that much memory on its own.
 I suspect it is the application although the difference between 
 Tomcat 6 and Tomcat 7 is unexpected.
 
 
 Ok, I understand,
 
 But could you please confirm us theoretically that is there any 
 difference in initial memory

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Just remember that the numbers out of top are at best approximations, and, as 
Rainer pointed out, not taking measurements immediately after a GC is a 
guarantee of an apples versus oranges comparison.

The appropriate tools (e.g., VisualVM) must be used for any rational analysis.
During the analysis, top is referred for memory report too.


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, March 23, 2015 8:03 PM
To: Tomcat Users List
Subject: RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) 
 than Tomcat 6 (6.0.28)

 Really? The Tomcat ROOT web application is taking up 3 times as much 
 heap space in Tomcat 6 as Tomcat 7?

Just remember that the numbers out of top are at best approximations, and, as 
Rainer pointed out, not taking measurements immediately after a GC is a 
guarantee of an apples versus oranges comparison.

The appropriate tools (e.g., VisualVM) must be used for any rational analysis.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Hi Tomcat support team,

While upgrading Tomcat from tomcat 6(6.0.28) to tomcat 7 (7.0.54). the 
following problem happens. TOMCAT 7 (7.0.54) memory consumption increased about 
approx. 3 times compare to the existing tomcat 6 (6.0.28) memory consumption.

Tomcat 6.0.28 memory consumption MAP. RESIDENT MEMORY:300-400 MB Approx.

Tomcat 7.0.54 memory consumption MAP. RESIDENT MEMORY:900-1800 MB Approx.

Underline java platform is same(OpenJDK7) in both tomcat 6 and tomcat 7. Now 
question is that, why the memory consumption increased about 3 times in Tomcat 
7.




Regards,
Rahul Kumar Singh




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Hello André Warnier,

Thanks for your response.

That should be much easier and quicker to check this by yourself, as you 
obviously already have the 2 Tomcat versions up and running.
Remove your own application, deploy one of the standard Tomcat-examples 
applications, and have a look.

Yes, we have done the above suggested exercise. And got  the below output of 
top command result.

Development environment:
===
RAM: 25 GB 
CPU: CPU Intel(R) Xeon(R) CPU  X5450  @ 3.00GHz
OS: RHEL Linux (5.8)
==

Tomcat 6(6.0.28) 
Virtual Memory: 6772 MB
Resident Memory: 81 MB

Tomcat 7(7.0.54)
Virtual Memory: 6778 MB
Resident Memory: 148 MB

If there is still a big difference between v6 and v7, then come back here.  At 
least then there will be a reproducible test case for someone here to have a 
closer look.
And if there is not a big difference, then obviously it must have something to 
with your application.  And then, follow Mark's already-given advice to find 
out what.

The initial value is also somewhere double of tomcat6.


Regards,
Rahul Kumar Singh

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, March 23, 2015 2:32 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than 
Tomcat 6 (6.0.28)

Rahul Kumar Singh wrote:
 Dear Thomas,
 
 Thanks for your quick response,
 
 
 
 Tomcat doesn't use anything like that much memory on its own. I suspect it 
 is the application although the difference between Tomcat 6 and Tomcat 7 is 
 unexpected.
 
 
 
 Ok, I understand,
 
 But could you please confirm us theoretically that is there any difference in 
 initial memory requirement of tomcat6 and tomcat 7?
 
 

That should be much easier and quicker to check this by yourself, as you 
obviously already have the 2 Tomcat versions up and running.
Remove your own application, deploy one of the standard Tomcat-examples 
applications, and have a look.

If there is still a big difference between v6 and v7, then come back here.  At 
least then there will be a reproducible test case for someone here to have a 
closer look.
And if there is not a big difference, then obviously it must have something to 
with your application.  And then, follow Mark's already-given advice to find 
out what.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. 
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. .
---

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)

2015-03-23 Thread Rahul Kumar Singh
Also interesting is cat /proc/PID/maps but here one would need to calculate 
sizes per line from the two hex addresses given at the start of each line. 
Something like:

cat /proc/PID/maps | perl -n -e '($a,$b)=split(/[- ]/);print hex($b)-hex($a), 
 , $_;' | sort -n

(replace PID by the current Tomcat java process id).

Command: cat /proc/19487/maps | perl -n -e '($a,$b)=split(/[- ]/);print 
hex($b) -hex($a),  , $_;' |sort -n abc.txt

OUTPUT
0d4b8000-0e736000 rw-p 0d4b8000 00:00 0  [heap]
ff60-ffe0 ---p  00:00 0  
[vsyscall]
2aaab000-2aab3000 r--s 00061000 09:01 2519920
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/ext/gnome-java-bridge.jar
2aab3000-2aab5000 r--s 6000 09:01 1834753
/opt/tomcat/bin/bootstrap.jar
2aab5000-2aab6000 r--s 5000 09:01 1834758
/opt/tomcat/bin/commons-daemon.jar
2aab6000-2aab8000 r--s 8000 09:01 1834770
/opt/tomcat/bin/tomcat-juli.jar
2aab8000-2aac5000 r-xp  09:01 2519898
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so
2aac5000-2acc4000 ---p d000 09:01 2519898
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so
2acc4000-2acc6000 rw-p c000 09:01 2519898
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so
2acc6000-2acef000 r-xp  09:01 2519877
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so
2acef000-2aeee000 ---p 00029000 09:01 2519877
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so
2aeee000-2aef rw-p 00028000 09:01 2519877
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so
2aef-2aef1000 r--p 2aef 00:00 0 
2aef1000-2aef2000 rw-p 2aef1000 00:00 0 
2aef2000-2aefa000 rw-s  09:01 2056360
/tmp/hsperfdata_app/19487
2aefe000-2af08000 r-xp  09:01 261147 
/lib64/libnss_files-2.5.so
2af08000-2b107000 ---p a000 09:01 261147 
/lib64/libnss_files-2.5.so
2b107000-2b108000 r--p 9000 09:01 261147 
/lib64/libnss_files-2.5.so
2b108000-2b109000 rw-p a000 09:01 261147 
/lib64/libnss_files-2.5.so
2b109000-2b111000 r-xp  09:01 2519899
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so
2b111000-2b31 ---p 8000 09:01 2519899
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so
2b31-2b311000 rw-p 7000 09:01 2519899
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so
2b311000-2b771000 rwxp 2b311000 00:00 0 
2b771000-2e311000 rw-p 2b771000 00:00 0 
2e311000-2e323000 rw-p 2e311000 00:00 0 
2e323000-2e3d1000 rw-p 2e323000 00:00 0 
2e3d1000-2e3e rw-p 2e3d1000 00:00 0 
2e3e-2e424000 rw-p 2e3e 00:00 0 
2e424000-2e51f000 rw-p 2e424000 00:00 0 
2e51f000-2f3cd000 rw-p 2e51f000 00:00 0 
2f3cd000-2f60c000 rw-p 2f3cd000 00:00 0 
2f60c000-2f6ec000 ---p 2f60c000 00:00 0 
2f6ec000-2fba2000 rw-p 2f6ec000 00:00 0 
2fba2000-2fc9e000 rw-p 2fba2000 00:00 0 
2fc9e000-2aaab0b4d000 rw-p 2fc9e000 00:00 0 
2aaab0b4d000-2aaab0b5c000 rw-p 2aaab0b4d000 00:00 0 
2aaab0b5c000-2aaab0ba rw-p 2aaab0b5c000 00:00 0 
2aaab0ba-2aaace81c000 rw-p 2aaab0ba 00:00 0 
2aaace81c000-2aaace9d7000 r--s 01c8f000 09:01 2519963
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/rt.jar
2aaace9d7000-2aaad0cd4000 rw-p 2aaace9d7000 00:00 0 
2aaad0cd4000-2aaad42a3000 r--p  09:01 2227921
/usr/lib/locale/locale-archive
2aaad42a3000-2aaad42b3000 r-xp  09:01 2519890
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so
2aaad42b3000-2aaad44b3000 ---p 0001 09:01 2519890
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so
2aaad44b3000-2aaad44b4000 rw-p 0001 09:01 2519890
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so
2aaad44b4000-2aaad44c9000 r-xp  09:01 2519889
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnet.so
2aaad44c9000-2aaad46c9000 ---p 00015000 09:01 2519889
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnet.so
2aaad46c9000-2aaad46ca000 rw-p 00015000 09:01 2519889