Project

General

Profile

Actions

Bug #7822

closed

examples/librados/hello_world.cc broken on master

Added by Dan Mick about 10 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
librados
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Using the example program to test librados ports, I notice that it's currently failing (slightly) on master:

we just set up a rados cluster object
we just parsed our config options
we just connected to the rados cluster
we just created a new pool named hello_world_pool
we just created an ioctx for our pool
we just wrote new object hello_object, with contents
hello world!
we read our object hello_object, and got back 0 bytes with contents
hello world!~
we set the xattr 'version' on our object!
we overwrote our object hello_object with contents
hello world!v2
we just failed a write because the xattr wasn't as specified
we overwrote our object hello_object following an xattr test with contents
hello world!v3

1) the return value ought to be 12
2) the first read appears to return a buffer that's not properly NUL-terminated, or is too long for some other reason

Note, this is the only read in the example, and it's using aio_read


Related issues 1 (0 open1 closed)

Related to Ceph - Bug #7952: After aio_read() completes a call to return_value() doesn't return bytes readResolvedDavid Zafman04/01/2014

Actions
Actions #1

Updated by Dan Mick about 10 years ago

  • Assignee set to Josh Durgin
Actions #2

Updated by Greg Farnum about 10 years ago

The read isn't supposed to be null terminated; it's a bufferlist. I was sloppy in giving that to an ostream, but doing something better was more of a hassle than I or the reviewer deemed worth handling at the time.
The return value does appear to be wrong, though.

Actions #3

Updated by Greg Farnum almost 7 years ago

  • Status changed from New to Resolved

"Associated Revision" 26bcb362

Actions

Also available in: Atom PDF