Summary: | getting Maximum code footprint error after upgrade to Tomcat 8.5.11 | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | M. Manna <manmedia> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | major | CC: | bmisek, michaelo |
Priority: | P2 | ||
Version: | 8.5.11 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | All |
Description
M. Manna
2017-01-20 01:34:45 UTC
Additional code was added for error handling, which undoubtedly increases the method sizes. It is thus possible that some JSP which was too close to the limit not has an issue. I can confirm that the issue is prevalent when you have a multipart form built using 2-3 JSP forwards. And my java version is JDK 8 Update 121. Have you guys had the issue with this JDK? Also found the same problem when downgraded to 8.0.39. Hence, downgrading to 8.0.29. I am not facing the issue anymore with 8.0.29. Could someone please let me know if a bugfix will be done on 8.5.11? There is no bug here. The code generated for JSPs got longer as additional error handling had to be added to tags. JSps that use a lot of tags and/or were close to the limit are likely to need to be refactored to bring them under the limit. Thanks - But isn't this going to cause quite a lot of Legacy systems to be broken? Or do you expect developers to use the older versions of Tomcat? The users list is the best place to discuss ways to handle problems with overly large methods. I've taken a quick look at the generated source and I don;t see any obvious ways to reduce the size of the generated method. While the long term advice is still try to restructure the JSP, I've spent time looking more closely at the generated code. I found several potential changes that might reduce the overall size of the _jspService() method but because of compiler optimisations, changes that look like they should reduce the method size, don't always have the expected effect. I've now implemented the changes that appear to have a positive effect in trunk (9.0.x). With the tag I was testing with (the foo tag from the JSP examples) the number of instances of the tag I could use on a single page were: - before the try/finally clean-up fixes - 301 - after the try/finally clean-up fixes - 221 - after clean-up but with optimisations - 292 The figures will vary from tag to tag. The more attributes a tag has, the greater the effect of the optimisations (the foo tag has three). I'd like to get some feedback on these changes from end-users (to the dev@ list please) before back-porting them so any feedback you can provide based on testing of the current trunk (9.0.x) would be appreciated. *** Bug 60653 has been marked as a duplicate of this bug. *** One of the optimisations was buggy. Removing it gives: - after clean-up but with optimisations - 258 Setting mappedFile to false permits another 10 tags to used. |