Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lru-cache and ARM based macOS causes node to hang #2132

Open
Westbrook opened this issue Feb 28, 2023 · 6 comments
Open

lru-cache and ARM based macOS causes node to hang #2132

Westbrook opened this issue Feb 28, 2023 · 6 comments

Comments

@Westbrook
Copy link
Member

I've not been able to suss out what is actually going on, but some intersection of the lru-cache leveraged in https://github.com/modernweb-dev/web/blob/master/packages/dev-server-core/src/middleware/PluginTransformCache.ts#L33 and running Web Test Runner on an ARM based mac causes the process to hand and consumer 100% CPU.

I don't think it always did this, but it's hard to tell due to the fact that less files under test are less likely to trigger the hang. It also, doesn't happen on Intel based macs, which reduces the chances of catching the error in action.

Locally, I'm looking at just disabling the cache with patch-package in the lru-cache package, but happy to share any further knowledge I can share on the subject with anyone else interested in spelunking this issue.

@Westbrook
Copy link
Member Author

Moving to the canary releases that support the latest lru-cache does not seem to correct this issue:

🦋  New tag:  @web/dev-server@0.0.0-canary-20230328172255
🦋  New tag:  @web/dev-server-core@0.0.0-canary-20230328172255
🦋  New tag:  @web/dev-server-esbuild@0.0.0-canary-20230328172255
🦋  New tag:  @web/dev-server-rollup@0.0.0-canary-20230328172255
🦋  New tag:  @web/dev-server-storybook@0.0.0-canary-20230328172255
🦋  New tag:  @web/rollup-plugin-html@0.0.0-canary-20230328172255
🦋  New tag:  @web/rollup-plugin-import-meta-assets@0.0.0-canary-20230328172255
🦋  New tag:  @web/rollup-plugin-polyfills-loader@0.0.0-canary-20230328172255
🦋  New tag:  rollup-plugin-workbox@0.0.0-canary-20230328172255
🦋  New tag:  @web/test-runner@0.0.0-canary-20230328172255
🦋  New tag:  @web/test-runner-chrome@0.0.0-canary-20230328172255
🦋  New tag:  @web/test-runner-coverage-v8@0.0.0-canary-20230328172255
🦋  New tag:  @web/test-runner-mocha@0.0.0-canary-20230328172255
🦋  New tag:  @web/test-runner-playwright@0.0.0-canary-20230328172255

@Westbrook
Copy link
Member Author

Current testing points to this working in macOS Ventura, 13.3+...

@koddsson
Copy link
Contributor

koddsson commented Nov 1, 2023

Looping in @43081j in case he's seen this before.

@koddsson
Copy link
Contributor

koddsson commented Nov 1, 2023

I wonder if we're hitting isaacs/node-lru-cache#301. Not sure though 🤔

@Westbrook
Copy link
Member Author

I’ve found it to no longer exist in later versions of macOS/ARM chips, but it is hard to say when talking about such subtle nuance.

@43081j
Copy link
Contributor

43081j commented Nov 1, 2023

i run macOS too and haven't run into this fwiw. could be some edge case though just difficult to reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants