Project

General

Profile

Actions

Bug #21573

closed

[upgrade] buffer::list ABI broken in luminous release

Added by Jason Dillaman over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

A client application that was compiled against a pre-Luminous librados C++ API and therefore utilizing bufferlist will now be ABI incompatible w/ the Luminous version of librados. Specifically, the addition of "_mempool" within buffer::list causes a seg fault since pre-Luminous clients would not have initialized that field.

#0  mempool::pool_t::adjust_count (this=0x8737e8a5c980, items=items@entry=1, bytes=bytes@entry=4008)
    at /home/jdillaman/ceph/src/common/mempool.cc:85
#1  0x00007ffff75dea47 in ceph::buffer::raw::reassign_to_mempool (this=<optimized out>, this=<optimized out>, pool=1879025072)
    at /home/jdillaman/ceph/src/common/buffer.cc:206
#2  ceph::buffer::list::append (this=this@entry=0x7fff6fffa5b0, data=data@entry=0x7fffee427477 "ceph v027", len=len@entry=9)
    at /home/jdillaman/ceph/src/common/buffer.cc:1912
#3  0x00007fffee0ab632 in AsyncConnection::_process_connection (this=this@entry=0x7fff64009730)
    at /home/jdillaman/ceph/src/msg/async/AsyncConnection.cc:923
#4  0x00007fffee0b1e98 in AsyncConnection::process (this=0x7fff64009730) at /home/jdillaman/ceph/src/msg/async/AsyncConnection.cc:838
#5  0x00007fffee0c4405 in EventCenter::process_events (this=this@entry=0xb09910, timeout_microseconds=<optimized out>, 
    timeout_microseconds@entry=30000000, working_dur=working_dur@entry=0x7fff6fffb2e8) at /home/jdillaman/ceph/src/msg/async/Event.cc:436
#6  0x00007fffee0c8b68 in NetworkStack::<lambda()>::operator()(void) const (__closure=0xb369c8)
    at /home/jdillaman/ceph/src/msg/async/Stack.cc:53
#7  0x00007ffff703376f in ?? () from /lib64/libstdc++.so.6
#8  0x00007ffff730773a in start_thread () from /lib64/libpthread.so.0
#9  0x00007ffff6aa2e7f in clone () from /lib64/libc.so.6

Related issues 2 (0 open2 closed)

Has duplicate Ceph - Bug #21352: librados version should bump major number when ABI changesDuplicate09/11/2017

Actions
Copied to RADOS - Backport #21899: luminous: [upgrade] buffer::list ABI broken in luminous releaseResolvedSage WeilActions
Actions #1

Updated by Jason Dillaman over 6 years ago

  • Backport set to luminous
Actions #2

Updated by Jason Dillaman over 6 years ago

  • Subject changed from [upgrade] bufferlist ABI broken in luminous release to [upgrade] buffer::list ABI broken in luminous release
  • Description updated (diff)
Actions #3

Updated by Jason Dillaman over 6 years ago

  • Description updated (diff)
Actions #4

Updated by Jason Dillaman over 6 years ago

  • Priority changed from High to Urgent
Actions #5

Updated by Yuri Weinstein over 6 years ago

  • Assignee set to Kefu Chai

@Kefu Chai can you pls take a look?

Actions #6

Updated by Kefu Chai over 6 years ago

this would be a little bit tricky:

  class CEPH_BUFFER_API list {
    # ..
    int _mempool = -1;
    # ..
  public:
    // cons/des
    list() : _len(0), _memcopy_count(0), last_p(this) {}
    // cppcheck-suppress noExplicitConstructor
    list(unsigned prealloc) : _len(0), _memcopy_count(0), last_p(this) {
      reserve(prealloc);
    }
    // ...
  };

so the constructors are inlined, and are not defined in librados. that's why _mempool is not initialized by the old clients, which are still using their own copies of the ctors.

and we have no way to change the behavior of the inlined constructors.

so i'd suggest bump up the so version of librados. will send a mail to ceph-devel asking for more opinions.

Actions #7

Updated by Kefu Chai over 6 years ago

  • Has duplicate Bug #21352: librados version should bump major number when ABI changes added
Actions #8

Updated by Kefu Chai over 6 years ago

  • Status changed from New to Fix Under Review
  • Assignee changed from Kefu Chai to Sage Weil
  • Component(RADOS) librados added
Actions #9

Updated by Sage Weil over 6 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #10

Updated by Kefu Chai over 6 years ago

  • Copied to Backport #21899: luminous: [upgrade] buffer::list ABI broken in luminous release added
Actions #11

Updated by Kefu Chai over 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF