Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.29k stars 438 forks source link

Potential memory leak causing hard freeze/crash of system #3977

Open derenv opened 3 months ago

derenv commented 3 months ago

Describe the bug

Potential memory leak during usage - causing a freeze (and i assume crash, had to shut down and restart the VM and/or restart entire host to regain control). No response when using meta key, ctrl+alt+delete or switching to any TTY. Also unable to access cockpit remotely (i use this to manage my VM's/server) - seemed to be unable to connect.

Happened both in a game (several times, before i gave up assuming it was the game) and outside of it on a new boot the next day when just using the launcher to download a game. System has otherwise been it's usual stable self.

As seen in the attached images, CPU and memory usage spikes dramatically shortly before crashing - one is of standard operation the day before, and on the other you can see the spikes during crash and flatlining when rebooting.

context:

I've attached the most recent log, alongside screenshots of system activity (cpu usage, memory usage, etc) from the cockpit dashboard.

Add logs

(20:31:09) INFO:    [Legendary]:        Legendary location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary
(20:31:09) INFO:    [Gog]:              GOGDL location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl
(20:31:09) INFO:    [Connection]:       Connectivity: check-online
(20:31:09) INFO:    [Connection]:       Pinging external endpoints
(20:31:09) INFO:    [Gog]:              Checking for existing gog manifests
(20:31:09) INFO:    [Nile]:             Refreshing library...
(20:31:09) INFO:    [Nile]:             Refreshing Amazon Games...
(20:31:09) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile library sync
(20:31:09) INFO:    [Nile]:             Game list updated, got 15 games
(20:31:09) WARNING: [Backend]:          Failed to register protocol with OS.
(20:31:09) INFO:    [Legendary]:        Running command: LEGENDARY_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendaryConfig/legendary /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary --version
(20:31:09) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json --version
(20:31:09) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile --version
(20:31:09) INFO:    [Connection]:       Connectivity: online
(20:31:09) INFO:    [Gog]:              Checking if login is valid
(20:31:09) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:09) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:09) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:09) INFO:    [Backend]:          AreWeAntiCheatYet data downloaded
(20:31:10) INFO:    [Backend]:          
System Information:
CPU: 8x AMD Ryzen 5 5600X 6-Core Processor
Memory: 24.57 GB (used: 11.06 GB)
GPUs:
  GPU 0:
    Name: NVIDIA Corporation GA102 [GeForce RTX 3080 Lite Hash Rate]
    IDs: D=2216 V=10de SD=3896 SV=1462
    Driver: nvidia
OS: Nobara Linux 40 (KDE Plasma) (linux)

The current system is not a Steam Deck
We are running inside a Flatpak container

Software Versions:
  Heroic: 2.15.1 Emeth
  Legendary: 0.20.35 Lowlife (Heroic)
  gogdl: 1.1.1
  comet: comet 0.1.2

  Nile: 1.1.1 Will A. Zeppeli

(20:31:10) INFO:    [Gog]:              GOG presence set
(20:31:10) INFO:    [Nile]:             Saved user data to config file
(20:31:10) INFO:    [Gog]:              Saved username to config file
(20:31:10) INFO:    [Frontend]:         Refreshing undefined Library
(20:31:10) WARNING: [Backend]:          refresh not implemented on Sideload Library Manager
(20:31:10) INFO:    [Legendary]:        Refreshing library...
(20:31:10) INFO:    [Legendary]:        Refreshing Epic Games...
(20:31:10) INFO:    [Nile]:             Refreshing library...
(20:31:10) INFO:    [Nile]:             Refreshing Amazon Games...
(20:31:10) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile library sync
(20:31:10) INFO:    [Nile]:             Game list updated, got 15 games
(20:31:10) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:10) INFO:    [Backend]:          Frontend Ready
(20:31:10) INFO:    [Legendary]:        Running command: LEGENDARY_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendaryConfig/legendary /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary list --third-party
(20:31:10) INFO:    [Backend]:          Checking for current version changelog
(20:31:10) INFO:    [Gog]:              Getting GOG library
(20:31:10) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:11) INFO:    [Gog]:              Saved games data
(20:31:12) INFO:    [Legendary]:        Game list updated, got 66 games & DLCs
(20:31:12) WARNING: [Backend]:          listUpdateableGames not implemented on Sideload Library Manager
(20:31:12) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth
(20:31:12) INFO:    [Winetricks]:       Downloading Winetricks
(20:31:12) INFO:    [Gog]:              Found 0 game(s) to update
(20:31:12) INFO:    [Legendary]:        Checking for game updates: LEGENDARY_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendaryConfig/legendary /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/legendary list --third-party
(20:31:13) INFO:    [Legendary]:        Found 0 games to update
(20:31:13) INFO:    [Nile]:             Looking for updates...
(20:31:13) INFO:    [Nile]:             Running command: NILE_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/nile_config /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/nile list-updates --json
(20:31:14) INFO:    [WineDownloader]:   Updating wine versions info
(20:31:14) INFO:    [WineDownloader]:   Fetching upstream information...
(20:31:15) INFO:    [WineDownloader]:   wine versions updated
(20:31:15) INFO:    [Backend]:          Starting the Download Queue
(20:31:15) INFO:    [Gog]:              Running command: GOGDL_CONFIG_PATH=/home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gogdlConfig /app/bin/heroic/resources/app.asar.unpacked/build/bin/x64/linux/gogdl --auth-config-path /home/deren/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json auth

Steps to reproduce

Occurred during two different scenarios:

  1. Launch Heroic

  2. Play Death's Gambit - Afterlife

  3. occurred in several parts of the game: main menu, and somewhere in the first level

  4. Launch Heroic

  5. Open Epic Games store

  6. Get free game (Callisto Protocol)

  7. Start download of game

  8. occurred before i could click the downloads tab

Expected behavior

Normal operation - play game, download, etc

Screenshots

heroic_memleak_2 heroic_memleak_1

Heroic Version

Latest Stable (Flatpak)

System Information

Nobara Linux 40 (KDE Plasma)

this is a VM in qemu/libvirt (with 4 cores from an AMD 5600X, an nvidia 3080 gpu and 24g of ram passed through)

Additional information

No response

UnixLikeUser commented 2 months ago

I have show the same problem, there is a screenshot while an update on Heroic on a game of GOG :

image

I'm on Linux Mint with Heroic version flatpak.

Sadly, I've forgot save the log during the update, sorry.

Edit : I let my message here, but you can ignore that, because is possible it's not the fault to Heroic but Cinnamon.

cyn1c commented 2 months ago

Same problem an my machine Took a few screenshots

Bildschirmfoto vom 2024-09-04 18-17-10 3minutes running Bildschirmfoto vom 2024-09-04 18-20-08 16minutes running Bildschirmfoto vom 2024-09-04 18-33-00 after heroic has been closed Bildschirmfoto vom 2024-09-04 18-33-21 after killing flatpak app Bildschirmfoto vom 2024-09-04 18-33-36

Kernel: 6.10.7-arch1-1 arch: x86_64 bits: 64 Desktop: GNOME v: 46.4 Distro: Arch Linux

Heroic Version Heroic Games Launcher com.heroicgameslauncher.hgl v2.15.1 stable