Bug 48252 - StackOverflowError in NioEndpoint.setProperty when setting jkHome
StackOverflowError in NioEndpoint.setProperty when setting jkHome
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Connectors
6.0.20
PC Windows Vista
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-11-20 08:25 UTC by James Dobson
Modified: 2010-03-16 08:08 UTC (History)
1 user (show)



Attachments
Tomcat 6.0 patch (1.81 KB, patch)
2009-11-20 08:47 UTC, Filip Hanik
Details | Diff
Patch in other way (1.06 KB, patch)
2010-03-16 07:57 UTC, William Leung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Dobson 2009-11-20 08:25:45 UTC
- Noticed only when running in debugger with breakpoint set for StackOverflowError.
- The error is translated by Java's reflection mechanism to an InvocationTargetException, which is caught and silently ignored by IntrospectionUtils.

- Connector.initialize() sets jkHome property on Http11NioProtocol.
- Http11NioProtocol sets jkHome property on NioEndpoint.
- NioEndpoint recursively invokes its own setProperty method via IntrospectionUtils.setProperty, causing the stack overflow.

- Using embedded Tomcat.
- Using Nio connector. Does not happen for standard connector.
- Happens in 6.0.18 and 6.0.20; haven't tested with earlier versions.
Comment 1 Filip Hanik 2009-11-20 08:47:26 UTC
Created attachment 24573 [details]
Tomcat 6.0 patch
Comment 2 James Dobson 2009-11-20 09:26:52 UTC
Works for me, thanks!
Comment 3 Mark Thomas 2009-12-16 09:02:08 UTC
The patch has been applied to 6.0.x and will be included in 6.0.21 onwards.
Comment 4 William Leung 2010-03-16 07:57:01 UTC
Created attachment 25134 [details]
Patch in other way

We have this problem either.

And unfortunately we use a JVM which generate a coredump while stack overflow.
-- Java VM: Java HotSpot(TM) Server VM (11.0-b16 mixed mode solaris-sparc)

I patch the tomcat source in other way
Comment 5 William Leung 2010-03-16 08:08:29 UTC
(In reply to comment #4)
> Created an attachment (id=25134) [details]
> Patch in other way
> 
> We have this problem either.
> 
> And unfortunately we use a JVM which generate a coredump while stack overflow.
> -- Java VM: Java HotSpot(TM) Server VM (11.0-b16 mixed mode solaris-sparc)
> 
> I patch the tomcat source in other way

BTW, We found this issue in tomcat 6.0.16
SunOS xxxx 5.10 Generic_139555-08 sun4v sparc SUNW,SPARC-Enterprise-T5120