Bug 30639 - JspC does not close .jsp files
Summary: JspC does not close .jsp files
Status: RESOLVED WORKSFORME
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.0.19
Hardware: Sun Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-12 23:29 UTC by Chris Dennis
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
truss output (1.34 KB, text/plain)
2004-08-12 23:30 UTC, Chris Dennis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dennis 2004-08-12 23:29:27 UTC
We're using ant to compile jsps on an NFS mounted Solaris box.

After the jsps are compiled we delete the temporary directory the jsps are in
and this fails because JspC still has a FD open for a jsp file. we've determined
this by running truss on ant.

Below is the output from truss:

.
.
.
12944/1:	open("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
O_RDONLY|O_LARGEFILE) = 6
12944/1:	fstat64(6, 0xFFBFC198)				= 0
12944/1:	stat64("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
0xFFBFC380) = 0
12944/1:	stat64("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
0xFFBFC440) = 0
12944/1:	stat64("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
0xFFBFC470) = 0
12944/1:	stat64("/home/chris/SOLARIS/secure/WEB-INF/src", 0xFFBFC388) = 0
12944/1:	stat64("/home/chris/SOLARIS/secure/WEB-INF/src/org/apache/jsp/secure",
0xFFBFC2F8) = 0
12944/1:
stat64("/home/chris/SOLARIS/secure/WEB-INF/src/org/apache/jsp/secure/invalidLogin_jsp.java",
0xFFBFC5A8) Err#2 ENOENT
12944/1:	stat64("/home/chris/SOLARIS/secure/WEB-INF/src/org/apache/jsp/secure",
0xFFBFC358) = 0
12944/8:	poll(0xFBD7FD80, 0, 50)				= 0
12944/1:
open("/home/chris/SOLARIS/secure/WEB-INF/src/org/apache/jsp/secure/invalidLogin_jsp.java",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 7
12944/1:	fstat64(7, 0xFFBFC3A8)				= 0
12944/1:	stat64("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
0xFFBFBE90) = 0
12944/1:	open("/home/chris/SOLARIS/tomcat/webapps/secure/invalidLogin.jsp",
O_RDONLY|O_LARGEFILE) = 8
12944/1:	fstat64(8, 0xFFBFBD40)				= 0
12944/1:	read(8, " < ! - -   $ I d :   i n".., 2048)	= 471
12944/1:	close(8)					= 0
.
.
.

FD 6 is never closed.

So when ant tries to delete the directory containing the jsp files our NFS
server renames invalidLogin.jsp to .nfs3509. This was verified by snoop.

Once ant exits the .nfs go away and the directory can be removed.
Comment 1 Chris Dennis 2004-08-12 23:30:26 UTC
Created attachment 12411 [details]
truss output
Comment 2 Kin-Man Chung 2004-08-13 23:47:10 UTC
I've tried serveral jspc compilations Solaris with truss on, and the truss ouput
looks OK to me, i.e. all jsp files are closed properly.  There maybe problems
with .jspx files, which I'll look into further, but that does not apply to your
case.

If you still have problems, please give me a concrete test cases, with specific
instructions to reproduce them.  Thanks.

Comment 3 Chris Dennis 2004-08-14 00:03:20 UTC
I tried 5.0.27 and it seems to work. If I still have problems I'll try and post
a test case.