From: "mdomsch-sz (Matt Domsch)" Date: 2022-08-05T12:58:12+00:00 Subject: [ruby-core:109425] [Ruby master Bug#18952] rb_aligned_free: munmap failed Issue #18952 has been updated by mdomsch-sz (Matt Domsch). We were able to get our application with ruby:3.1.2-slim-bullseye and MALLOC_ARENA_MAX=2 into production last night, and there were no observed failures since. Without the change we would have expected several hundred failures. This appears to be an appropriate solution for us. The number of memory maps per process is between 600 and 3200, well below the 65530 limit we were reaching frequently before. ---------------------------------------- Bug #18952: rb_aligned_free: munmap failed https://bugs.ruby-lang.org/issues/18952#change-98580 * 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: