[
https://issues.apache.org/jira/browse/FLINK-28057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicolas Ferrario updated FLINK-28057:
-------------------------------------
Description:
ARM images are not using jemalloc because LD_PRELOAD is hardcoded to use an x64
path, causing this error:
{noformat}
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libjemalloc.so' from LD_PRELOAD
cannot be preloaded (cannot open shared object file): ignored.
{noformat}
Right now docker-entrypoint is using this:
{code:sh}
maybe_enable_jemalloc() {
if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
fi
}
{code}
I propose we use this instead:
{code:sh}
maybe_enable_jemalloc() {
if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
# Maybe use export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$(uname
-i)-linux-gnu/libjemalloc.so
if [[ `uname -i` == 'aarch64' ]]; then
export
LD_PRELOAD=$LD_PRELOAD:/usr/lib/aarch64-linux-gnu/libjemalloc.so
else
export
LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
fi
fi
}
{code}
https://github.com/apache/flink-docker/pull/117
was:
Right now docker-entrypoint is using this:
{code:sh}
maybe_enable_jemalloc() {
if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
fi
}
{code}
I propose we use this instead:
{code:sh}
maybe_enable_jemalloc() {
if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
# Maybe use export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$(uname
-i)-linux-gnu/libjemalloc.so
if [[ `uname -i` == 'aarch64' ]]; then
export
LD_PRELOAD=$LD_PRELOAD:/usr/lib/aarch64-linux-gnu/libjemalloc.so
else
export
LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
fi
fi
}
{code}
https://github.com/apache/flink-docker/pull/117
> LD_PRELOAD is hardcoded to x64 on flink-docker
> ----------------------------------------------
>
> Key: FLINK-28057
> URL: https://issues.apache.org/jira/browse/FLINK-28057
> Project: Flink
> Issue Type: Bug
> Components: flink-docker
> Affects Versions: 1.15.0
> Reporter: Nicolas Ferrario
> Priority: Minor
>
> ARM images are not using jemalloc because LD_PRELOAD is hardcoded to use an
> x64 path, causing this error:
> {noformat}
> ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libjemalloc.so' from
> LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
> {noformat}
> Right now docker-entrypoint is using this:
> {code:sh}
> maybe_enable_jemalloc() {
> if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
> export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
> fi
> }
> {code}
> I propose we use this instead:
> {code:sh}
> maybe_enable_jemalloc() {
> if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
> # Maybe use export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$(uname
> -i)-linux-gnu/libjemalloc.so
> if [[ `uname -i` == 'aarch64' ]]; then
> export
> LD_PRELOAD=$LD_PRELOAD:/usr/lib/aarch64-linux-gnu/libjemalloc.so
> else
> export
> LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
> fi
> fi
> }
> {code}
> https://github.com/apache/flink-docker/pull/117
--
This message was sent by Atlassian Jira
(v8.20.7#820007)