Bug 2240293 - Redis fails to start on aarch64 with 16kb pages
Summary: Redis fails to start on aarch64 with 16kb pages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: redis
Version: 38
Hardware: aarch64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL: http://github.com/redis/redis/issues/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-22 22:33 UTC by pounce
Modified: 2023-10-04 02:33 UTC (History)
5 users (show)

Fixed In Version: redis-7.2.1-2.fc39 redis-7.0.13-2.fc38
Clone Of:
Environment:
Last Closed: 2023-10-03 13:59:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description pounce 2023-09-22 22:33:02 UTC
When using aarch64 hardware with 16kb pages, redis fails to start due to bundling jemalloc, which needs to be compiled with a 16kb pagesize. Affected software includes redis-server, redis-cli, etc.

Reproducible: Always

Steps to Reproduce:
Run `redis-server`
Actual Results:  
```
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
fish: Job 1, 'redis-server' terminated by signal SIGSEGV (Address boundary error)
```

Expected Results:  
redis starts

Device is running Fedora Asahi Remix on apple silicon. Relevant jemalloc bug (fixed in fedora jemalloc package) https://github.com/jemalloc/jemalloc/issues/467

Comment 1 Remi Collet 2023-09-25 06:49:03 UTC
Can you try a redis rebuild using this patch:

diff --git a/redis.spec b/redis.spec
index e4f6501..a054a0f 100644
--- a/redis.spec
+++ b/redis.spec
@@ -150,6 +150,15 @@ sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf
 sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf
 sed -i -e 's|^dir .*$|dir /var/lib/redis|g' redis.conf
 
+# See https://bugzilla.redhat.com/2240293
+# See https://src.fedoraproject.org/rpms/jemalloc/blob/rawhide/f/jemalloc.spec#_34
+%ifarch %ix86 %arm x86_64 s390x x86_64
+sed -e 's/--with-lg-quantum/--with-lg-page=12 --with-lg-quantum/' -i deps/Makefile
+%endif
+%ifarch ppc64 ppc64le aarch64
+sed -e 's/--with-lg-quantum/--with-lg-page=16 --with-lg-quantum/' -i deps/Makefile
+%endif
+
 # Module API version safety check
 api=`sed -n -e 's/#define REDISMODULE_APIVER_[0-9][0-9]* //p' src/redismodule.h`
 if test "$api" != "%{redis_modules_abi}"; then

Comment 2 Remi Collet 2023-09-25 07:05:20 UTC
You can download and try scratch build from

F38 (redis-7.0.13-2) https://koji.fedoraproject.org/koji/taskinfo?taskID=106674259
F39 (redis-7.2.1-2)  https://koji.fedoraproject.org/koji/taskinfo?taskID=106674152

Comment 3 pounce 2023-09-25 11:06:20 UTC
(In reply to Remi Collet from comment #2)
> You can download and try scratch build from
> 
> F38 (redis-7.0.13-2)
> https://koji.fedoraproject.org/koji/taskinfo?taskID=106674259
> F39 (redis-7.2.1-2) 
> https://koji.fedoraproject.org/koji/taskinfo?taskID=106674152

Downloaded and installed redis-7.0.13-2.fc38.aarch64 from the above builds.
Was able to start the redis service (redis-server) and connect using redis-cli.

Thanks!

Comment 4 Fedora Update System 2023-09-25 12:00:34 UTC
FEDORA-2023-cbc68067a5 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-cbc68067a5

Comment 5 Fedora Update System 2023-09-25 12:00:35 UTC
FEDORA-2023-bdb1515542 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-bdb1515542

Comment 6 Fedora Update System 2023-09-26 01:26:21 UTC
FEDORA-2023-cbc68067a5 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cbc68067a5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cbc68067a5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-09-26 02:29:27 UTC
FEDORA-2023-bdb1515542 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bdb1515542`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bdb1515542

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-10-03 13:59:11 UTC
FEDORA-2023-cbc68067a5 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-10-04 02:33:55 UTC
FEDORA-2023-bdb1515542 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.