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

Chrome on ARM freezes #589

Open
matthewdunbar opened this issue Jun 18, 2024 · 6 comments
Open

Chrome on ARM freezes #589

matthewdunbar opened this issue Jun 18, 2024 · 6 comments

Comments

@matthewdunbar
Copy link

matthewdunbar commented Jun 18, 2024

When running Chrome v126 on ARM devices, calling upickle.default.write(...) multiple times eventually causes Chrome to freeze. We verified this is affecting both Android phones and M1 based Macs (and likely other ARM based devices)

I have created a minimal reproducible example here with instructions to replicate the bug: https://github.com/matthewdunbar/scalajs-chrome-bug-example

We suspect this is a bug in Chrome since our code runs correctly on v125 but starts having issues on v126. Does anyone have any thoughts on how to resolve this?

@rmmeans
Copy link

rmmeans commented Jun 18, 2024

We also noted that it this works successfully on:

  • Chrome 126 on intel (e.g. windows)
  • Firefox on ARM
  • Safari on ARM.

Whatever happened in Chrome 126 on ARM has caused some sort of issue. Something with the Javascript instruction set that uPickle creates and then when that instruction gets JIT'd on ARM it causes a bug that spikes the process in chrome to 100% and deadlocks that chrome process.

As Matthew noted, this is hits on serializing anything, so I'd expect this to come up pretty quickly for uPickle users as Chrome 126 adoption rate goes up.

@rmmeans
Copy link

rmmeans commented Jun 18, 2024

This simple app pegs the chrome process on this tab out at 99% and deadlocks (never completes). Only happens on Chrome 126 on ARM.

image

@ekrich
Copy link

ekrich commented Jun 18, 2024

Can't you submit the Javascript/repo to the Chrome (assuming you are not running through GCC)?

@rmmeans
Copy link

rmmeans commented Jun 18, 2024

We are already in process! Hopefully others who hit this won't open a ticket on uPickle for this. It's a big impact though - serializing even a simple string with uPickle on chrome 126 causes the break.

@rmmeans
Copy link

rmmeans commented Jun 18, 2024

https://issues.chromium.org/issues/347863970

@matthewdunbar
Copy link
Author

We've figured out a workaround to prevent this issue. For now we forked upickle, but here's a PR if you're interested in it:
#590

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