You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Nick Wesselman <ni...@digivis.com> on 2003/05/11 02:10:28 UTC

elusive open files bug

I'm trying to track down what seems to be a bug in Jasper, hoping you 
guys can help me out.

TC 4.0.6
RedHat 7.2
J2SDK 1.4.1_01 & 02

It seems that certain JSPs, when JspServlet checks "if 
(context.getResourceAsStream(jspUri) == null)" (line 515), don't have 
their fd's released. I can connect to tomcat via JPDA and watch the FD 
get created at this call, and never see it released. The result is that 
linux quickly hits the point of "too many open files." lsof reveals 
thousands of open jsp files:

java       1812     devhlo   10r   REG    3,65    32959   1137982 
/home/devhlo/webapps/ROOT/item_detail.jsp

I haven't found a pattern in what JSPs will cause this. I thought it 
might have to do with the size of the JSP file, since I was able to 
trigger it by making snoop.jsp larger (just repeating the stats over 
and over). However, I didn't have luck replicating it with the attached 
piece of shell, which grows a JSP by a character, hits the JSP page w/ 
lynx, then checks the output of lsof.

I haven't been able to replicate the problem outside 4.0.6, but it 
looks like the neither code for JspServlet nor getResourceAsStream has 
changed since 4.0.6.

Anyone have any ideas on what might cause the FD to stick around?

Nick Wesselman
Digital Visions, Inc.