brave-browser icon indicating copy to clipboard operation
brave-browser copied to clipboard

spotify out of memory and instagram reels

Open kenewjr opened this issue 1 year ago • 6 comments

Description

everytime i open instagram reels it makes tab instagram freeze but when i turn off widevine it's working normally and spotfy randomly crash with error : out of memory

Steps to Reproduce

-instagram-

  1. open instagram
  2. go to reels instagram
  3. freeze without showing any video but some time showing only 3-5 video -spotify-
  4. open spotify
  5. play from playlist
  6. spotfy randomly crash with error out of memory

Actual result:

Expected result:

1.instagram showing videos reels everytime i scroll 2.spotfy continue play the song until playlist end

Brave version (brave://version info)

1.63.162 Chromium: 122.0.6261.69 (Official Build) (64-bit)

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? no
  • Does the issue resolve itself when disabling Brave Rewards? no
  • Is the issue reproducible on the latest version of Chrome? yes

Miscellaneous Information:

instagram reels worked when i turn off widevine

kenewjr avatar Feb 24 '24 12:02 kenewjr

Lots of users reporting this issue (Spotify) in this thread: https://community.brave.com/t/spotify-keeps-crashing-in-brave/532078/23

Brave-Matt avatar Mar 07 '24 18:03 Brave-Matt

I can confirm Spotify is leaking memory and crashes after some time on latest v1.64.109

wooque avatar Mar 21 '24 18:03 wooque

Latest Chrome 123.0.6312.58 doesn't have this issue. It's a shame that I have to use Chrome to play Spotify.

wooque avatar Mar 25 '24 18:03 wooque

https://www.reddit.com/r/truespotify/comments/1ay9n3d/spotify_crashes_and_gives_me_out_of_memory_error/

Looks like its in Chromium issue

ryanbr avatar Mar 27 '24 23:03 ryanbr

I noticed that high memory usage is not reported by task manager. For example hover over tab will show 3.7GB memory usage, while task manager shows 250MB.

wooque avatar Mar 29 '24 16:03 wooque

an upstream bug: https://issues.chromium.org/issues/329580320

atuchin-m avatar May 09 '24 16:05 atuchin-m

The upstream bug is fixed and Chromium claims it helps to resolve most of the issues for them. However, it cant still reproduce the issue on a recent nightly (cr126) with chromium fix.

I've managed to grab and symbolize a memory-infra heap dump, but the data is controversial (Release optimizations?): image

atuchin-m avatar Jun 18 '24 20:06 atuchin-m

I've managed to get the correct stack. It matches the crash dumps and the details in the chromium issue. image

trace_with_heap_dump.json.gz

atuchin-m avatar Jun 18 '24 20:06 atuchin-m

I've pushed CL to upstream that should improve the situation: https://chromium-review.googlesource.com/c/chromium/src/+/5670619/1

However, despite Chrome also has this issue, it is more severe in Brave Browser. The reason is an avalanche of requestIdleCallback originated from ReChapta javascript (from spotify.com) Each round (typically 100ms) the page got N callback fires and schedules N+1 new requestIdleCallback with timeout (usually 3000ms).I haven't managed to catch the same for Chrome.

Screenshot 2024-06-24 at 10 38 35 PM

image

atuchin-m avatar Jul 01 '24 13:07 atuchin-m

Closing the above as it's being resolved by https://github.com/brave/brave-core/pull/24712.

kjozwiak avatar Aug 06 '24 14:08 kjozwiak

Opening since the issue still exists on Nightly

ShivanKaul avatar Aug 19 '24 21:08 ShivanKaul

Closing out since we landed a fix in 1.69.x already. @ShivanKaul Can you create a new issue for this as it's a problem still on Nightly channel.

rebron avatar Aug 20 '24 18:08 rebron

We landed a fix, but that didn't help right? AFAIK this problem exists on Beta and Release still.

ShivanKaul avatar Aug 20 '24 23:08 ShivanKaul

Asking for confirmation in https://community.brave.com/t/spotify-keeps-crashing-in-brave/532078/105

ryanbr avatar Aug 21 '24 02:08 ryanbr