-
Notifications
You must be signed in to change notification settings - Fork 2
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
"Last-minute" responses must not race with timeouts callbacks. #26
Comments
Hi there! I'm afraid its likely a bug. I've been struggling to find a good first project that exercises the library seriously. A fifty second timeout is way too high -- something must be wrong. Do you have a good test case I can look at? -----Algne sõnum----- Unless we set a very high timeout (e.g., 50 seconds), we're hitting this assertion: |
Thought about this a little more -- an assertion shouldn't fire unless there is a bug (some "insane" situation in the code, like a response handler is invoked twice etc. etc.). I will start having a look and imagining how that assertion could fire, but it would really help me to know something about your use-case, @antoche. |
Alternatively -- do you have logging enabled? I can confirm by looking at your logs whether I'm fixing the right bug or not. |
I can't send any code as-is currently, but the use case is very simple. We I could try to strip out the code to send you a test case, but that will We're stuck on boost 1.46 so logging is not enabled, but if there's a way
|
…o allow inspection of timeout behavior.
Running theory is that the code is unprepared for a timeout+response race (both are scheduled essentially in parallel). The work above should help me prove this in a test. |
@antoche, my theory was absolutely valid, and in this branch I've committed a fix with tests and everything. Can you confirm with this branch that the issue is resolved? Let me know if you need a particular compiler/boost version to be worked up. Thanks a ton for this report, by the way. This is quite a critical issue, and I'm glad to have gotten a push to address it. |
Thanks! We'll give it a try. We're on gcc-4.4+boost-1.46. |
Agh, so that particular variant isn't green yet. Should be an easy fix, but 2014-11-23 15:12 GMT-06:00 Antoine Bouthors [email protected]:
|
Ok, we'll wait until it's ready On Mon, Nov 24, 2014 at 3:18 PM, Andres Jaan Tack [email protected]
|
Branch is green for gcc4.4/boost1.46. Go for it. If it's fixed, this is a good reason for release of v0.2.1 |
Hi Andres, With this version, we're hitting another assertion: Stacktrace:
This is on a very simple test that just runs put/get. This is how we construct the client:
I couldn't see in the docs how the client should be constructed now with the timer factory interface, so possibly there's something wrong in there? The put and get are pretty much the same as what's in the examples. |
Ah, yes. :) Tried out all of the timeout cases and forgot to test (in real life) the case where you actually get something over the wire. I gave it a shot last night, it got tricky. Will get back with a fix soon. |
Unless we set a very high timeout (e.g., 50 seconds), we're hitting this assertion:
riak/request_with_timeout.cxx:44: void riak::request_with_timeout::on_response(std::error_code, size_t, const std::string&): Assertion `not succeeded_ and (!! terminate_request_)' failed.
Is there something we might be doing wrong, or is that a bug in riak-cpp?
The text was updated successfully, but these errors were encountered: