- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
yan.zhang opened SPR-14978 and commented
!bug.jpg|thumbnail!
It looks like a concurrency bug.
"this.resultHandler.handleResult(this.result);" may be executed twice.
I think it shoule be:
    private boolean setResultInternal(Object result) {
        synchronized (this) {
            if (isSetOrExpired()) {
                return false;
            }
            this.result = result;
            if (this.resultHandler != null) {
                this.resultHandler.handleResult(this.result);
            }
        }
        return true;
    }Affects: 3.2.17, 4.2.8, 4.3.4, 5.0 M3
Attachments:
Issue Links:
- Deadlocks with DeferredResult timeout handling on Tomcat [SPR-10485] #15118 Deadlocks with DeferredResult timeout handling on Tomcat
- DeferredResult not thread-safe for isSetOrExpired call [SPR-13451] #18031 DeferredResult not thread-safe for isSetOrExpired call
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regressionA bug that is also a regression