hyperion-rb 2.16.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/bin/hyperion +9 -0
- data/lib/hyperion/version.rb +1 -1
- data/lib/hyperion.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ee8566aa14b81d85a43cb2bdfad406f4f026836d230efcee7d4c386f98a1af8
|
|
4
|
+
data.tar.gz: 0c982adc33ba39f5e3b50179edaea24e9c82de40e6b11220f024a9d663e2e434
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 772d23dde2abe5b97ec1e943f46e7744fd932d57e8e8488a9374fdcf42dec6c2479d315cdd7dc6b389d5f68c83fe8973acad0940108092009c81d8c7e8dbbd4f
|
|
7
|
+
data.tar.gz: abed58d154aea89829e1b9ef74c31027fa15d451ea51ed13c6736ae452e1fd06bf030dcfc5bc9bfa83dcb413b87e365e6c600bf62ac875f3fec488b54b58e39a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.16.1 — 2026-05-04
|
|
4
|
+
|
|
5
|
+
### 2.16.1-A — macOS Obj-C fork-safety guard
|
|
6
|
+
|
|
7
|
+
**Why.** Operators landing on 2.16.0's `preload false` mode on macOS
|
|
8
|
+
were still hitting a second fork+macOS crash, distinct from the
|
|
9
|
+
Network.framework deadlock that 2.16.0 addressed. The Obj-C runtime's
|
|
10
|
+
post-fork sanity check trips when a worker touches a Foundation
|
|
11
|
+
class that was mid-initialization in the master at fork time:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
objc[…]: +[NSCharacterSet initialize] may have been in progress in
|
|
15
|
+
another thread when fork() was called. We cannot safely call it or
|
|
16
|
+
ignore it in the fork() child process. Crashing instead.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`NSCharacterSet` (and friends) load transitively through OpenSSL,
|
|
20
|
+
the system resolver, and several other native gems. The result with
|
|
21
|
+
many workers (`WEB_CONCURRENCY=0` on a multi-core box): every fresh
|
|
22
|
+
worker crashes on first Foundation touch, master respawns, ad
|
|
23
|
+
infinitum until graceful_timeout fires.
|
|
24
|
+
|
|
25
|
+
The escape hatch on macOS is the documented env var
|
|
26
|
+
`OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES`, but it MUST be in the
|
|
27
|
+
process environment before any Foundation class loads — setting it
|
|
28
|
+
from `config/hyperion.rb` (parsed after gems load) is too late.
|
|
29
|
+
|
|
30
|
+
**What 2.16.1-A ships.** `bin/hyperion` and `lib/hyperion.rb` set
|
|
31
|
+
`ENV['OBJC_DISABLE_INITIALIZE_FORK_SAFETY'] ||= 'YES'` on `darwin`
|
|
32
|
+
unconditionally — before any `require` brings in Foundation-touching
|
|
33
|
+
code. `||=` honours operators who've set the var explicitly. No-op
|
|
34
|
+
on Linux/BSD; affects only macOS.
|
|
35
|
+
|
|
36
|
+
This is a defense-in-depth change, complementary to `preload false`:
|
|
37
|
+
`preload false` keeps Network.framework's resolver state out of the
|
|
38
|
+
master; this guard keeps Obj-C runtime fork-checks from crashing
|
|
39
|
+
the workers when something else (OpenSSL etc.) still touches
|
|
40
|
+
Foundation. Together they make the macOS dev experience match Linux.
|
|
41
|
+
|
|
42
|
+
**Verification.**
|
|
43
|
+
|
|
44
|
+
- `bin/check` green.
|
|
45
|
+
- Hand-reproduced the `NSCharacterSet` worker-crash loop on macOS;
|
|
46
|
+
no longer reproduces in 2.16.1.
|
|
47
|
+
|
|
3
48
|
## 2.16.0 — 2026-05-04
|
|
4
49
|
|
|
5
50
|
### 2.16-A — `preload false`: macOS fork+resolver escape hatch
|
data/bin/hyperion
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
+
# 2.16.1 — macOS fork-safety. The Obj-C runtime's post-fork sanity check
|
|
5
|
+
# crashes any worker that touches a Foundation class which was mid-init
|
|
6
|
+
# in the master at fork time (e.g. NSCharacterSet, common as a side-effect
|
|
7
|
+
# of OpenSSL / system-resolver loads). The escape hatch is the env var
|
|
8
|
+
# below; it must be set before Foundation classes load. Set on darwin
|
|
9
|
+
# unconditionally — no-op elsewhere. `||=` so an operator who has set
|
|
10
|
+
# it explicitly (e.g. to `NO`) is honoured.
|
|
11
|
+
ENV['OBJC_DISABLE_INITIALIZE_FORK_SAFETY'] ||= 'YES' if RUBY_PLATFORM.include?('darwin')
|
|
12
|
+
|
|
4
13
|
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
14
|
require 'hyperion/cli'
|
|
6
15
|
Hyperion::CLI.run(ARGV)
|
data/lib/hyperion/version.rb
CHANGED
data/lib/hyperion.rb
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# 2.16.1 — macOS fork-safety. Mirrors the guard at the top of
|
|
4
|
+
# `bin/hyperion` so programmatic `require 'hyperion'` (specs,
|
|
5
|
+
# embedded uses) gets the same workaround. The Obj-C runtime's
|
|
6
|
+
# post-fork check crashes workers that touch a Foundation class
|
|
7
|
+
# which was mid-init in the master at fork time (NSCharacterSet
|
|
8
|
+
# is a frequent victim — it loads transitively via OpenSSL / system
|
|
9
|
+
# resolver paths). `||=` so an operator who has set the var
|
|
10
|
+
# explicitly is honoured. No-op on non-darwin platforms.
|
|
11
|
+
ENV['OBJC_DISABLE_INITIALIZE_FORK_SAFETY'] ||= 'YES' if RUBY_PLATFORM.include?('darwin')
|
|
12
|
+
|
|
3
13
|
require_relative 'hyperion/version'
|
|
4
14
|
require_relative 'hyperion/logger'
|
|
5
15
|
require_relative 'hyperion/metrics'
|