Bug #4349
on v0.56.3, 'rados get' returns huge positive error value
0%
Description
I haven't been able to trigger it on current master, but given that the code over at 'do_get()' was changed around 0.57 I'm not that surprised.
andrew_ at #ceph brought this to our attention:
<andrew_> zeno-26_agh=; rados get -p tom dump-home-200601-v2-55caa5194ad1b41e81f1119c429931d8284b5b3f.cpio.8bb69dd4373aa70eccf4d9752c378794 <andrew_> error getting tom/dump-home-200601-v2-55caa5194ad1b41e81f1119c429931d8284b5b3f.cpio.8bb69dd4373aa70eccf4d9752c378794: Unknown error 1464856576
From looking at the code path, everything looks correct. The error message appears to come from 'rados_tool_common()' @ rados.cc; the error should be returned from 'do_get()', which on 0.56.3 returns whatever io_ctx.reads() returns if < 0. The thing is, over in 'rados_tool_common()', the error is made positive before being passed to 'strerror_r()', but only iff the error is in fact negative.
History
#1 Updated by Sage Weil about 11 years ago
I think I remember Piston hitting this issue, and fixing up the do_get() function in rados.cc to do a chunked read. Maybe that is in master but not v0.56.x?
#2 Updated by Dan Mick about 11 years ago
Sage is remembering 234becd3447a679a919af458440bc31c8bd6b84f, and I wonder if that fixes this?
#3 Updated by Dan Mick about 11 years ago
- Status changed from New to Closed
Sure looks like it will; the old code just did one read, and stuffed the return into an 'int'. That's no good.
Closing on the theory that it's already fixed.