You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
app-patterns: promise_all_chains rejects with a resolution value at scale (Uncaught (in promise) 0) #7497
Split out of #7475, which turned out to be two unrelated defects. #7495 fixes the iterator-drain rooting bug that made object_deep_clone fail; this one is untouched by it.
Uncaught (in promise) TypeError: value is not a function
Node prints checksum: 2500050000.
Why this is a separate defect from #7475's rooting bug
#7495 roots the five live GC values js_iterator_to_array carried in bare Rust locals across an allocating .next(). That made object_deep_clone correct under both links. promise_all_chains is unchanged by it, in both configurations — which is the evidence that it is not the same family.
The PERRY_NO_AUTO_OPTIMIZE=1 message is the interesting one. Uncaught (in promise) 0 says a promise REJECTED with the value 0 — and 0 is unitOfWork(0)'s first await Promise.resolve(i) value, i.e. a resolution value arriving on the rejection path, not a rooting-shaped wild pointer.
Scale-dependent
The kernel is N_BATCHES = 1000, BATCH_SIZE = 50 — 50 000 three-deep await chains, drained 50 at a time through Promise.all. Reduced to N_BATCHES = 3, BATCH_SIZE = 5 it prints the correct checksum: 240. So it needs scale; a first look should establish whether the threshold is a count, a microtask-queue depth, or a collection.
Impact
This is the last blocker on the public benchmark artifact: run_public_baseline.sh completes all four legs and then refuses on "app-pattern component is incomplete or has a correctness failure" for this one kernel. It is also the single entry in the skip list of the new auto-opt-app-patterns gate (scripts/auto_opt_app_patterns.sh), and that list is rot-checked — a skip naming a kernel that no longer exists fails the script — so the line comes out with the fix.
The other eleven app-pattern kernels pass through the auto-optimize link on #7495's branch.
Activity
docs: point the two residual #7475 defects at their own issues
docs: point the two residual #7475 defects at their own issues
fix(gc): root the iterator drain's live values across .next() (#7475) (…
fix(test): make the root-lowering pin reachable from integration suit…
fix(test): make the root-lowering pin reachable from integration suit…
docs(changelog): #7516 fragment for the #7497 from-space reads
fix(gc): root Promise.resolve/reject/try/withResolvers/then across th…
fix(gc): root the clone source across js_array_clone's destination al…
fix(gc): root the microtask runner's callback and value across the ho…
fix(gc): root a popped Task before enter_microtask_context, not after (…
fix(gc): root the async-step producer's closure, next and value acros…
fix(gc): root js_async_step_done's result promise across the settle i…
fix(gc): address CodeRabbit's six same-family findings (#7497)
fix(gc): root globalThis across the builtin-lookup key allocation (#7497
fix(gc): root the spec Promise combinators' live values across their …
fix(gc): root the native resolving-function pair and the combinator's…
docs(changelog): #7516 fragment for the #7497 from-space reads
fix(gc): root Promise.resolve/reject/try/withResolvers/then across th…
fix(gc): root the clone source across js_array_clone's destination al…
fix(gc): root the microtask runner's callback and value across the ho…
fix(gc): root a popped Task before enter_microtask_context, not after (…
fix(gc): root the async-step producer's closure, next and value acros…
fix(gc): root js_async_step_done's result promise across the settle i…
fix(gc): address CodeRabbit's six same-family findings (#7497)
fix(gc): Promise.all at scale read globalThis and its own combinator …
fix(gc): three more re-read-vs-stale-local orderings around the async…
fix(gc): three more re-read-vs-stale-local orderings around the async…
perf(runtime): guarded per-element fast arm for Promise.all (#7911) (#…