英文:
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 && 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)
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论