Repository navigation
flaky test.parallel/test-diagnostics-channel-net #44143
Copy link
Copy link
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.
Description
Activity
- addedflaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
on Aug 5, 2022 @theanarkh any thoughts? It's weird also that the stack trace does not include any indication what's not being called. :\
edit: never mind, I think I found it: #44144
- addednetIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.
on Aug 5, 2022 - added a commit that references this issue
on Aug 5, 2022 @Qard Hi, what do you think about this case. Is it the wrong way to use
diagnostics_channel?Already approved the fix in #44144.
Running the code as follows will trigger this error always(./node --expose-gc test/parallel/test-diagnostics-channel-net.js). The callback of
onGCwill be triggered before timeout.'use strict'; const common = require('../common'); const assert = require('assert'); const net = require('net'); const dc = require('diagnostics_channel'); const onGC = require('../common/ongc'); const { writeFileSync } = require('fs'); const netClientSocketChannel = dc.channel('net.client.socket'); const netServerSocketChannel = dc.channel('net.server.socket'); onGC(netClientSocketChannel, { ongc: () => { writeFileSync(1, "gc netClientSocketChannel"); } }); onGC(netServerSocketChannel, { ongc: () => { writeFileSync(1, "gc netServerSocketChannel"); } }); const isNetSocket = (socket) => socket instanceof net.Socket; netServerSocketChannel.subscribe(common.mustCall(({ socket }) => { assert.strictEqual(isNetSocket(socket), true); })); netServerSocketChannel.subscribe(common.mustCall(({ socket }) => { assert.strictEqual(isNetSocket(socket), true); })); gc(); setTimeout(() => { console.log('timeout emit'); const server = net.createServer(common.mustCall((socket) => { socket.destroy(); server.close(); })); server.listen(() => { const { port } = server.address(); net.connect(port); }); }, 10000);it is related to
gcindeed. I will send a PR to fix this.Thanks !- added 2 commits that reference this issue
on Aug 7, 2022 - added a commit that references this issue
on Aug 16, 2022 - added 2 commits that reference this issue
on Aug 23, 2022 - added 2 commits that reference this issue
on Sep 5, 2022
Metadata
Metadata
Assignees
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.

Test
test-diagnostics-channel-net
Platform
Linux x64
Console output
Build links
Additional information
workertest suite?