Bug 64191 - Applications not working with 7.0.100
Summary: Applications not working with 7.0.100
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.100
Hardware: PC Linux
: P2 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 64205 64220 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-03 08:04 UTC by Thomas
Modified: 2020-03-16 09:00 UTC (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2020-03-03 08:04:35 UTC
Hi,

we have several applications, which refuse to work with the 7.0.100 release. The crazy thing is: There are no log outputs showing an failure. In catalina.out we only see, that the application has started. Interestingly, static files in the applications can be accessed, i.e. a "it Works" page. When it come to Java files, they will obvioulsy not been executed, although we can see in the logfile, that they have been registered. The applications also do not produce any output - normally they log their start and stuff in a separate logfile, but this will be kept untouched. 

It is very hard to find the issue, all I can say, the applications work with 7.0.99 like a charm, but not with 7.0.100

best

Thomas
Comment 1 Mark Thomas 2020-03-03 08:11:17 UTC
Probably the SCI regression that has already been fixed. Are you able to build Tomcat 7.0.x from source to test the latest code?
Comment 2 Thomas 2020-03-03 13:40:37 UTC
(In reply to Mark Thomas from comment #1)
> Probably the SCI regression that has already been fixed. Are you able to
> build Tomcat 7.0.x from source to test the latest code?

Unfortunately not (as we have rules for production enviornments to only use final versions) - would this been included in the 7.0.101 then?
Comment 3 Mark Thomas 2020-03-03 13:45:08 UTC
How about a test environment? It would be helpful to know if the issue you are seeing has already been fixed or is a new issue.
Comment 4 Thomas 2020-03-03 13:52:31 UTC
(In reply to Mark Thomas from comment #3)
> How about a test environment? It would be helpful to know if the issue you
> are seeing has already been fixed or is a new issue.

Yes, you're right - can you give me hint, where to find it?
Comment 5 Mark Thomas 2020-03-03 14:07:02 UTC
I uploaded a build here:
http://people.apache.org/~markt/dev/v7.0.101-dev/

This isn't an official release. It is just for testing purposes.
Comment 6 Thomas 2020-03-04 08:07:41 UTC
(In reply to Mark Thomas from comment #5)
> I uploaded a build here:
> http://people.apache.org/~markt/dev/v7.0.101-dev/
> 
> This isn't an official release. It is just for testing purposes.

This seems to work - so I guess you fixed it.
Do you have a clue, if this would be released quickly (I guess I'm not the only one, which have this issue)
Comment 7 Mark Thomas 2020-03-04 15:12:09 UTC
Thanks for confirming the fix.

The monthly release cycle is close to starting so a 7.0.101 release should not be too far away.
Comment 8 Mark Thomas 2020-03-09 08:07:59 UTC
*** Bug 64205 has been marked as a duplicate of this bug. ***
Comment 9 Remy Maucherat 2020-03-12 15:50:46 UTC
*** Bug 64220 has been marked as a duplicate of this bug. ***
Comment 10 Roland 2020-03-13 15:27:04 UTC
I have the same issue as described in Bug 64220 using Tomcat 7.0.102 from https://repository.apache.org/content/repositories/orgapachetomcat-1259/ with the tomcat7-maven-plugin.
In WebappServiceLoader line 111 the call to findResources does not return any results. The value of the configFile variable is "META-INF/services/javax.servlet.ServletContainerInitializer". If I re-execute the findResources call in the debugger with removing the preceding "/" in line 111, I get a result:
resources = ((URLClassLoader) loader).findResources(configFile)

Then my Spring Boot application starts again.
Comment 11 Mark Thomas 2020-03-13 15:52:09 UTC
I suspect that is because the class loader being used hasn't got the same work-around that Tomcat's class loader has.

I want to run a few tests first but I think the answer is going to be removing the leading slash in that call.
Comment 12 Mark Thomas 2020-03-13 16:09:59 UTC
Thanks for the report. Fixed in 7.0.x for 7.0.103 onwards.
Comment 13 Roland 2020-03-13 16:27:09 UTC
Thanks for the quick fix, but I investigated a bit more. There is still something wrong. The application *IS* using WebappClassLoaderBase from Tomcat. I see that there is code to remove the leading slash in line 1574, which is executed. The bug is in line 1594. The call to "super.findResources" still uses the "name" variable, but it should use the "jarPath" variable.
Comment 14 Mark Thomas 2020-03-13 16:38:37 UTC
I'm confused. How did removing the leading "/" manage to fix it for you as per comment #10 if, with that fix applied, it is still broken?
Comment 15 Roland 2020-03-13 16:47:24 UTC
Sorry for the confusion. I found this by "visual inspection". You wrote "the class loader being used hasn't got the same work-around that Tomcat's class loader has". Is WebappClassLoaderBase the Tomcat class loader? Because WebappClassLoaderBase is used in my case.
And WebappClassLoaderBase line 1594 makes the difference for me. I am just unsure if the "/" has to be fixed in the caller or in WebappClassLoaderBase itself.
Comment 16 Mark Thomas 2020-03-13 17:17:21 UTC
No, the web application class loader isn't loading the SCI. It is delegating that to its parent.

The fix (in WebappServiceLoader) is the correct one.
Comment 17 Roland 2020-03-13 17:25:15 UTC
Okay, then sorry again. I saw that the "/" removal for jarPath happened in WebappClassLoaderBase and I was afraid that it needs to be done for the call in line 1594 too for satisfying other callers than WebappServiceLoader.
Comment 18 Thomas 2020-03-16 08:46:43 UTC
May I ask the question, when the next release will happen? I mean, it's kind of urgent to install an update due to the security breach ...
Comment 19 mgrigorov 2020-03-16 08:53:59 UTC
The new release has been voted last week, but it has been canceled due to a problem.
7.0.103 has been just cut and a new vote will start in few minutes.
Check the dev@ mailing list for details.
Comment 20 Mark Thomas 2020-03-16 09:00:20 UTC
(In reply to Thomas from comment #18)
> May I ask the question, when the next release will happen? I mean, it's kind
> of urgent to install an update due to the security breach ...

No, it isn't. I assume you are referring to CVE-2020-1938. That can be mitigated entirely with appropriate configuration. Further assistance is available on the Apache Tomcat users mailing list if required.