Repository navigation
Check failed: !holder_map.has_named_interceptor(). when running jest #40030
Description
Activity
Seen on the CITGM run for 16.9.0, https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2754
e.g. https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2754/nodes=ubuntu1804-64/testReport/junit/(root)/citgm/jest_v27_1_0/I'm sad I did not see that one, because I looked at the result for other machines and it was related to MongoDB process issues as usual...
Here's another run with the same failure against the master branch: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2756/nodes=ubuntu1804-64/testReport/junit/(root)/citgm/jest_v27_1_0/
So we can at least exclude the ABI compat patch (that's only in v16.9.0) from the possible causes./cc @nodejs/v8
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
on Sep 7, 2021 I think the failing check is from v8/v8@76b9d98
/cc @schuay
The following can be used to reproduce this bug (in my case it crashes at 140):
describe('holder_map.has_named_interceptor crash', () => { for (let i = 0; i < 140; i++) { it(`${i}`, () => { // }); } });
Run test:
jest test.js
Reacted by Michaël Zasso, Jiawen Geng, Seva Zaikov, Oliver Salzburg and Jorge Luis LazoThe bug is triggered by the compilation of this function:
Repro without Jest:
const vm = require('vm'); vm.runInNewContext(` const STATE_SYM = Symbol('JEST_STATE_SYMBOL') const eventHandlers = [() => {}]; const dispatch = async () => { for (const handler of eventHandlers) { await handler(this[STATE_SYM]); } }; for (let i = 0; i < 1e6; i++) { dispatch(); } `);
Reacted by Mаартен - Maarten, Juan Julián Merelo Guervós and Hunter KohlerReacted by Oliver SalzburgI created an upstream bug: v8:12188
Cannot do more from my side.Reacted by Jiawen Geng, Juan Julián Merelo Guervós and vudanghdReacted by Jiawen Geng, Matin Zadeh Dolatabad, Eugene and Hunter Kohler- added a commit that references this issue
on Sep 7, 2021 Is this caused by a v8 update? If so, any chance of reverting it? Or do we think (hope 😀) a fix will land upstream relatively quickly and it'll be cherry picked?
Seen on the CITGM run for 16.9.0, ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2754
e.g. ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2754/nodes=ubuntu1804-64/testReport/junit/(root)/citgm/jest_v27_1_0I'm sad I did not see that one, because I looked at the result for other machines and it was related to MongoDB process issues as usual...
We should skip the mongo test if it causes noise hiding real issues. I'll open an issue in CITGM to track
EDIT: nodejs/citgm#875
Is this caused by a v8 update? If so, any chance of reverting it? Or do we think (hope ) a fix will land upstream relatively quickly and it'll be cherry picked?
I expect we'll fix this upstream in the next couple of days.
Reacted by Simen Bekkhus, Aric, Mаартен - Maarten and dongwook.kimReacted by Simen Bekkhus, Aric, dongwook.kim and Nick Ribal- added a commit that references this issue
on Sep 8, 2021 @SimenB In the mean time, would you be open to tweaking the problematic function in
jest-circusso that it doesn't trigger this bug (I can help with it)?
Edit: well, actually I can't find a way to prevent this optimization from happening 🙃Reacted by Jiawen Geng and Magda- added a commit that references this issue
on Sep 8, 2021 36 remaining items
- added a commit that references this issue
on Sep 16, 2021 - added a commit that references this issue
on Sep 17, 2021 - added a commit that references this issue
on Nov 1, 2021 - added 2 commits that reference this issue
on Nov 10, 2022 - added a commit that references this issue
on Jun 27, 2023 - added a commit that references this issue
on Apr 28, 2026 - added a commit that references this issue
on May 22, 2026
Version
16.9.0
Platform
Linux oliver-home 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
vm
What steps will reproduce the bug?
#40030 (comment)
How often does it reproduce? Is there a required condition?
Every single time.
What is the expected behavior?
Tests run as usual.
What do you see instead?
Additional information
#13804 sounds very related
16.8.0 didn't produce this result and still works as expected.