openldap ch_calloc core dump in docker containers

huangapple go评论57阅读模式
英文:

openldap ch_calloc core dump in docker containers

问题

在 Docker 24 中,在 debian docker 镜像 中运行 openldap 会导致 malloc 分段错误。甚至一个简单的版本检查也会出现问题:

$ docker run --rm -it --entrypoint bash debian
# apt update && env DEBIAN_FRONTEND=noninteractive apt install --yes slapd
# slapd -V
@(#) $OpenLDAP: slapd 2.4.57+dfsg-3+deb11u1 (May 14 2022 18:32:57) $
Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>

slapd: ../../../../servers/slapd/ch_malloc.c:107: ch_calloc: Assertion `0' failed.
Aborted (core dumped)

显然,尝试使用类似 slapd -F /tmp/slapd -h ldap://:639/ -d -1 启动服务器也会失败并导致核心转储。

这是上游错误还是 Docker 配置错误?

英文:

With docker 24, in the debian docker image, running openldap results in a malloc segmentation fault. Even a simple version check:

$ docker run --rm -it --entrypoint bash debian
# apt update &amp;&amp; env DEBIAN_FRONTEND=noninteractive apt install --yes slapd
# slapd -V
@(#) $OpenLDAP: slapd 2.4.57+dfsg-3+deb11u1 (May 14 2022 18:32:57) $
Debian OpenLDAP Maintainers &lt;pkg-openldap-devel@lists.alioth.debian.org&gt;

slapd: ../../../../servers/slapd/ch_malloc.c:107: ch_calloc: Assertion `0&#39; failed.
Aborted (core dumped)

Then obviously trying to launch the server with something like slapd -F /tmp/slapd -h ldap://:639/ -d -1 also fail with a core dump.

Is this an upstream bug or a docker misconfiguration?

答案1

得分: 1

设置一个较小的文件打开限制,比如在运行 slapd 之前执行 ulimit -n 1024 可以解决这个问题。

英文:

Setting a smaller open files limit, like for instance executing ulimit -n 1024 before running slapd solves the issue.

huangapple
  • 本文由 发表于 2023年5月25日 20:21:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76332218.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定