Project

General

Profile

Actions

Bug #37795

closed

luminous: "'hello_world_cpp' failed" in rados

Added by Yuri Weinstein over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Tests
Target version:
-
% Done:

0%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rados
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Run: http://pulpito.ceph.com/yuriw-2019-01-03_21:34:40-rados-wip-yuri3-testing-2019-01-03-1654-luminous-distro-basic-smithi/3419078/
Job: 3419078
Logs: http://qa-proxy.ceph.com/teuthology/yuriw-2019-01-03_21:34:40-rados-wip-yuri3-testing-2019-01-03-1654-luminous-distro-basic-smithi/3419078/teuthology.log

2019-01-04T01:54:26.245 INFO:tasks.workunit.client.0.smithi184.stderr:+ rm -f /home/ubuntu/cephtest/mnt.0/client.0/tmp/Makefile
2019-01-04T01:54:26.245 INFO:tasks.workunit.client.0.smithi184.stdout:Makefile:29: recipe for target 'hello_world_cpp' failed
2019-01-04T01:54:26.245 DEBUG:teuthology.orchestra.run:got remote process result: 2
2019-01-04T01:54:26.245 INFO:tasks.workunit:Stopping ['rados/test_librados_build.sh'] on client.0...
2019-01-04T01:54:26.245 INFO:teuthology.orchestra.run.smithi184:Running:
2019-01-04T01:54:26.246 INFO:teuthology.orchestra.run.smithi184:> sudo rm -rf -- /home/ubuntu/cephtest/workunits.list.client.0 /home/ubuntu/cephtest/clone.client.0
Actions #1

Updated by Yuri Weinstein over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Neha Ojha over 5 years ago

That's on luminous.

...
2019-01-04T01:54:26.237 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:212: undefined reference to `librados::ObjectWriteOperation::setxattr(char const*, ceph::buffer::list const&)'
2019-01-04T01:54:26.237 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:213: undefined reference to `librados::IoCtx::operate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, librados::ObjectWriteOperation*)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:220: undefined reference to `ceph::buffer::list::c_str()'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:235: undefined reference to `librados::ObjectWriteOperation::write_full(ceph::buffer::list const&)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:237: undefined reference to `ceph::buffer::list::append(char)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:239: undefined reference to `ceph::buffer::list::append(char)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:240: undefined reference to `librados::ObjectOperation::cmpxattr(char const*, unsigned char, ceph::buffer::list const&)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:241: undefined reference to `librados::ObjectWriteOperation::write_full(ceph::buffer::list const&)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:242: undefined reference to `librados::ObjectWriteOperation::setxattr(char const*, ceph::buffer::list const&)'
2019-01-04T01:54:26.238 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:243: undefined reference to `librados::IoCtx::operate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, librados::ObjectWriteOperation*)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:262: undefined reference to `ceph::buffer::list::append(char)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:264: undefined reference to `ceph::buffer::list::append(char)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:266: undefined reference to `librados::ObjectOperation::cmpxattr(char const*, unsigned char, ceph::buffer::list const&)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:267: undefined reference to `librados::ObjectWriteOperation::write_full(ceph::buffer::list const&)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:268: undefined reference to `librados::ObjectWriteOperation::setxattr(char const*, ceph::buffer::list const&)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:269: undefined reference to `librados::IoCtx::operate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, librados::ObjectWriteOperation*)'
2019-01-04T01:54:26.239 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:277: undefined reference to `ceph::buffer::list::c_str()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:288: undefined reference to `librados::Rados::pool_delete(char const*)'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:295: undefined reference to `librados::Rados::shutdown()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:29: undefined reference to `librados::Rados::~Rados()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:26: undefined reference to `librados::IoCtx::~IoCtx()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:29: undefined reference to `librados::Rados::~Rados()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/home/ubuntu/cephtest/mnt.0/client.0/tmp/hello_world.cc:26: undefined reference to `librados::IoCtx::~IoCtx()'
2019-01-04T01:54:26.240 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `ceph::buffer::ptr::~ptr()':
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/buffer.h:260: undefined reference to `ceph::buffer::ptr::release()'
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `ceph::buffer::list::list()':
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/buffer.h:665: undefined reference to `ceph::buffer::list::iterator::iterator(ceph::buffer::list*, unsigned int)'
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `ceph::buffer::list::clear()':
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/buffer.h:745: undefined reference to `ceph::buffer::ptr::operator=(ceph::buffer::ptr&&)'
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `ceph::buffer::list::begin()':
2019-01-04T01:54:26.241 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/buffer.h:825: undefined reference to `ceph::buffer::list::iterator::iterator(ceph::buffer::list*, unsigned int)'
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `ceph::buffer::list::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/buffer.h:850: undefined reference to `ceph::buffer::list::append(char const*, unsigned int)'
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `librados::ObjectWriteOperation::ObjectWriteOperation()':
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/librados.hpp:364: undefined reference to `librados::ObjectOperation::ObjectOperation()'
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o: In function `librados::ObjectWriteOperation::~ObjectWriteOperation()':
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/usr/include/rados/librados.hpp:365: undefined reference to `librados::ObjectOperation::~ObjectOperation()'
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:/tmp/cc8GZkFC.o:(.rodata._ZTIN8librados20ObjectWriteOperationE[_ZTIN8librados20ObjectWriteOperationE]+0x10): undefined reference to `typeinfo for librados::ObjectOperation'
2019-01-04T01:54:26.242 INFO:tasks.workunit.client.0.smithi184.stderr:collect2: error: ld returned 1 exit status
2019-01-04T01:54:26.243 INFO:tasks.workunit.client.0.smithi184.stderr:make: *** [hello_world_cpp] Error 1
Actions #3

Updated by Brad Hubbard over 5 years ago

  • Category set to Tests
  • Assignee set to Brad Hubbard

https://github.com/ceph/ceph/pull/24538 was merged only a couple of months ago so I suspect this has never run successfully in luminous? I'm investigating the actual problem behind it.

Actions #4

Updated by Brad Hubbard over 5 years ago

Frustratingly difficult to track down...

As suspected "make" in the examples/librados directory has not worked for the duration of luminous, at least with some compilers. The problem is link order.

This fails.

$ g++ -std=c++17 -Wall -Wextra -Werror -g   -lrados -o hello_world_cpp hello_world.cc

This succeeds.

$ g++ -std=c++17 -Wall -Wextra -Werror -g  -o hello_world_cpp hello_world.cc -lrados

Basically, the libraries need to come last due to the way the linker (ld) works.

This was fixed early in the mimic cycle by https://github.com/ceph/ceph/commit/5b027155b41d15c9e9e26b81340a76673f483890 and this backports cleanly to luminous. Just testing it now and will have a PR shortly.

Actions #5

Updated by Brad Hubbard over 5 years ago

  • Status changed from New to Fix Under Review
Actions #6

Updated by Brad Hubbard over 5 years ago

  • Subject changed from "'hello_world_cpp' failed" in rados to luminous: "'hello_world_cpp' failed" in rados
Actions #7

Updated by Brad Hubbard over 5 years ago

  • Status changed from Fix Under Review to In Progress
Actions #8

Updated by Yuri Weinstein over 5 years ago

Brad Hubbard wrote:

https://github.com/ceph/ceph/pull/25829

merged

Actions #9

Updated by Brad Hubbard over 5 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF