Skip to content

Fix startup cancellation hangs in Node workers - #67

Merged
krflol merged 3 commits into
mainfrom
fix/engine-2-5-29
Nov 2, 2026
Merged

krflol merged 3 commits into
mainfrom
fix/engine-2-5-29

Conversation

@krflol

@krflol krflol commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Cancelling a render while its worker imports the engine could leave worker.terminate() pending on Windows and prevent the queue from starting later jobs. Start the synchronous engine call from setImmediate, after module evaluation completes, while retaining the existing requirement to wait for worker exit before settling the request.

Prepare package 0.9.5 with the engine still pinned to 2.5.51. Add a 64-cycle installed-package gate that sweeps startup cancellation timings, rejects expired queued work, observes actual worker exits, and compares every recovery PDF and preview with an uncancelled baseline. CI retains its lifecycle record, logs and PDF/PNG output. The repository language adjustment also excludes development tooling from Linguist statistics.

Validation:

  • Reproduced the unchanged package's stall on Windows Node 22.23.4 and 26.10.0. A reduced import-time JavaScript loop also reproduces it without running WebAssembly.
  • The final timing-sweep gate rejected the unchanged package at cycle 27, with one worker still alive. The candidate completed all 64 cycles on each runtime, with zero remaining workers and matching PDF/PNG bytes.
  • Existing 14 queue tests, 88 Python verification tests, JavaScript syntax checks, and independent PDF/text plus preview inspection passed.
  • Local runtime checks used the exact earlier CI tarball with only its worker entry changed. The full CI matrix must verify the freshly built 0.9.5 tarball before merge and publication.

This fix addresses startup cancellation; it does not claim to resolve the separate native-crash investigation in issue #7.

@krflol krflol changed the title Describe binding languages in repository statistics Fix startup cancellation hangs in Node workers Nov 2, 2026
@krflol
krflol merged commit 97e0981 into main Nov 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant