On 24/06/2013 08:32, Mark Thomas wrote:
> On 24/06/2013 05:31, David Rees wrote:
>> On Fri, Jun 21, 2013 at 9:28 AM, Christopher Schultz
>> <ch...@christopherschultz.net> wrote:
>>> I just upgraded to 1.7.0_25 on my Mac and I noticed that when I launch
>>> Tomcat, I get a dock icon indicating that it is running. This does not
>>> happen on 1.7.0_21, the previous version I was running.
>>>
>>> For some reason, 1.7.0_25 triggers something launching the AWT thread
>>> (on my Mac, that's called AWT-AppKit) which causes the dock icon to be
>>> shown.
>>
>> I noticed something similar on Linux - Tomcat stopped working on
>> machines without all the appropriate X-libs in place. I'll have to try
>> adding -Djava.awt.headless=true to the startup parameters...
> 
> I had a nasty feeling when I read this that I have just confirmed.
> 
> The AWT thread is triggered by Tomcat's memory leak prevention code. I
> haven't tracked down exactly what is triggering this yet. I should have
> the answer to that later today.

Root cause found. I discovered Oracle have actually fixed one of the
memory leaks in Java 7 (!) so the protection is only required if running
on Java 6 or earlier (and very early Java 7 versions).

The protection was triggering AWT initialisation and as of Java 7 update
25 that requires a graphical environment and starts a Thread.

I have disabled the protection by default for Java 7 and greater and
that has resolved the issues. When running on Java 6 or earlier the
protection will still be enabled by default.

The fix will be in Tomcat 7.0.42 onwards.

> It is probably about time the various memory leaks were reported to
> Oracle. Based on past experience of reporting JRE bugs, I have very
> little faith the bugs will be accepted let alone fixed (which I why I
> haven't bothered so far) but it looks like now is the time to report them.

I still need to muster the motivation to do this.

Mark


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

Reply via email to