Title: cpu-prof doesn't propagate to workers when env is set · Issue #52825 · nodejs/node · GitHub
Open Graph Title: cpu-prof doesn't propagate to workers when env is set · Issue #52825 · nodejs/node
X Title: cpu-prof doesn't propagate to workers when env is set · Issue #52825 · nodejs/node
Description: Version 20.8.1 Platform Linux ushanka-housing 6.5.0-1020-oem #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 3 14:54:32 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Subsystem cpu-prof What steps will reproduce the bug? You can reproduce this by modify...
Open Graph Description: Version 20.8.1 Platform Linux ushanka-housing 6.5.0-1020-oem #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 3 14:54:32 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Subsystem cpu-prof What steps will reproduce t...
X Description: Version 20.8.1 Platform Linux ushanka-housing 6.5.0-1020-oem #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 3 14:54:32 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Subsystem cpu-prof What steps will reproduce t...
Opengraph URL: https://github.com/nodejs/node/issues/52825
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cpu-prof doesn't propagate to workers when env is set ","articleBody":"### Version\n\n20.8.1\n\n### Platform\n\nLinux ushanka-housing 6.5.0-1020-oem #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 3 14:54:32 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\n\n### Subsystem\n\ncpu-prof\n\n### What steps will reproduce the bug?\n\nYou can reproduce this by modifying one of the existent node tests. \r\n\r\nIf you edit `tests/fixtures/workload/fibonacci-worker.js` in this repo with\r\n\r\n```diff\r\n-new Worker(path.join(__dirname, 'fibonacci.js'));\r\n+new Worker(path.join(__dirname, 'fibonacci.js'), {env: process.env});\r\n```\r\n\r\nand then run \r\n```\r\nnode ./test/sequential/test-cpu-prof-dir-worker.js\r\n```\r\n\r\nthe new test will fail\n\n### How often does it reproduce? Is there a required condition?\n\nThis should reproduce 100% of the time -- you don't need to do anything special\n\n### What is the expected behavior? Why is that the expected behavior?\n\nAccording to https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#new-workerfilename-options, the default value for a worker thread's env is process.env. Thus, not passing an environment and passing process.env as the environment should always produce the same behavior. \n\n### What do you see instead?\n\nWhen running in its original form, the test produces two profile files, as intended. When passing `{env: process.env}` into the worker invocation, however, it only produces one profile file. \n\n### Additional information\n\nIf I print the environment in the worker thread, it appears to be identical in both cases. It doesn't seem like the problem is that part of the environment is getting lost, but rather there's some hidden variable that isn't getting propagated","author":{"url":"https://github.com/orinatic","@type":"Person","name":"orinatic"},"datePublished":"2024-05-03T16:05:43Z","url":"https://github.com/nodejs/node/issues/52825"}
| 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:79472fda-aa58-976b-9871-b0710095f8d1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B994:20C6D9:8668D9:B2C445:6AED29E8 |
| html-safe-nonce | bd66174142c21846a3b74922b5d83568c9113d6b578901e9a8685c507cfd127c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTk0OjIwQzZEOTo4NjY4RDk6QjJDNDQ1OjZBRUQyOUU4IiwidmlzaXRvcl9pZCI6IjM4MjA4MTE1NzEyNjQ1NjM2ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e98783cfe22d914ffcbe9744b53ee1fd8a4c30707390ba8f7d2f030f04d850f8 |
| hovercard-subject-tag | issue:2277987191 |
| 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/52825/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac6a680df945e38ce9b750a00bfadca051bd5b4080a212623d7f7b09d195469b/nodejs/node/issues/52825 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac6a680df945e38ce9b750a00bfadca051bd5b4080a212623d7f7b09d195469b/nodejs/node/issues/52825 |
| og:image:alt | Version 20.8.1 Platform Linux ushanka-housing 6.5.0-1020-oem #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 3 14:54:32 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Subsystem cpu-prof What steps will reproduce t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | orinatic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2 |
| 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 | 98b41fa4b5635ceb45a4c54320fced73817ff290 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width