From a10778ea247451fc242a0d9a64062ca12c2b34e4 Mon Sep 17 00:00:00 2001 From: petergoldstein Date: Sun, 4 Oct 2026 12:55:07 -0400 Subject: [PATCH 1/2] Document Ruby bug #21195 and drop Ruby 3.2 from CI Ruby 3.2.x, 3.3.0-3.3.7 and 3.4.0-3.4.2 can abort the process with "[BUG] rb_sys_fail_path_in(io_fillbuf, ...) - errno == 0" when a read using IO#timeout is interrupted by a signal. Dalli 4.x sets IO#timeout on Ruby 3.2+, so it can trigger this, and Ruby 3.2 reached end of life without the fix. Document it in the README with the fixed versions, and stop testing Ruby 3.2, whose CI runs intermittently crashed on it. Refs #1180. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/tests.yml | 1 - CHANGELOG.md | 7 +++++++ README.md | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3cf2515..986cb9a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,6 @@ jobs: - '4.0' - '3.4' - '3.3' - - '3.2' - '3.1' - jruby-10 - truffleruby diff --git a/CHANGELOG.md b/CHANGELOG.md index bf81f7e0..ef9e4e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ Dalli Changelog Unreleased ========== +Notes: + +- Document Ruby bug #21195, a VM crash (`[BUG] rb_sys_fail_path_in(io_fillbuf, ...) - errno == 0`) when a socket read using `IO#timeout` is interrupted by a signal, in the README (#PR_NUMBER) + - Affects Ruby 3.2.x, 3.3.0–3.3.7 and 3.4.0–3.4.2. Fixed in 3.3.8 and 3.4.3; Ruby 3.2 reached end of life without the fix + - Ruby 3.1 doesn't use `IO#timeout` and isn't affected + Development: +- Drop Ruby 3.2 from the CI matrix, since that bug intermittently crashed its test runs (#PR_NUMBER) - Fix three flaky tests: the `KeyManager` namespace key-length test, the Rack session freshness test, and `MemcachedManager`'s start and stop handling (backport of #1141, #1182) - Fix flaky failover tests: move their ports out of Linux's ephemeral port range, and wait for memcached to accept connections after starting it (backport of #1184) diff --git a/README.md b/README.md index 163d0e88..103edc75 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,18 @@ The name is a variant of Salvador Dali for his famous painting [The Persistence * Ruby 3.1 or later * memcached 1.4 or later (1.6+ recommended for meta protocol support) +### Known Ruby issue: crash on an interrupted socket read + +On Ruby 3.2 and later, Dalli sets socket timeouts with `IO#timeout`. Ruby 3.2.x, 3.3.0–3.3.7 and 3.4.0–3.4.2 have a bug ([Ruby #21195](https://bugs.ruby-lang.org/issues/21195)) where a timed read interrupted by a signal aborts the whole process: + +``` +[BUG] rb_sys_fail_path_in(io_fillbuf, fd:N ) - errno == 0 +``` + +The crash is inside Ruby itself, so it can't be rescued. It was fixed in Ruby 3.3.8 and 3.4.3. Ruby 3.2 reached end of life without the fix. If you see this crash, upgrade to Ruby 3.3.8+ or 3.4.3+. Ruby 3.1 doesn't use `IO#timeout` and isn't affected. + +Ruby 3.2 is no longer part of this branch's CI matrix for the same reason. + ## Protocol Options Dalli supports two protocols for communicating with memcached: From 366aae340333d3e13e22e4152445c1c43a39d1a3 Mon Sep 17 00:00:00 2001 From: petergoldstein Date: Sun, 4 Oct 2026 12:55:32 -0400 Subject: [PATCH 2/2] Add PR number to changelog entries Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef9e4e6c..625dcbde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,13 @@ Unreleased Notes: -- Document Ruby bug #21195, a VM crash (`[BUG] rb_sys_fail_path_in(io_fillbuf, ...) - errno == 0`) when a socket read using `IO#timeout` is interrupted by a signal, in the README (#PR_NUMBER) +- Document [Ruby bug 21195](https://bugs.ruby-lang.org/issues/21195), a VM crash (`[BUG] rb_sys_fail_path_in(io_fillbuf, ...) - errno == 0`) when a socket read using `IO#timeout` is interrupted by a signal, in the README (#1188) - Affects Ruby 3.2.x, 3.3.0–3.3.7 and 3.4.0–3.4.2. Fixed in 3.3.8 and 3.4.3; Ruby 3.2 reached end of life without the fix - Ruby 3.1 doesn't use `IO#timeout` and isn't affected Development: -- Drop Ruby 3.2 from the CI matrix, since that bug intermittently crashed its test runs (#PR_NUMBER) +- Drop Ruby 3.2 from the CI matrix, since that bug intermittently crashed its test runs (#1188) - Fix three flaky tests: the `KeyManager` namespace key-length test, the Rack session freshness test, and `MemcachedManager`'s start and stop handling (backport of #1141, #1182) - Fix flaky failover tests: move their ports out of Linux's ephemeral port range, and wait for memcached to accept connections after starting it (backport of #1184)