Testcase calling async.iterator N times shows over-recursion error. Chrome appears to run it fine.
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: arai)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
Open testcase and click on run.
chrome: https://share.firefox.dev/47UtB73
firefox: Uncaught (in promise) InternalError: too much recursion
| Reporter | ||
Comment 1•9 months ago
|
||
shows error with/without the new js-utask.
| Assignee | ||
Comment 2•9 months ago
|
||
there's a recursion with the following:
AsyncGeneratorResume -> AsyncGeneratorYield -> AsyncGeneratorUnwrapYieldResumption -> AsyncGeneratorResume
We should instead make it a loop inside AsyncGeneratorResume, with letting AsyncGeneratorYield and AsyncGeneratorUnwrapYieldResumption return a special value for the case.
| Reporter | ||
Comment 3•9 months ago
•
|
||
N=5000000: https://share.firefox.dev/4oGLHzL
It also sometimes goes into a weird state: https://share.firefox.dev/4ovQFPK
Updated•9 months ago
|
| Assignee | ||
Comment 4•9 months ago
|
||
| Assignee | ||
Comment 5•9 months ago
|
||
Comment 7•8 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6eb4df605cca
https://hg.mozilla.org/mozilla-central/rev/641448b8955e
| Reporter | ||
Comment 8•8 months ago
•
|
||
50000: https://share.firefox.dev/3WSfFnY (43ms)
5000000: https://share.firefox.dev/47OC1vH (15s)
Edit: seems heavy on js::NativeObject::elementsRangePostWriteBarrier
Comment 9•8 months ago
|
||
So taking a quick peek at that profile, it seems like part of the issue here is that we run into a gently awkward cliff; basically once a ListObject exceeds 2047 elements, we start having to actually -move- elements, triggering heaps of barrier cost.
Now, what we're manipulating is the generator object queue, so. I suspect this is rare outside of test cases. I hope.
Updated•7 months ago
|
Description
•