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
Tests are not running anymore with C8 on node 18.11 #45013
@Trott Here a test with a package in Github actions:
That's running on Ubuntu Linux, but you reported macOS in the Platform information in the original post. Are you seeing the problem on macOS too or just on Linux?
On both platforms, on my local Mac and also in Linux in the GitHub action.
So it's not a local issue that only exists on my machine.
So it can be node, c8 or my config the project.
FYI Originally found in a repo that isnt public (of the company i work), but in this public package it's the same issue.
I add both version in the github action to show that the same code works on node 18.10 and not on node 18.11.
npx c8 node --test test.js segfaults on v18.11.0 and main. If you don't use --test, the segfault does not occur. On v18.10.0, it works fine with and without --test.
It looks like there hasn't been a new version of c8 in a few months so this is almost certainly a node bug.
@cjihrig - the if you have mentioned is there to make SIGUSR1 only start an inspector server on the internal process (to avoid conflicting ports), so I will try tackling a bit to make NODE_V8_COVERAGE work without exposing a port, since what it seems to do is save files to the disk
@MoLow do you think you'll be able to fix it before the next release? Is there anything I can help with?
If we can't get it fixed, I think we should either revert the relevant changes, or reintroduce logic to make --test and --inspect incompatible. Regarding port conflicts - is there any reason not to use the approach the cluster module uses?
@cjihrig If you want to take a look - My plan was to figure out how to start a v8 inspector agent that does not expose/run a websocket server and enable that when !options.allow_attaching_debugger && NODE_V8_COVERAGE,
Still not available in node 18.x, only in 19.x
Hope a new release of 18 will be soon, there was a release scheduled, but still no release deployed in december.
Activity
Trott commentedon Oct 15, 2022
I'm on macOS 12.6 and not having a problem with c8@7.12.0 with Node.js 18.11.0. What version of c8 are you running?
@bcoe Any suggestions for how @w3nl might determine if this is a Node.js bug, a c8 bug, or something else?
w3nl commentedon Oct 15, 2022
Latest version of c8: 7.12
w3nl commentedon Oct 15, 2022
@Trott Here a test with a package in Github actions: https://github.com/hckrnews/objects/actions/runs/3255633842/jobs/5345156351
Trott commentedon Oct 15, 2022
That's running on Ubuntu Linux, but you reported macOS in the Platform information in the original post. Are you seeing the problem on macOS too or just on Linux?
w3nl commentedon Oct 15, 2022
On both platforms, on my local Mac and also in Linux in the GitHub action.
So it's not a local issue that only exists on my machine.
So it can be node, c8 or my config the project.
FYI Originally found in a repo that isnt public (of the company i work), but in this public package it's the same issue.
I add both version in the github action to show that the same code works on node 18.10 and not on node 18.11.
w3nl commentedon Oct 15, 2022
Here a test with and without c8: https://github.com/hckrnews/objects/actions/runs/3256091485/jobs/5346101809

node 18.10: works with and without c8
node 18.11: works without c8, but with c8 it failed, no tests are found
cjihrig commentedon Oct 15, 2022
I can reproduce this on macOS:
npx c8 node --test test.jssegfaults on v18.11.0 and main. If you don't use--test, the segfault does not occur. On v18.10.0, it works fine with and without--test.It looks like there hasn't been a new version of c8 in a few months so this is almost certainly a node bug.
Trott commentedon Oct 15, 2022
@nodejs/test_runner
MoLow commentedon Oct 15, 2022
I will take a look soon, I am with a temp computer so might take more time.
It might very well be related to #44520
cjihrig commentedon Oct 15, 2022
It looks like beb0520 introduced the problem, assuming I bisected correctly.
cjihrig commentedon Oct 15, 2022
More specifically, commenting out this
ifstatement makes things work again.MoLow commentedon Oct 15, 2022
this also reproduces when passing
NODE_V8_COVERAGE@cjihrig - the if you have mentioned is there to make
SIGUSR1only start an inspector server on the internal process (to avoid conflicting ports), so I will try tackling a bit to makeNODE_V8_COVERAGEwork without exposing a port, since what it seems to do is save files to the diskcjihrig commentedon Oct 16, 2022
@MoLow do you think you'll be able to fix it before the next release? Is there anything I can help with?
If we can't get it fixed, I think we should either revert the relevant changes, or reintroduce logic to make
--testand--inspectincompatible. Regarding port conflicts - is there any reason not to use the approach the cluster module uses?1 remaining item
MoLow commentedon Oct 18, 2022
@cjihrig If you want to take a look - My plan was to figure out how to start a v8 inspector agent that does not expose/run a websocket server and enable that when
!options.allow_attaching_debugger && NODE_V8_COVERAGE,src: fix test runner coverage
w3nl commentedon Oct 22, 2022
Thanks a lot @Trott @cjihrig @MoLow
src: fix test runner coverage
w3nl commentedon Nov 2, 2022
@RafaelGSS any idea when a new release of node will be published? 18.12 doesn't had the fix
RafaelGSS commentedon Nov 2, 2022
Probably next week or the one after. We'll update nodejs/Release#737 according
src: fix test runner coverage
src: fix test runner coverage
w3nl commentedon Dec 19, 2022
Still not available in node 18.x, only in 19.x
Hope a new release of 18 will be soon, there was a release scheduled, but still no release deployed in december.
anton-107 commentedon Jun 5, 2023
I have fixed my issue by moving to node:20 image in my github actions