[MCOL-4191] Jemalloc is not installed as a dependency Created: 2020-07-18  Updated: 2020-11-12  Resolved: 2020-09-16

Status: Closed
Project: MariaDB ColumnStore
Component/s: installation
Affects Version/s: 1.5.3
Fix Version/s: 5.4.1

Type: Bug Priority: Critical
Reporter: Todd Stoffel (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2020-8

 Description   

Several of the new systemd scripts in 1.5 have a line like this:

/usr/bin/env bash -c "LD_PRELOAD=$(ldconfig -p | grep -m1 libjemalloc | awk '{print $1}') exec /usr/bin/WriteEngineServer"

However

ldconfig -p | grep -m1 libjemalloc | awk '{print $1}'

will return an empty string without jemalloc being installed. We have not included it as a dependency (see below), nor do we generate any diagnostic or trace line anywhere if it is not found. Both need to be corrected.

[root@mcs1 vagrant]# yum -y install MariaDB-columnstore-engine
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirror.fileplanet.com
 * updates: repos.lax.layerhost.com
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-columnstore-engine.x86_64 0:10.5.4_2-1.el7 will be installed
--> Processing Dependency: net-tools for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: /usr/bin/expect for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_thread-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_date_time-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_regex-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_system-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_regex.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_chrono.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libsnappy.so.1()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_chrono-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_system.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_atomic-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_filesystem-mt.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libboost_filesystem.so.1.53.0()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Processing Dependency: libmariadb.so.3()(64bit) for package: MariaDB-columnstore-engine-10.5.4_2-1.el7.x86_64
--> Running transaction check
---> Package MariaDB-shared.x86_64 0:10.5.4_2-1.el7 will be installed
---> Package boost-atomic.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-chrono.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-date-time.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-filesystem.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-regex.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-system.x86_64 0:1.53.0-28.el7 will be installed
---> Package boost-thread.x86_64 0:1.53.0-28.el7 will be installed
---> Package expect.x86_64 0:5.45-14.el7_1 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: expect-5.45-14.el7_1.x86_64
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
---> Package snappy.x86_64 0:1.1.0-3.el7 will be installed
--> Running transaction check
---> Package tcl.x86_64 1:8.5.13-8.el7 will be installed
--> Finished Dependency Resolution



 Comments   
Comment by Todd Stoffel (Inactive) [ 2020-07-18 ]

We should also keep in mind that for CentOS, Fedora, etc jemalloc is only available if the epel-release repo is active.

Comment by Roman [ 2020-09-01 ]

Jemalloc dependency has been lost between 1.5.3 and 1.5.4 and added as a dependency again in 1.5.4.
IIRC the documentation has a note that dependency comes from an external repo.

Comment by David Hall (Inactive) [ 2020-09-01 ]

Add jemalloc to MariaDB' repo.
Add a way during install to check if jemalloc exists on the machine – if not, get it from MariaDB repo.

Comment by Ben Thompson (Inactive) [ 2020-09-14 ]

RPMs should now contain libjemalloc in /var/lib/columnstore directory. package should try to install jemalloc from system repo but if not present on system after install load jemelloc we provide in rpms. priority going to system installed jemalloc if present, then jemalloc from packages and if somehow none are present warning message at service startup and run without jemalloc.

Comment by Daniel Lee (Inactive) [ 2020-09-16 ]

Build verified: 1.5.4-1 (Drone #631)

Tested on Centos 7 and Ubuntu 18

Removed jemalloc from VM
setup local repo for 1.5.4-1
installed server and columnstore
verified jemalloc is installed
verified MariaDB normal operation

Generated at Thu Feb 08 02:48:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.