Skip to main content
← Back to list
01Issue
BugClosedSwamp CLI
Assigneesstack72

#219 CLI crashes with exit 134 (Rust panic in tls_wrap.rs) after successful command output

Opened by bixu · 5/4/2026

Description

After commands complete successfully and print their full JSON output, swamp crashes with a Rust panic instead of exiting cleanly with code 0.

Steps to Reproduce

swamp extension pull @keeb/ssh
# or
swamp model create @keeb/ssh/host my-host --global-arg host=1.2.3.4 --global-arg user=root

Error Output

thread 'main' (10068854) panicked at ext/node/ops/tls_wrap.rs:2018:31:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' (10068854) panicked at library/core/src/panicking.rs:230:5:
panic in a function that cannot unwind
stack backtrace:
   0:        0x10189aecc - _uv_mutex_unlock
   1:        0x100b07b5c - <unknown>
   ...
thread caused non-unwinding panic. aborting.

Impact

The JSON output is fully printed before the crash, so the operation itself succeeds. However, the non-zero exit code (134 = SIGABRT) breaks scripting — any --json pipeline that checks the exit code will treat a successful operation as a failure. Also causes confusion since the command visually appears to have worked.

Environment

  • swamp version: 20260502.153639.0-sha.907c6883
  • OS: macOS Darwin 25.4.0 (arm64)
  • Datastore: S3 backend
  • Commands affected: swamp extension pull, swamp model create
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED+ 1 MOREASSIGNEDCLASSIFICATION

Closed

5/5/2026, 12:48:48 PM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack725/4/2026, 11:53:26 AM
Editable. Press Enter to edit.

stack72 commented 5/5/2026, 12:48:46 PM

@bixu

Root-caused to a Deno bug in node:tls: an Option::unwrap() on a None ArrayBuffer::data() at ext/node/ops/tls_wrap.rs. Triggered when a Uint8Array's backing ArrayBuffer is detached during TLS connection teardown — exactly the path swamp extension pull and swamp model create hit on shutdown after a successful operation.

Filed upstream as denoland/deno#33713; fix merged 2026-05-01 as denoland/deno#33737. The fix won't land in a stable Deno release until v2.8.0 (~2 weeks).

To unblock users now, swamp now bundles a pinned Deno canary commit (19bd3d8b) that contains the fix — verified 83 commits ahead of the fix commit, 0 behind. Once Deno v2.8.0 ships, the bundled runtime will swap to the official tag.

Validated end-to-end: standalone TLS panic repro passes on canary, full swamp-uat CLI matrix runs green against the canary-bundled binary, no tls_wrap / SIGABRT / unwrap signatures in any output.

Closing as fixed. The fix lands in the next swamp release; please re-open if you reproduce on a build that includes it.

Sign in to post a ripple.