redis-server crashes with jemalloc error if activedefrag is enabled

Bug #1890517 reported by Matthew Hall
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
redis (Debian)
Incomplete
Unknown
redis (Ubuntu)
New
Undecided
Unassigned

Bug Description

journalctl output:

Aug 05 18:20:25 mhall-xps redis-server[555286]: *** FATAL CONFIG FILE ERROR ***
Aug 05 18:20:25 mhall-xps redis-server[555286]: Reading the configuration file, at line 1352
Aug 05 18:20:25 mhall-xps redis-server[555286]: >>> 'activedefrag yes'
Aug 05 18:20:25 mhall-xps redis-server[555286]: active defrag can't be enabled without proper jemalloc support

I am in the process of debugging this more fully, but it appears that part of the problem is caused by the difference between the USE_JEMALLOC and USE_SYSTEM_JEMALLOC flags in the debian/rules and debian/patches for the package.

When you run ldd on redis-server, it is linked against libjemalloc, but it seems that the logic in the redis-server binary itself is not detecting this because the ifdefs involved depend on USE_JEMALLOC being set and the packaging code is not setting this flag. However, rebuilding the package from the Ubuntu source with the flag set did not seem to help.

The latest Debian source on Git is giving me some FTBFS issues, probably user error because I am not that familiar with using the special Debian package Git repos and some of the distro specific patches probably did not get applied:

cc: error: ../deps/lua/src/lua_struct.o: No such file or directory
cc: error: ../deps/lua/src/lua_cmsgpack.o: No such file or directory

...

cc: error: ../deps/jemalloc/lib/libjemalloc.a: No such file or directory

Using the Debian source from the latest unstable tarball, 6.0.6, the error received changes:

Aug 05 19:43:23 mhall-xps redis-server[595179]: Active defragmentation cannot be enabled: it requires a Redis server compiled with a modified Jemalloc like the one shipped by default with the Redis source distribution

Reading the code some more from there, it appears that, when using the system jemalloc, as the Redis package is trying to do, because the system jemalloc does not define the symbol JEMALLOC_FRAG_HINT checked in zmalloc.h to fully enable defrag support.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: redis-server 5:5.0.7-2
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Wed Aug 5 19:03:06 2020
InstallationDate: Installed on 2020-07-28 (8 days ago)
InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: redis
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.redis.redis.conf: 2020-08-05T18:24:16.836149

Revision history for this message
Matthew Hall (mhall-9) wrote :
Changed in redis (Debian):
status: Unknown → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.