Bug 1640391

Summary: Binaries compiled against gperftools-libs 2.6 libtcmalloc fail on systems with 2.4 installed
Product: Red Hat Enterprise Linux 7 Reporter: Brad Hubbard <bhubbard>
Component: gperftoolsAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED CANTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: bhubbard, databases-maint, pbonzini
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-08 15:00:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brad Hubbard 2018-10-18 00:29:35 UTC
Description of problem:

Binaries compiled against the 2.6 version of the libraries (in this case ceph-osd) have the following undefined symbols.

# nm -D /usr/bin/ceph-osd|egrep '(_ZdaPvm|_ZdlPvm)'                                                                                                                                                                 
                 U _ZdaPvm                                                                                                                                                                                                                  
                 U _ZdlPvm

The 2.4 version of libtcmalloc.so.4 (gperftools-libs-2.4-8.el7.x86_64) does not export these symbols.

# nm -D /usr/lib64/libtcmalloc.so.4|egrep '(_ZdaPvm|_ZdlPvm)'
#

This leads to errors such as the following.

ceph-osd: symbol lookup error: ceph-osd: undefined symbol: _ZdaPvm

Installing gperftools-libs-2.6.1-1.el7.x86_64.rpm resolves the issue.

# nm -D /usr/lib64/libtcmalloc.so.4|egrep '(_ZdaPvm|_ZdlPvm)'
0000000000035dc0 T _ZdaPvm
0000000000035dc0 T _ZdlPvm

Maybe the library version number should have been incremented between these releases?

Comment 1 Brad Hubbard 2018-10-18 00:35:31 UTC
See https://github.com/gperftools/gperftools/commit/7efb3ecf37d88edf9cf9a43efb89b425eaf81d5e , search for "ENABLE_SIZED_DELETE".

Comment 4 Paolo Bonzini 2018-12-14 14:53:33 UTC
> Maybe the library version number should have been incremented between these releases?

The library version number only says that there is no compatibilty between a binary for an old version of the library, on a system with a new version of the library.

Here you have a binary for a new version of the library, on a system with an old version of the library.  It is expected that it fails if the library defines new symbols, and the patch is pretty intrusive so I'd rather avoid this.

What system with 2.6 gperftools did you build on? (Fedora?)

Comment 5 Brad Hubbard 2018-12-14 21:53:08 UTC
(In reply to Paolo Bonzini from comment #4)
> 
> What system with 2.6 gperftools did you build on? (Fedora?)

Centos 7
gperftools.x86_64                                    2.6.1-1.el7                                    base

Comment 6 Paolo Bonzini 2019-03-08 15:00:13 UTC
You need to install the older version if you want to be backwards compatible.