Title: diagnostics_channel: invalid sqlite.db.query subscription activates native tracing · Issue #65312 · nodejs/node · GitHub
Open Graph Title: diagnostics_channel: invalid sqlite.db.query subscription activates native tracing · Issue #65312 · nodejs/node
X Title: diagnostics_channel: invalid sqlite.db.query subscription activates native tracing · Issue #65312 · nodejs/node
Description: Version main Platform N/A Subsystem diagnostics_channel What steps will reproduce the bug? import { channel, subscribe } from 'node:diagnostics_channel'; import { DatabaseSync } from 'node:sqlite'; const ch = channel('sqlite.db.query'); ...
Open Graph Description: Version main Platform N/A Subsystem diagnostics_channel What steps will reproduce the bug? import { channel, subscribe } from 'node:diagnostics_channel'; import { DatabaseSync } from 'node:sqlite';...
X Description: Version main Platform N/A Subsystem diagnostics_channel What steps will reproduce the bug? import { channel, subscribe } from 'node:diagnostics_channel'; import { DatabaseSync } from 'n...
Opengraph URL: https://github.com/nodejs/node/issues/65312
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"diagnostics_channel: invalid sqlite.db.query subscription activates native tracing","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nN/A\n```\n\n### Subsystem\n\ndiagnostics_channel\n\n### What steps will reproduce the bug?\n\n```js\nimport { channel, subscribe } from 'node:diagnostics_channel';\nimport { DatabaseSync } from 'node:sqlite';\n\nconst ch = channel('sqlite.db.query');\nconst db = new DatabaseSync(':memory:');\n\nconsole.log('before:', ch.hasSubscribers);\n\ntry {\n subscribe('sqlite.db.query', null);\n} catch (error) {\n console.log('caught:', error.code);\n}\n\nconsole.log('after:', ch.hasSubscribers);\n\n// This query enters the unnecessarily installed native trace callback.\ndb.exec('SELECT 1');\ndb.close();\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe invalid callback should be rejected before the channel becomes active or native modules are notified, and `hasSubscribers` should remain `false`.\n\n### What do you see instead?\n\n```console\nbefore: false\ncaught: ERR_INVALID_ARG_TYPE\nafter: true\n```\n\nA rejected subscription changes `hasSubscribers` from `false` to `true` even though no callback was installed.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-08-15T21:12:49Z","url":"https://github.com/nodejs/node/issues/65312"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8db45b31-9ea9-c251-19f7-8adbbd210636 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D848:3B3F35:31371E:405BDA:6AED1D9F |
| html-safe-nonce | 5e2a464ead563855c752b3bec01e82a88ad09ac4ce1242b20d423b1dfacaec00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODQ4OjNCM0YzNTozMTM3MUU6NDA1QkRBOjZBRUQxRDlGIiwidmlzaXRvcl9pZCI6IjMyMTgxMTQ5MzgyMTkwNzcwMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3b0023fc660ca96f21ef21795c839385cbdc8e2e31de54dccbe718ef8a562db4 |
| hovercard-subject-tag | issue:5161349991 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65312/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c07294185a821cff79ae6b2603f9ce1d517f6ced13eff3964c396ba45e944eb/nodejs/node/issues/65312 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c07294185a821cff79ae6b2603f9ce1d517f6ced13eff3964c396ba45e944eb/nodejs/node/issues/65312 |
| og:image:alt | Version main Platform N/A Subsystem diagnostics_channel What steps will reproduce the bug? import { channel, subscribe } from 'node:diagnostics_channel'; import { DatabaseSync } from 'node:sqlite';... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width