Asserts while running test/erasure-code/test-erasure-eio.sh
When I run the above script I get asserts:
osd/ECBackend.cc: 201: FAILED assert(res.errors.empty())
Which is in this code:
struct OnRecoveryReadComplete :
public GenContext<pair<RecoveryMessages*, ECBackend::read_result_t& > &> { ECBackend *pg;
hobject_t hoid;
set<int> want;
OnRecoveryReadComplete(ECBackend *pg, const hobject_t &hoid)
: pg(pg), hoid(hoid) {}
void finish(pair<RecoveryMessages *, ECBackend::read_result_t &> &in) {
ECBackend::read_result_t &res = in.second;
// FIXME???
assert(res.r == 0);
assert(res.errors.empty());
assert(res.returned.size() == 1);
pg->handle_recovery_read_complete(
hoid,
res.returned.back(),
res.attrs,
in.first); }
};
Now the //FIXME remark suggests that the code could be not oke. And/or the asserts are too strong.
Any hints, suggestions or questions to fix this.
--WjW
Quoted 37 lines · Gregory Farnum
On Sunday, January 17, 2016, Willem Jan Withagen <[email protected] <mailto:[email protected]>> wrote:
When I run the above script I get asserts: osd/ECBackend.cc: 201: FAILED assert(res.errors.empty()) Which is in this code: struct OnRecoveryReadComplete : public GenContext<pair<RecoveryMessages*, ECBackend::read_result_t& > &> { ECBackend *pg; hobject_t hoid; set<int> want; OnRecoveryReadComplete(ECBackend *pg, const hobject_t &hoid) : pg(pg), hoid(hoid) {} void finish(pair<RecoveryMessages *, ECBackend::read_result_t &> &in) { ECBackend::read_result_t &res = in.second; // FIXME??? assert(res.r == 0); assert(res.errors.empty()); assert(res.returned.size() == 1); pg->handle_recovery_read_complete( hoid, res.returned.back(), res.attrs, in.first); } }; Now the //FIXME remark suggests that the code could be not oke. And/or the asserts are too strong. Any hints, suggestions or questions to fix this.
Quoted 5 lines
I haven't checked the code in any detail, but this snippet is asserting that we didn't get any errors while reading several different chunks of an erasure-coded data stripe. The FIXME is because it would be great if we could handle errors transparently, but if the make check tests are failing, presumably there's an issue.
Hi Greg,
Thanx for the info.
In that case it is something that goes onto my list of things to solve.
Perhaps even the upgrade to Clang 3.8 (I saw commits passing by FreeBSD 11.0) helps... Upgrading stuff changed some of the errors the previous time, did not fix 'm but made a lot more sense.
--WjW