Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious error “Cannot correlate response - no pending reply” using TcpOutboundGateway and CachingClientConnectionFactory [INT-3722] #7677

Closed
spring-operator opened this issue May 26, 2015 · 9 comments
Assignees
Milestone

Comments

@spring-operator
Copy link
Contributor

spring-operator commented May 26, 2015

Russell Maytham opened INT-3722 and commented

Spurious correlation errors occur when using using TcpOutboundGateway with CachingClientConnectionFactory in a multithreaded context.

Gary's explanation:
this is a bug with the combo of the outbound gateway and caching connection factory;
...
The problem is that the connection is added back to the pool (and reused) before the first thread (Thread-5) removes the pending reply; he ends up removing the new pending reply (for Thread-2) instead of his own.

See attatched App.log and Test.java
Stackoverflow:[ http://stackoverflow.com/questions/30459804/spurious-error-cannot-correlate-response-no-pending-reply-using-tcpoutboundg?noredirect=1#comment49001543_30459804]


Affects: 4.1.2

Reference URL: http://stackoverflow.com/questions/30459804/spurious-error-cannot-correlate-response-no-pending-reply-using-tcpoutboundg?noredirect=1#comment49001543_30459804

Attachments:

Issue Links:

Referenced from: pull request #1452

@spring-operator
Copy link
Contributor Author

Russell Maytham commented

I tested the code changes associated with https://github.com/spring-projects/spring-integration/pull/1452/commits
and no longer get correlation errors

@spring-operator
Copy link
Contributor Author

Artem Bilan commented

Great, Russell Maytham!

Thank you very much for the feedback.

I'm on review that PR, so the fix will be available in the master soon.
And our plans are to release 4.2.0.M1 today.

@spring-operator
Copy link
Contributor Author

Gary Russell commented

Yes, thanks Russell Maytham for testing; very helpful.

I presume you will need a release including this fix; we don't currently have 4.1.5 scheduled but can schedule it if you have a particular date by which you'll need it.

Of course, you can develop/test using 4.1.5.BUILD-SNAPSHOT (once the patch is merged) but I would not recommend using a snapshot in production.

@spring-operator
Copy link
Contributor Author

Russell Maytham commented

I have included the changes on my side, so I will wait for the normal release 4.1.5
Thanks for a very quick resolution.

@spring-operator
Copy link
Contributor Author

Gary Russell commented

Merged and cherry-picked by Artem Bilan

@spring-operator
Copy link
Contributor Author

Gary Russell commented

Fix is incomplete; while it solves the reported problem, it can cause a memory leak (preventing reuse of a connection).

@spring-operator
Copy link
Contributor Author

Gary Russell commented

#1453

@spring-operator
Copy link
Contributor Author

Gary Russell commented

Russell Maytham 4.1.5 is now available.

@spring-operator
Copy link
Contributor Author

Russell Maytham commented

The way this was handled has vindicated my choice of technology at my workplace.
I will be looking for opportunities to try and assist other users on the forums.
Thank you to the SI team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants