16
  • I got this message when using Orion, I suspect some kind of memory leak?

  • BugsDesktopPlanned

whitemamba If you do not have at the very least steps to reproduce and comparison with Safari in same circumstances, there is zero information for us to act on. 436MB shown by your screenshot is nothing for a browser.

    @Vlad the issue isn't shown accurately in the image. For some reason, Orion RC Graphics and Media memory usage isn't calculated in the memory usage of Orion.

    The usage of Orion RC Graphics and Media has gone up to 34gb for me, leading to the window popping up, showing Orion only using <1gb memory.

    I believe this issue started the previous RC, where preview windows was first introduced.

    • Vlad replied to this.

      eirk That kind of usage should be easy to reproduce, can you?

        Vlad I got the out of application memory consistently until I quit Orion. I don’t really know how macOS assigns memory, but Orion was definitely the thing making the message happen.

        • Vlad replied to this.

          I also see difference in the reported memory usage.
          I'm not sure that "... Graphics and Media" refer to the same thing in Safari and Orion as they are not in the same order of magnitude.

          In Safari it stays under 100MB while in Orion it keeps increasing very slowly, to about 1.8GB after a few hours of use.
          I have the same tabs open in both been using both for a couple of hours.

          In Orion I disabled all extensions.

            fuli I didn't have time setting up Orion from scratch but I also disabled every addon and it is still increasing with usage over hours. The highest I got was 5.5GB just from Graphics and Media. It's clearly leaking memory at some point and I got the feeling that it leaks faster if I browse reddit for example, where media is loaded.

              Vlad @fuli I did a clean Orion Install on a new macOS user and browsed the web for 15 minutes with various websites (reddit, WSJ, my university page, Youtube) and got the following memory stats:

              As you can see, Orion RC Graphics and Media is 18 times the memory than Safari Graphics and Media. I made sure to do the exact identical websites and clicks on both browsers side by side at the same time.

              Orion memory:

              Safari memory:

              Subjectively the memory increases more drastically when visiting websites with GIFs, Autoplay Videos and Media.

              • Vlad replied to this.

                Vlad ??? Install Orion, browse completely random websites side by side with Safari and get 18x the memory usage from graphics engine while doing the exact same stuff? How the f am I supposed to tell you even further how to reproduce this? I just browse random stuff and the memory increases. No addons, no iCloud, nothing. Fresh install.

                I understand that this is another report on the anectdotal side of things, and as such might not be of much value, but here goes: I had two "Orion RC Graphics and Media" processes running, one taking 19 GB RAM and one taking 5.5 GB. Out of curiosity, I force-quit the 19 GB one without any noticable effect on my browsing. I use low-power mode in Orion and had two different profiles open with one window each.

                6 days later

                We have verified increased memory use from Graphics and Media process and tracked it down to latest version of WebKit. Team is working hard on trying to fix this.

                15 days later
                13 days later

                Hey all, just found this thread and I thought I'd contribute some findings that may or may not help... I noticed the large memory footprint and alongside I noticed that there was a Macy's ad, owned by the Orion process that was in control of the MacOS media controls widget (there were no tabs playing media at the time).

                I think maybe the content blocker is removing elements after the DOM parser has generated media elements for the content which is subsequently removed by the blocker. I suspect the media controls handle is being leaked for every video element destroyed by uBlock Origin, which if the site is tricky (using JS to inject ads) could lead to an infinite loop of spawn/kill/leak cycles.

                Twitch.tv in particular is egregious about generating a lot of memory thrash via this bug.

                  techwiz2100 You've been able to isolate this issue a lot more than I have with an out-of-memory issue on Mojave that seems to be particularly triggered by one site I use (https://www.classicartsshowcase.org/watch-classic-arts-showcase/). I wonder if it is doing something similar to Twitch.tv? When I stream my site on a system with 8GB of RAM, I can see Memory Used go up by hundreds of MB every minute and get the out of memory/kill application popup within 30 minutes.

                    5 days later

                    Hey all, last 2 updates for Orion RC have greatly improved the memory footprint but there's still some leaks. Twitch.tv still seems to be very leaky, albeit it now takes 2-4x longer to hit the out of memory error. I think the leaks are related to the DOM model or the front end display since Twitch uses a lot of those for animations and interactables.

                    edit: I mean adding, removing and hiding DOM elements is likely causing leaks, if that wasn't clear.

                      bzgnyc I can see Memory Used go up by hundreds of MB every minute and get the out of memory/kill application popup within 30 minutes

                      Hmm.... so that's interesting since that might line up with your media player just retaining the entire video feed in memory as it streams the rest... which maybe that's because it's just downloading the video stream raw into memory and playing it back in real time? Does your leak go away when you refresh the tab? My leak is persistent until I restart Orion.

                        techwiz2100 I am curious what it is doing. In the context of your questions and further testing with the latest 99.127-Beta on Mojave, I have found this using Activity Monitor:

                        -Memory Used/App Memory goes up by ~ 300MB every 25 seconds until it runs out of RAM
                        -Then the system switches to Compressed
                        -After that reaches several GB, it switches to Swap (though system performance impact is minimal...until it says completely out of memory)
                        -Memory bursts do seem to coincide with bursts of incoming network traffic though that traffic is ~ 10MB ~ every 25 seconds
                        -Closing the window is enough to release almost all the memory back to the system -- restarting Orion after that has a negligible impact on Memory Used/App Memory

                        Oddities:
                        -Memory Used is not fully explained by the Memory values in the process list under Activity Monitor's Memory tab
                        -When I first startup Orion, Memory Used goes up ~ 100MB starting with a blank window (this part is fine -- just mentioning as the baseline)
                        -Memory Used jumps almost another 900MB as soon as I go the page that streams the video but the total increase in Memory of the visible processes associated with Orion do not go up nearly that much (total Memory of the 4 visible processes is ~ 200-250MB)
                        -As above, Memory Used goes up ~ 300MB every 25 seconds once I start streaming and again the Memory of the visible processes associated with Orion do not go up much at all; no other process appear to have a material increase in Memory yet total Memory Used/App Memory just keeps growing
                        -Viewing processes via top(1) while the system is running out of RAM, purgable memory across all the proccesses is immaterial

                        WIth the above in mind, I went back and tested Catalina and it also has a leak -- just much smaller.
                        -Starting Orion 99.127-rc/Catalina on Catalina, Memory Used goes up 200-250 MB wtih a blank page
                        -Loading the page that streams, Memory Used goes up another 250-300MB (~ about 500MB total)
                        -Every 25 seconds, Memory Used goes up ~ 10 MB
                        -Every 25 seconds, Data Received in Network shows ~ 10 MB coming through

                        I had also tested Orion 99.127-Beta on Monterey briefly yesterday:
                        -Orion/Mojave won't stream that site -- endless spinning wheel/buffering (which I find odd and including in case a useful data point but otherwise a bit of a tangent to this issue and not something I would ask the developers to figure out given they already push out binaries specific to each OS version anyway)
                        -Orion/Catalina memory usage pattern appears similar to above under Catalina
                        -Orion/Monterey -- did not discern a leak after 5 minutes but should test again. If there is a leak it is a fraction of the Catalina leak which is already relatively small