Title: Race condition in test-fs-read-stream-fd-leak.js · Issue #3215 · nodejs/node · GitHub
Open Graph Title: Race condition in test-fs-read-stream-fd-leak.js · Issue #3215 · nodejs/node
X Title: Race condition in test-fs-read-stream-fd-leak.js · Issue #3215 · nodejs/node
Description: https://github.com/nodejs/node/blob/master/test/parallel/test-fs-read-stream-fd-leak.js The intermittent assertion failure could be fired as follows: assert.js:89 throw new assert.AssertionError({ ^ AssertionError: no leaked file descrip...
Open Graph Description: https://github.com/nodejs/node/blob/master/test/parallel/test-fs-read-stream-fd-leak.js The intermittent assertion failure could be fired as follows: assert.js:89 throw new assert.AssertionError({ ...
X Description: https://github.com/nodejs/node/blob/master/test/parallel/test-fs-read-stream-fd-leak.js The intermittent assertion failure could be fired as follows: assert.js:89 throw new assert.AssertionError({ ...
Opengraph URL: https://github.com/nodejs/node/issues/3215
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Race condition in test-fs-read-stream-fd-leak.js","articleBody":"https://github.com/nodejs/node/blob/master/test/parallel/test-fs-read-stream-fd-leak.js\n\nThe intermittent assertion failure could be fired as follows:\nassert.js:89\n throw new assert.AssertionError({\n ^\nAssertionError: no leaked file descriptors using destroy() (got 5)\n at null._onTimeout (/sandbox/johnyan/github-node/test/parallel/test-fs-read-stream-fd-leak.js:37:16)\n at Timer.listOnTimeout (timers.js:89:15)\n\nThe race condition is spotted in the following code:\n\n``` javascript\n if (++i === loopCount) {\n clearTimeout(this);\n setTimeout(function() {\n assert.equal(0, openCount, 'no leaked file descriptors using ' +\n endFn + '() (got ' + openCount + ')');\n openCount = 0;\n callback \u0026\u0026 setTimeout(callback, 100);\n }, 100);\n }\n```\n\nIn the failing case, the first setTimeout function is fired before all streams are properly closed. If reduce the setTimeout period (say from 100 to 1), the failure rate is increased. Depends on the running environment (slow/fast), the failure rate varies. Can anyone suggest a better solution to this?\n","author":{"url":"https://github.com/john-yan","@type":"Person","name":"john-yan"},"datePublished":"2015-10-06T15:19:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3215/node/issues/3215"}
| 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:aa689c83-e2fd-41c1-c452-590e5ddbf40c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88A0:143958:89AF88:CA64B4:6A4E187A |
| html-safe-nonce | 495090bfd717dd875d368efa41d63f85182ac7a109042fc3283d6d38f74334eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEEwOjE0Mzk1ODo4OUFGODg6Q0E2NEI0OjZBNEUxODdBIiwidmlzaXRvcl9pZCI6IjczNzY1NjY4NjYyMDkwMjAwMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7d5923c5ae7b4613365ee6fd7d57f066b44b3161158089f798585b5ea54f16b9 |
| hovercard-subject-tag | issue:110032811 |
| 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/3215/issue_layout |
| twitter:image | https://opengraph.githubassets.com/45ab85eafaa6403306a559bef98c9d30dfe81737ae398b3362f65573abad8dbb/nodejs/node/issues/3215 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/45ab85eafaa6403306a559bef98c9d30dfe81737ae398b3362f65573abad8dbb/nodejs/node/issues/3215 |
| og:image:alt | https://github.com/nodejs/node/blob/master/test/parallel/test-fs-read-stream-fd-leak.js The intermittent assertion failure could be fired as follows: assert.js:89 throw new assert.AssertionError({ ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | john-yan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| 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 | ea9187571e3edc5f2780f750631138669441ca50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width