Re: jaxb unmarshal breaks after webapp redeploy

2010-02-10 Thread Mark Thomas
On 10/02/2010 19:20, Mark Shifman wrote:
> I forgot to check catalina.out with the new tomcat. It showed:
> 
> Feb 10, 2010 1:54:28 PM org.apache.catalina.loader.WebappClassLoader 
> clearReferencesThreads
> SEVERE: A web application appears to have started a thread named [Timer-0] 
> but has failed to stop it. This is very likely to create a memory leak.
> 
> and when I use jstack it looks like it is really there:
> 
> "Timer-0" daemon prio=10 tid=0x8b16b400 nid=0x43b1 in Object.wait() 
> [0x8b2e]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0xac502370> (a java.util.TaskQueue)
> at java.util.TimerThread.mainLoop(Timer.java:509)
> - locked <0xac502370> (a java.util.TaskQueue)
> at java.util.TimerThread.run(Timer.java:462)

Hard to tell if that is behind this or not, but it is certainly a memory
leak that needs fixing. Since it is a TimerThread, there is something
Tomcat can do to stop it. That workaround is in trunk and should be in
the next release.

In terms of a way forward I'd suggest the following:
- created the simplest possible app the re-creates the issue
- using a debugger, step through the code and try and figure out what is
different after the restart

You'll almost certainly need to step into the standard Java classes.
Expect this to take several hours or more.

Mark



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



Re: jaxb unmarshal breaks after webapp redeploy

2010-02-10 Thread Mark Shifman
I forgot to check catalina.out with the new tomcat. It showed:

Feb 10, 2010 1:54:28 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Timer-0] but 
has failed to stop it. This is very likely to create a memory leak.

and when I use jstack it looks like it is really there:

"Timer-0" daemon prio=10 tid=0x8b16b400 nid=0x43b1 in Object.wait() [0x8b2e]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xac502370> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:509)
- locked <0xac502370> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
Mark Shifman wrote:
> 
> Mark Thomas wrote:
>> On 10/02/2010 16:05, Mark Shifman wrote:
>>> I have a webapp that unmarshalls xmls prior to storing in my database.
>>>
>>> I have recently noted that after a redeploy, the unmarshalling of a 
>>> dateTime element is null while
>>> the rest of the elements in my object seem to be unmarshalled fine.  If I 
>>> restart tomcat things
>>> seem to work again.
>>>
>>> I created the classes for unmarshalling using the typical xjc stuff.
>>>
>>> The webapp is running via struts 1.3.10 with tomcat 6.0.18, java version 
>>> "1.6.0_07". It is running
>>> on linux 2.6.18-92.1.22.el5 via CentOS release 5.3 (Final).
>>>
>>> I found one item on google where similar behavior occurred but there was no 
>>> resolution.
>>>
>>> Is this a known problem with jaxb unmarshalling that doesn't happen with 
>>> newer versions of java?(I think
>>> jaxb2 is the one in java 1.6)
>>>
>>> Is there something obvious I didn't close that could be leaking?
>> Possibly, but it certainly won't be obvious.
>>
>> Try updating to 6.0.24 and the latest JDK. There were some XML related
>> leaks in the JDK that 6.0.24 provides work-arounds for.
> 
> I just tried with jdk1.6.0_18 (newest from sun) and tomcat 6.0.24 and it 
> didn't help.
> I am now sure what I should try now. arg
> 
> mas
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shif...@yale.edu

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



Re: jaxb unmarshal breaks after webapp redeploy

2010-02-10 Thread Mark Shifman


Mark Thomas wrote:
> On 10/02/2010 16:05, Mark Shifman wrote:
>> I have a webapp that unmarshalls xmls prior to storing in my database.
>>
>> I have recently noted that after a redeploy, the unmarshalling of a dateTime 
>> element is null while
>> the rest of the elements in my object seem to be unmarshalled fine.  If I 
>> restart tomcat things
>> seem to work again.
>>
>> I created the classes for unmarshalling using the typical xjc stuff.
>>
>> The webapp is running via struts 1.3.10 with tomcat 6.0.18, java version 
>> "1.6.0_07". It is running
>> on linux 2.6.18-92.1.22.el5 via CentOS release 5.3 (Final).
>>
>> I found one item on google where similar behavior occurred but there was no 
>> resolution.
>>
>> Is this a known problem with jaxb unmarshalling that doesn't happen with 
>> newer versions of java?(I think
>> jaxb2 is the one in java 1.6)
>>
>> Is there something obvious I didn't close that could be leaking?
> 
> Possibly, but it certainly won't be obvious.
> 
> Try updating to 6.0.24 and the latest JDK. There were some XML related
> leaks in the JDK that 6.0.24 provides work-arounds for.

I just tried with jdk1.6.0_18 (newest from sun) and tomcat 6.0.24 and it didn't 
help.
I am now sure what I should try now. arg

mas

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



Re: jaxb unmarshal breaks after webapp redeploy

2010-02-10 Thread Mark Thomas
On 10/02/2010 16:05, Mark Shifman wrote:
> I have a webapp that unmarshalls xmls prior to storing in my database.
> 
> I have recently noted that after a redeploy, the unmarshalling of a dateTime 
> element is null while
> the rest of the elements in my object seem to be unmarshalled fine.  If I 
> restart tomcat things
> seem to work again.
> 
> I created the classes for unmarshalling using the typical xjc stuff.
> 
> The webapp is running via struts 1.3.10 with tomcat 6.0.18, java version 
> "1.6.0_07". It is running
> on linux 2.6.18-92.1.22.el5 via CentOS release 5.3 (Final).
> 
> I found one item on google where similar behavior occurred but there was no 
> resolution.
> 
> Is this a known problem with jaxb unmarshalling that doesn't happen with 
> newer versions of java?(I think
> jaxb2 is the one in java 1.6)
> 
> Is there something obvious I didn't close that could be leaking?

Possibly, but it certainly won't be obvious.

Try updating to 6.0.24 and the latest JDK. There were some XML related
leaks in the JDK that 6.0.24 provides work-arounds for.

Mark



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



jaxb unmarshal breaks after webapp redeploy

2010-02-10 Thread Mark Shifman
I have a webapp that unmarshalls xmls prior to storing in my database.

I have recently noted that after a redeploy, the unmarshalling of a dateTime 
element is null while
the rest of the elements in my object seem to be unmarshalled fine.  If I 
restart tomcat things
seem to work again.

I created the classes for unmarshalling using the typical xjc stuff.

The webapp is running via struts 1.3.10 with tomcat 6.0.18, java version 
"1.6.0_07". It is running
on linux 2.6.18-92.1.22.el5 via CentOS release 5.3 (Final).

I found one item on google where similar behavior occurred but there was no 
resolution.

Is this a known problem with jaxb unmarshalling that doesn't happen with newer 
versions of java?(I think
jaxb2 is the one in java 1.6)

Is there something obvious I didn't close that could be leaking?

Is there some sneaky threading issue I am missing? (my unmarshaller is local to 
a method as described
https://jaxb.dev.java.net/guide/Performance_and_thread_safety.html)



Any help would be appreciated.
mas

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