logging-list/logging-json were in bft-json-crdt's default feature set, so every production build printed multi-KB debug dumps on every CRDT op — executed INSIDE the global CRDT_STATE mutex. A stdout write that stalls while holding that lock blocks every task touching the CRDT (tick loop, watchers, MCP, RPC), each one pinning an OS worker thread until the tokio pool is exhausted: liveness heartbeat stops, /health dies, zero CPU. This is the mechanism behind bug 1170 (two full-sled freezes on huskies-server, both seconds after a CRDT write burst, the second insert's dump truncated mid-print in the log). The features remain available for CRDT debugging via explicit opt-in. Also fixes a latent race in persist_tx_send_success_emits_no_warn: it counted [crdt_persist] warns in the process-global log buffer, which parallel tests also write to; the debug prints had been acting as an accidental serializer. Now filters for its own story id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fHdm92yjvguPi2LiXfLB9
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[package]
|
|
name = "bft-json-crdt"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
crate-type = ["lib"]
|
|
|
|
# The logging-* features print multi-KB debug dumps on every CRDT op — and
|
|
# they execute inside the global CRDT state mutex in the server, so a stalled
|
|
# stdout write while holding that lock can pin every tokio worker and freeze
|
|
# the whole process (bug 1170). They are development tools: opt in explicitly
|
|
# with `--features bft-json-crdt/logging-list` when debugging CRDT internals.
|
|
# Never enable them in a production build.
|
|
[features]
|
|
default = ["bft"]
|
|
logging-list = ["logging-base"]
|
|
logging-json = ["logging-base"]
|
|
logging-base = []
|
|
bft = []
|
|
|
|
[dependencies]
|
|
bft-crdt-derive = { path = "bft-crdt-derive" }
|
|
colored = "3"
|
|
ed25519-dalek = { workspace = true }
|
|
indexmap = { workspace = true, features = ["serde"] }
|
|
rand = { workspace = true }
|
|
random_color = "1"
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["preserve_order"] }
|
|
serde_with = "3"
|
|
sha2 = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
criterion = { version = "0.8", features = ["html_reports"] }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["preserve_order"] }
|
|
|
|
[[bench]]
|
|
name = "speed"
|
|
harness = false
|