From: "mdomsch-sz (Matt Domsch)" Date: 2022-08-03T03:35:19+00:00 Subject: [ruby-core:109419] [Ruby master Bug#18952] rb_aligned_free: munmap failed Issue #18952 has been updated by mdomsch-sz (Matt Domsch). We are using the official Ruby Docker image ruby:3.1.2-alpine3.15 which provides musl. We came to the same conclusion today to try ruby:3.1.2-slim-bullseye which comes with glibc, and using the environment variable MALLOC_ARENA_MAX=2 (it would otherwise default to 32 in our Fargate configuration). We will try this out on 8/3/22 and report back, though it takes a few days to experience the memory fragmentation that leads to such high map count thus far. We have not taken the next step of using jemalloc, and will likely do so as a further test later in the week. ---------------------------------------- Bug #18952: rb_aligned_free: munmap failed https://bugs.ruby-lang.org/issues/18952#change-98569 * Author: mdomsch-sz (Matt Domsch) * Status: Open * Priority: Normal * Assignee: peterzhu2118 (Peter Zhu) * ruby -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-musl] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Over the past several weeks, our Linux ruby 3.1.2 application has failed repeatedly with: [BUG] rb_aligned_free: munmap failed Ruby tracebacks indicate failures in many libraries and functions, due to the garbage collector running at its discretion. Reproduction is not easily accomplished as this is a low-level ruby function being invoked from within a large web application, and not directly by our application, the servers of which have 24GB RAM and are not seeing any indication of out-of-memory concerns. Unfortunately the munmap() call here does not catch the return value and errno to report why munmap() failed. I append one example backtrace log. ---Files-------------------------------- logs.gz (414 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: