Title: SourceTextModule memory leak · Issue #33439 · nodejs/node · GitHub
Open Graph Title: SourceTextModule memory leak · Issue #33439 · nodejs/node
X Title: SourceTextModule memory leak · Issue #33439 · nodejs/node
Description: Version: v14.2.0 Platform: Darwin Kernel Version 19.4.0 Subsystem: vm What steps will reproduce the bug? run this snippet with --experimental-vm-modules const {SourceTextModule} = require('vm'); let grow = () => { new SourceTextModule(`1...
Open Graph Description: Version: v14.2.0 Platform: Darwin Kernel Version 19.4.0 Subsystem: vm What steps will reproduce the bug? run this snippet with --experimental-vm-modules const {SourceTextModule} = require('vm'); le...
X Description: Version: v14.2.0 Platform: Darwin Kernel Version 19.4.0 Subsystem: vm What steps will reproduce the bug? run this snippet with --experimental-vm-modules const {SourceTextModule} = require('vm...
Opengraph URL: https://github.com/nodejs/node/issues/33439
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SourceTextModule memory leak","articleBody":"\u003c!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n--\u003e\r\n\r\n* **Version**: v14.2.0\r\n* **Platform**: Darwin Kernel Version 19.4.0\r\n* **Subsystem**: vm\r\n\r\n### What steps will reproduce the bug?\r\nrun this snippet with --experimental-vm-modules\r\n```js\r\nconst {SourceTextModule} = require('vm');\r\n\r\nlet grow = () =\u003e {\r\n new SourceTextModule(`1 + 1`);\r\n setTimeout(grow, 100)\r\n}\r\n\r\ngrow()\r\n```\r\n### How often does it reproduce? Is there a required condition?\r\nReproducible on every run on my machine. \r\n### What is the expected behavior?\r\nSourceTextModule should be cleaned up by GC\r\n\r\n### What do you see instead?\r\nThe SourceTextModule instances never get cleaned up.\r\n\r\n\r\n### Additional information\r\n\r\nI think issue is that ModuleWrap is used as a key in WeakMap in vm module, but I am not really familiar with this codebase.\r\n","author":{"url":"https://github.com/grosto","@type":"Person","name":"grosto"},"datePublished":"2020-05-16T19:51:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/33439/node/issues/33439"}
| 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:3eaa866d-2810-c28d-be75-7196e3666b7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E304:A186:82DB8A:BA5FC4:6A4CB2DD |
| html-safe-nonce | 1fd9921e7710eee1b234bb6dfce5962ba18b2848b2b88ff9414d79b4727df52f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzA0OkExODY6ODJEQjhBOkJBNUZDNDo2QTRDQjJERCIsInZpc2l0b3JfaWQiOiI0NzM2NzY4Mzk1NzIxODgwMjg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a310ea709978d373c939ca383f75004e0dad737382887f0e1e225ed065d60d88 |
| hovercard-subject-tag | issue:619544175 |
| 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/33439/issue_layout |
| twitter:image | https://opengraph.githubassets.com/28347b5b2d8c007553a2fa202262882b9f05c157d39df411db86579bb67cacf4/nodejs/node/issues/33439 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/28347b5b2d8c007553a2fa202262882b9f05c157d39df411db86579bb67cacf4/nodejs/node/issues/33439 |
| og:image:alt | Version: v14.2.0 Platform: Darwin Kernel Version 19.4.0 Subsystem: vm What steps will reproduce the bug? run this snippet with --experimental-vm-modules const {SourceTextModule} = require('vm'); le... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | grosto |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| 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 | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width