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

"boost.useWorker: true" in combination with frequent updates results in a consistent tab crash #3720

Closed
Venlious opened this issue Apr 4, 2024 · 3 comments

Comments

@Venlious
Copy link

Venlious commented Apr 4, 2024

Description

An application I develop for recently introduced 5 seconds resolution time series data with a refresh interval of 5 seconds. There are about 3 charts on a certain page which are regularly being updated with new data. We noticed that after running the application for about 5 minutes, the tab would always and consistently crash (Error code 5).

Inspecting the performance monitor in the developer tools didn't reveal any memory or performance issues. The more consistent metric for predicting when a tab will crash turned out to be by looking at the network requests. On our page it would consistently crash after about ±900 network requests had been made which happened to be after about 5 minutes.

After further investigation, it turned out setting boost.useWorker: false fixed the issue altogether. It would appear that something doesn't seem to be going well when you are frequently updating data in while having boost.useWorker: true. The network requests were closely tied as a metric as the worker messages show up in the network tab.

There seems to be an issue with how billboard.js uses worker threads in Chromium based browsers specifically. I was not able to repeat this issue on Firefox.

Steps to check or reproduce

If you leave this Codepen running for about 3 minutes in a Chromium based browser, it will crash the tab. If you were to look at the network requests, it will crash after about 300 network requests have been received (since the worker messages show up in the network tab).

https://codepen.io/venlious/pen/dyLdGoy

image
@netil
Copy link
Member

netil commented Apr 11, 2024

@Venlious, thanks for the report.

useWorker options is implemented creating WebWorker URL on the fly using URL.createObjectURL() and then releases via revokeObjectURL().

I could reproduce in Chrome versions 123~124, but it doesn't reproduce from 125.
Also tested on other browsers and couldn't reproduce the issue.

Browsers Version Crash
Chrome 123.0.6312.107 O
Chrome 123.0.6312.124 O
Chrome Beta 124.0.6367.29 O
Chrome Canary 125.0.6411.3 X
Chrome Canary 125.0.6412.0 X
Edge 123.0.2420.81 (arm64) O
Firefox 124.0.1 (64-bit) X
Firefox 124.0.2 (64-bit) X
Safari 17.4.1(19618.1.15.11.14) X
Safari 17.4.1 (iOS) X

NOTE: All the tests ran on MacOS 14.4.1(23E224) - Apple Silicon, unless specified

Don't know exactly the cause of the issue, but it seems chrome's issue.

@netil
Copy link
Member

netil commented Apr 16, 2024

Ref. of Chrome error code 5: vercel/next.js#39731

@netil
Copy link
Member

netil commented May 17, 2024

The chrome stable became 125.0.6422.61, and it doesn't crash.
Closing the issue.

@netil netil closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants