web
web copied to clipboard
`lru-cache` and ARM based macOS causes node to hang
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.
Moving to the canary releases that support the latest lru-cache
does not seem to correct this issue:
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: [email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
🦋 New tag: @web/[email protected]
Current testing points to this working in macOS Ventura, 13.3+...
Looping in @43081j in case he's seen this before.
I wonder if we're hitting https://github.com/isaacs/node-lru-cache/pull/301. Not sure though 🤔
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.
i run macOS too and haven't run into this fwiw. could be some edge case though just difficult to reproduce