[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60527] [ruby-trunk - Bug #9494] [Open] Race condition in autoload of Digest::SHA256, etc.
From:
conrad.irwin@...
Date:
2014-02-06 07:52:06 UTC
List:
ruby-core #60527
Issue #9494 has been reported by Conrad Irwin. ---------------------------------------- Bug #9494: Race condition in autoload of Digest::SHA256, etc. https://bugs.ruby-lang.org/issues/9494 * Author: Conrad Irwin * Status: Open * Priority: Normal * Assignee: * Category: ext * Target version: * ruby -v: 2.0.0p247 * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- At the moment the digest extension uses const_missing to implement autoload. Unfortunately there's a race condition: another thread can run after the constant is defined, but before it is initialized. (http://git.io/YW3bbA) There's a minimal test case here: http://git.io/5umBqQ — this was happening to us regularly in production because each sidekiq worker would race to create a hash. The work around we have deployed is to require digest/sha2.so pre-emptively. And the attached patch does that. An alternative solution would be to use `autoload`, but that is deprecated; or to change the way meta-data is stored for Digest classes so that it can be accessed immediately. There's no way to use a mutex inside const_missing to fix this, because the bug is that the constant becomes not-missing before it is fully defined. ---Files-------------------------------- require-digest-upfront.patch (1006 Bytes) -- http://bugs.ruby-lang.org/