NPE in org.springframework.core.MethodParameter.getParameterName (possible race condition) [SPR-12453] #17058
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Ömer Yildiz opened SPR-12453 and commented
I have a spring application running on google app engine and today i've encountered the following exception. Judging from the source code that NPE should never happen unless two threads access the method at the same time.
This is the place where it happens:
The NPE occurs on line 4, i.e. parameterNameDiscoverer==null. But as there's a prior null-check I suspect, that another thread B wins the race by setting parameterNameDiscoverer to null before thread A gets to line 4.
Edit: The controller method which caused that exception:
Affects: 3.2.12, 4.0.8
Issue Links:
Backported to: 4.0.9, 3.2.13
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: