[MCOL-4025] systemd units lack libjemalloc preload Created: 2020-05-28  Updated: 2021-01-25  Resolved: 2020-06-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Critical
Reporter: Roman Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Systemd units for PrimProc, WE, ExeMgr and SM don't preload jemalloc that can cause multiple memory-related crashes. Here is the example of systemd units change.
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 /usr/lib64/libjemalloc.so.1

This is straightforward approach that tries to load libjemalloc from two paths(1st is debian-specific second is redhat-specific). This approach results in additional error message in systemctl status unit output. We need to detect the platform whilist packaging.



 Comments   
Comment by Roman [ 2020-06-01 ]

4QA
To test this you need to start MCS and check for jemalloc in SM, WE, PrimProc and ExeMgr memory with the commands:
cat /proc/$(pidof ExeMgr)/maps | grep jemalloc
cat /proc/$(pidof PrimProc)/maps | grep jemalloc
cat /proc/$(pidof WriteEngine)/maps | grep jemalloc
cat /proc/$(pidof StorageManager)/maps | grep jemalloc
All these must return matches.

Comment by Daniel Lee (Inactive) [ 2020-06-02 ]

Build verified: 1.5.0-1 (20200602)

[centos7:root~]# cat /proc/$(pidof ExeMgr)/maps | grep jemalloc
7fe9d2d33000-7fe9d2d64000 r-xp 00000000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fe9d2d64000-7fe9d2f63000 ---p 00031000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fe9d2f63000-7fe9d2f65000 r--p 00030000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fe9d2f65000-7fe9d2f66000 rw-p 00032000 fd:00 872011 /usr/lib64/libjemalloc.so.1
[centos7:root~]# cat /proc/$(pidof PrimProc)/maps | grep jemalloc
7f73fa527000-7f73fa558000 r-xp 00000000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f73fa558000-7f73fa757000 ---p 00031000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f73fa757000-7f73fa759000 r--p 00030000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f73fa759000-7f73fa75a000 rw-p 00032000 fd:00 872011 /usr/lib64/libjemalloc.so.1
[centos7:root~]# cat /proc/$(pidof WriteEngineServer)/maps | grep jemalloc
7f24bc7a1000-7f24bc7d2000 r-xp 00000000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f24bc7d2000-7f24bc9d1000 ---p 00031000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f24bc9d1000-7f24bc9d3000 r--p 00030000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7f24bc9d3000-7f24bc9d4000 rw-p 00032000 fd:00 872011 /usr/lib64/libjemalloc.so.1
[centos7:root~]# cat /proc/$(pidof StorageManager)/maps | grep jemalloc
7fb35d789000-7fb35d7ba000 r-xp 00000000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fb35d7ba000-7fb35d9b9000 ---p 00031000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fb35d9b9000-7fb35d9bb000 r--p 00030000 fd:00 872011 /usr/lib64/libjemalloc.so.1
7fb35d9bb000-7fb35d9bc000 rw-p 00032000 fd:00 872011 /usr/lib64/libjemalloc.so.1

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