Re: tomcat8 ClassCastException

2016-10-18 Thread musafir
Hey Guys, can you pls provide some suggestions..exact copy of
tomcat+webapp working fine on one machine..no issues in tomcat7with either
jdk7/8



On Monday, October 17, 2016, musafir <neet.musa...@gmail.com> wrote:

> Hi Apache Team,
>
> Got 2 tomcat hosting same web application. Tomcats are  installed on
> dedicated centos(6.8) VMs.  Everything was working fine in tomcat7 till
> upgrade to tomcat8(8.0.38).
>
> Now on one server, i am getting below error..
> java.lang.ClassCastException: java.lang.String cannot be cast to
> java.lang.Integer
>
> e.g code iFacType = (Integer)userprofilesettings.get("facilityType");
>
> Can you guys pls help understand
> a) why it happens only on one server . is it something to do non
> deterministic loader as reported in  https://bz.apache.org/
> bugzilla/show_bug.cgi?id=57129
> b) Since its happening only on one server. is there any quick fix i can
> use..fyi,if i downgrade  to tomcat 7 on VM, application works fine.
>
>
> Regards, neet.
>
>
>
>


tomcat8 ClassCastException

2016-10-17 Thread musafir
Hi Apache Team,

Got 2 tomcat hosting same web application. Tomcats are  installed on
dedicated centos(6.8) VMs.  Everything was working fine in tomcat7 till
upgrade to tomcat8(8.0.38).

Now on one server, i am getting below error..
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Integer

e.g code iFacType = (Integer)userprofilesettings.get("facilityType");

Can you guys pls help understand
a) why it happens only on one server . is it something to do non
deterministic loader as reported in
https://bz.apache.org/bugzilla/show_bug.cgi?id=57129
b) Since its happening only on one server. is there any quick fix i can
use..fyi,if i downgrade  to tomcat 7 on VM, application works fine.


Regards, neet.


Re: cpu spike after upgrade from tomcat 6.0.36 to tomcat 7.0.57

2015-08-19 Thread musafir
On Tue, Aug 18, 2015 at 1:46 PM, Mark Thomas ma...@apache.org wrote:

 On 18/08/2015 18:16, Christopher Schultz wrote:
  Musafir,
 
  On 8/18/15 1:08 PM, Mark Thomas wrote:
  On 18/08/2015 17:10, musafir wrote:
  On Tue, Aug 18, 2015 at 11:57 AM, Mark Thomas ma...@apache.org
  wrote:
 
  On 18/08/2015 16:50, musafir wrote:
  Hello, ugraded tomcat from 6.0.36(jdk 6) to tomcat7.0.57
  (jdk7).. os:centos 6.6 ...seeing high cpu spike after
  upgrade doing top and  thread dump shows  only thread
  that is always using cpu is:
 
  How have you matched the thread using CPU in top with the
  thread in the thread dump?
 
  Mark
 
 
  ContainerBackgroundProcessor[StandardEngine[Catalina]]
  daemon prio=10 tid=0x7ff8fc599800 nid=0xc1d2e waiting on
  condition [0x7ff803ffe000] java.lang.Thread.State:
  TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native
  Method) at
  org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
  run(ContainerBase.java:1513)
 
 
  at java.lang.Thread.run(Thread.java:745)
 
  disabled  backgroundProcessorDelay
  (backgroundProcessorDelay=-1) ..don't see any thread that is
  always using cpu..
 
  Q: why backgroundProcessorDelay will cause cpu spike. Is this
  disabled in tomcat6 by default? Q: will  disabling
  backgroundProcessorDelay cause any other performance issues
  with tomcat7.
 
 
  Thanks for Help!!
 
  Regards
 
 
  Hi Mark pid java
 
  top -H -p  pid for thread id   cpu eating thread
 
  kill -3  pid for thread dump
 
  and hexa nid for thread id
 
  Then it looks like you did something wrong because the thread you
  identified is sleeping. It won't be using any CPU.
 
  Assuming that the thread has been mis-identified, could it be this?
 
  https://bz.apache.org/bugzilla/show_bug.cgi?id=58151
 
  That bug was filed/fixed against trunk/8.0. Any chance there is a
  similar bug in Tomcat 7?

 It doesn't look like it. That bug was introduced when the non-blocking
 I/O support was added in Tomcat 8. The reads in Tomcat 7 look OK.

 top + lwp id + thread dump is the way to get to the bottom of this.
 Something isn't right in the description above.

 Mark



thread was sleeping at that point of time during initial captureran
jstack few times.. going through tomcat source for thisjava thread and
verifying  tomcat 7 config  we identified  reloadable was set true for one
of the application's context..disabling it fixed issue .. Appreciate
everyone's response..

  [root@app01 logs]# echo $(date)  jstack -F 590848  |awk '/Thread
