Skip to content

v0.5.8 — upgrade_junos self-deadlock fix

Choose a tag to compare

@fastrevmd-lab fastrevmd-lab released this 19 May 15:40
2f978d0

What changed

  • fix(upgrade_junos): remove self-deadlocking transfer-lock acquire in run() (#52 / #51)

Pre-v0.5.8, every real call to upgrade_junos with confirm=true hung indefinitely at Phase 2 (transfer) the moment preflight returned Proceed. Root cause: run() acquired the per-router transfer permit, then transfer_file::handle() tried to re-acquire the same permit on the same task — a self-deadlock.

The fix removes the redundant early acquire in run(). transfer_file::handle() is the sole owner of the per-router transfer-lock for the actual SCP critical section.

A same_task_reacquire_deadlocks regression test was added to lock in the expected (deadlock-producing) shape of TransferLocks.

Verification

  • Live-tested on vSRX-test16 (2026-05-19): lock_acquire_prelock_acquire_post completes in microseconds; full Phase 2 transfer flow proceeds normally.
  • cargo test --workspace --release: 444 passed, 0 failed.
  • cargo audit: 0 vulnerabilities.

Compatibility

  • No API surface changes vs v0.5.7.
  • No new env vars or config fields.
  • Wire-protocol compatible.