[Fizz] Push a stalled await from debug info to the ownerStack/debugTask#33634
Merged
sebmarkbage merged 3 commits intofacebook:mainfrom Jun 25, 2025
Merged
[Fizz] Push a stalled await from debug info to the ownerStack/debugTask#33634sebmarkbage merged 3 commits intofacebook:mainfrom
sebmarkbage merged 3 commits intofacebook:mainfrom
Conversation
|
Comparing: b42341d...4ca194f Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
eps1lon
reviewed
Jun 25, 2025
Comment on lines
+2155
to
+2156
| // Mark the end time of the await. If we're aborting then we don't emit this | ||
| // to signal that this never resolved inside this render. | ||
| if (request.status !== ABORTING) { | ||
| markOperationEndTime(request, task, endTime); | ||
| } |
Collaborator
There was a problem hiding this comment.
Does that not cause an infinite span in the performance track?
Contributor
Author
There was a problem hiding this comment.
No because we skip writing it if there's no end time.
However, I do want to add some kind of marker in the track to log a halted entry.
Contributor
Author
There was a problem hiding this comment.
Maybe it would be useful to have some kind of end marker to know what time it was aborted though.
046b550 to
4ca194f
Compare
unstubbable
approved these changes
Jun 25, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Jun 25, 2025
…sk (#33634) If an aborted task is not rendering, then this is an async abort. Conceptually it's as if the abort happened inside the async gap. The abort reason's stack frame won't have that on the stack so instead we use the owner stack and debug task of any halted async debug info. One thing that's a bit awkward is that if you do have a sync abort and you use that error as the "reason" then that thing still has a sync stack in a different component. In another approach I was exploring having different error objects for each component but I don't think that's worth it. DiffTrain build for [cee7939](cee7939)
unstubbable
added a commit
that referenced
this pull request
Jun 25, 2025
#33644) This PR adds tests for the Node.js and Edge builds to verify that component stacks and owner stacks of halted components appear as expected, now that recent enhancements for those have been implemented (the latest one being #33634). --------- Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
github-actions bot
pushed a commit
that referenced
this pull request
Jun 25, 2025
#33644) This PR adds tests for the Node.js and Edge builds to verify that component stacks and owner stacks of halted components appear as expected, now that recent enhancements for those have been implemented (the latest one being #33634). --------- Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> DiffTrain build for [9b2a545](9b2a545)
unstubbable
added a commit
to unstubbable/react
that referenced
this pull request
Oct 30, 2025
To quote from facebook#33634: > If an aborted task is not rendering, then this is an async abort. > Conceptually it's as if the abort happened inside the async gap. The > abort reason's stack frame won't have that on the stack so instead we > use the owner stack and debug task of any halted async debug info. This PR extends that logic to also try to resolve lazy components to find debug info that has been transferred to the inner value. In addition, we ignore any time and component info that might precede the I/O info, effectively allowing resolved I/O to also be considered for the owner stack. This is useful in a scenario where the Flight rendering might have been completed (and not prematurely aborted), but then the Fizz rendering is intentionally aborted before all chunks were received, while still allowing the remaining chunks (including I/O info for halted components) to be processed while the prerender is in the aborting state.
unstubbable
added a commit
to unstubbable/react
that referenced
this pull request
Oct 30, 2025
To quote from facebook#33634: > If an aborted task is not rendering, then this is an async abort. > Conceptually it's as if the abort happened inside the async gap. The > abort reason's stack frame won't have that on the stack so instead we > use the owner stack and debug task of any halted async debug info. This PR extends that logic to also try to resolve lazy components to find debug info that has been transferred to the inner value. In addition, we ignore any time and component info that might precede the I/O info, effectively allowing resolved I/O to also be considered for the owner stack. This is useful in a scenario where the Flight rendering might have been completed (and not prematurely aborted), but then the Fizz rendering is intentionally aborted before all chunks were received, while still allowing the remaining chunks (including I/O info for halted components) to be processed while the prerender is in the aborting state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If an aborted task is not rendering, then this is an async abort. Conceptually it's as if the abort happened inside the async gap. The abort reason's stack frame won't have that on the stack so instead we use the owner stack and debug task of any halted async debug info.
One thing that's a bit awkward is that if you do have a sync abort and you use that error as the "reason" then that thing still has a sync stack in a different component. In another approach I was exploring having different error objects for each component but I don't think that's worth it.