'593818:' /,/^$/'
Tue Aug 18 12:42:34 CDT 2015
Attaching to process ID 590848, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.75-b04
Thread 593818: (state = IN_NATIVE)
 - java.io.UnixFileSystem.canonicalize0(java.lang.String) @bci=0 (Compiled
frame; information may be imprecise)
 - java.io.UnixFileSystem.canonicalize(java.lang.String) @bci=140, line=172
(Compiled frame)
 - java.io.File.getCanonicalPath() @bci=27, line=618 (Compiled frame)
 - org.apache.naming.resources.FileDirContext.file(java.lang.String)
@bci=39, line=774 (Compiled frame)
 -
org.apache.naming.resources.FileDirContext.doGetAttributes(java.lang.String,
java.lang.String[]) @bci=2, line=398 (Compiled frame)
 -
org.apache.naming.resources.BaseDirContext.getAttributes(java.lang.String,
java.lang.String[]) @bci=41, line=1157 (Compiled frame)
 -
org.apache.naming.resources.BaseDirContext.getAttributes(java.lang.String)
@bci=3, line=1110 (Compiled frame)
 -
org.apache.naming.resources.ProxyDirContext.getAttributes(java.lang.String)
@bci=35, line=882 (Compiled frame)
 - org.apache.catalina.loader.WebappClassLoader.modified() @bci=57,
line=1026 (Compiled frame)
 - org.apache.catalina.loader.WebappLoader.modified() @bci=11, line=500
(Interpreted frame)
 - org.apache.catalina.loader.WebappLoader.backgroundProcess() @bci=8,
line=420 (Compiled frame)
 - org.apache.catalina.core.ContainerBase.backgroundProcess() @bci=70,
line=1345 (Compiled frame)
 -
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(org.apache.catalina.Container,
java.lang.ClassLoader) @bci=27, line=1546 (Compiled frame)
 -
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(org.apache.catalina.Container,
java.lang.ClassLoader) @bci=115, line=1556 (Compiled frame)
 -
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(org.apache.catalina.Container,
java.lang.ClassLoader) @bci=115, line=1556 (Compiled frame)
 -
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run()
@bci=108, line=1524 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)

[root@app01 logs]# echo $(date)  jstack -F 590848  |awk '/Thread
'593818:' /,/^$/'
Tue Aug 18 12:42:37 CDT 2015
Attaching to process ID 590848, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.75-b04
Thread 593818: (state = BLOCKED

cpu spike after upgrade from tomcat 6.0.36 to tomcat 7.0.57

2015-08-18 Thread musafir
Hello, ugraded tomcat from 6.0.36(jdk 6) to tomcat7.0.57  (jdk7)..
os:centos 6.6 ...seeing high cpu spike after upgrade doing top
and  thread dump shows  only thread that is always using cpu is:
 ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon
prio=10 tid=0x7ff8fc599800 nid=0xc1d2e waiting on condition
[0x7ff803ffe000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1513)
at java.lang.Thread.run(Thread.java:745)

disabled  backgroundProcessorDelay (backgroundProcessorDelay=-1)
..don't see any thread that is always using cpu..

Q: why backgroundProcessorDelay will cause cpu spike. Is this disabled
in tomcat6 by default?
Q: will  disabling backgroundProcessorDelay cause any other
performance issues with tomcat7.


Thanks for Help!!

Regards


Re: cpu spike after upgrade from tomcat 6.0.36 to tomcat 7.0.57

2015-08-18 Thread musafir
On Tue, Aug 18, 2015 at 11:57 AM, Mark Thomas ma...@apache.org wrote:

 On 18/08/2015 16:50, musafir wrote:
  Hello, ugraded tomcat from 6.0.36(jdk 6) to tomcat7.0.57  (jdk7)..
  os:centos 6.6 ...seeing high cpu spike after upgrade doing top
  and  thread dump shows  only thread that is always using cpu is:

 How have you matched the thread using CPU in top with the thread in the
 thread dump?

 Mark


   ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon
  prio=10 tid=0x7ff8fc599800 nid=0xc1d2e waiting on condition
  [0x7ff803ffe000]
 java.lang.Thread.State: TIMED_WAITING (sleeping)
  at java.lang.Thread.sleep(Native Method)
  at
 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1513)
  at java.lang.Thread.run(Thread.java:745)
 
  disabled  backgroundProcessorDelay (backgroundProcessorDelay=-1)
  ..don't see any thread that is always using cpu..
 
  Q: why backgroundProcessorDelay will cause cpu spike. Is this disabled
  in tomcat6 by default?
  Q: will  disabling backgroundProcessorDelay cause any other
  performance issues with tomcat7.
 
 
  Thanks for Help!!
 
  Regards
 

 Hi Mark
 pid java

 top -H -p  pid for thread id   cpu eating thread

 kill -3  pid for thread dump

 and hexa nid for thread id


 Regards

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