Skip to content

Music library update thread using more cpu resources than expected #7372

Closed

Description

@StatusCode404

Your system information

  • Steam client version (build number or date): Sep 102020 at 05:50:00
  • Distribution (e.g. Ubuntu): Ubuntu 18.04.5 LTS; Kernel: 5.8.8-050808-generic Using Kisak-mesa 20.1.8
  • Opted into Steam client beta?: [Yes/No] Yes
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist

After starting Steam, the process goes to 100% and stays there constantly and never terminates. It's been doing that since the last update. Restarting or killing the process and restarting does not stop the issue.

Steps for reproducing this issue:

  1. Start Steam or Restart Steam

Activity

  1. StatusCode404 commented on Sep 21, 2020

    @StatusCode404
    Author

    Is there any update on this? Anything that I should provide to help resolve this? I killed the process over the weekend but restarted it today. It hovered around 10%-20% for about half-hour. Now it is a flat 100% after running for half a day. What is it doing?
    image

  2. TTimo commented on Sep 21, 2020

    @TTimo
    Collaborator

    To confirm: the Steam client otherwise works (it did not hang during startup for instance). And your issue is that one (or more) of the threads in the steam process are stuck using 100% CPU.

    I think there are some open issues in this database that related to this.

    • Is this specific to steam beta, or does the main release client do this as well.

    • Can you identify which thread(s) is stuck. A good way to do this is to use htop: "To enable thread views in htop, launch htop, and press F2 to enter htop setup menu. Choose "Display option" under "Setup" column, and toggle on "Tree view" and "Show custom thread names" options. Presss F10 to exit the setup."

    • Check your ~/.steam/steam/logs folder for any information that may be relevant. Such as some warnings / messages spamming and constantly repeating?

  3. StatusCode404 commented on Sep 22, 2020

    @StatusCode404
    Author

    To confirm: the Steam client otherwise works (it did not hang during startup for instance). And your issue is that one (or more) of the threads in the steam process are stuck using 100% CPU.

    I think there are some open issues in this database that related to this.

    * Is this specific to steam beta, or does the main release client do this as well.
    

    I'll try this next. I suppose all I have to do is opt out ot Beta and the stable version will download?

    * Can you identify which thread(s) is stuck. A good way to do this is to use htop: "To enable thread views in htop, launch htop, and press F2 to enter htop setup menu. Choose "Display option" under "Setup" column, and toggle on "Tree view" and "Show custom thread names" options. Presss F10 to exit the setup."
    

    I have pasted the image at the bottom of this message

    * Check your `~/.steam/steam/logs` folder for any information that may be relevant. Such as some warnings / messages spamming and constantly repeating?
    

    I opened every single log file in that folder using glogg and enabled "follow" for each. There were no repeating red flags you tend to see with infinite error exceptions in a loop. Half the files were not even update today. Out of those that were updated today, all stopped logging anything after initial bootstrap startup of the client.
    The only 3 files that updated after an hour or so basically showed nothing important (no: failures, warnings, errors). The 3 files that updated were appinfo, configstore, and connection logs. All of them just logged normal sort of info stuff. None of them repeating and filling up disk space. All 3 log intervals are large at 15mins (appinfo and configstore) to an hour (connection).

    Screenshot from 2020-09-22 10-09-59

  4. StatusCode404 commented on Sep 22, 2020

    @StatusCode404
    Author
    * Is this specific to steam beta, or does the main release client do this as well.
    

    I have tested with the main release client for a day and it works fine. The high core usage did not happen. It is only happening with the beta.

  5. TTimo commented on Sep 23, 2020

    @TTimo
    Collaborator

    Is this due to the friends list? See #7241 - you are not reporting high cpu in steamwebhelper though so I think this is something else.

  6. StatusCode404 commented on Sep 23, 2020

    @StatusCode404
    Author

    Is this due to the friends list? See #7241 - you are not reporting high cpu in steamwebhelper though so I think this is something else.

    I don't think so because I'm always offline.

  7. luni3359 commented on Sep 25, 2020

    @luni3359

    I'm not sure if this applies here, but I was experiencing 100% CPU usage as well, and it turned out to be that the Allow background processing of Vulkan shaders option that was making it do so. The problem went away after Steam finished processing the shaders.

  8. StatusCode404 commented on Sep 25, 2020

    @StatusCode404
    Author

    I have that disabled and still experienced the 100%

  9. robobenklein commented on Sep 28, 2020

    @robobenklein

    Also seeing this issue on the stable branch:
    image

    Background shader processing is on, but I don't think it's that because it's been stuck at 100% for many hours.

    image
    (Game running 05:00-17:00, I was not at my computer 17:00-03:00 and nothing else was consuming CPU)

    Steam built Sep 3 2020, 21:18:20 (package 1599174997)

  10. TTimo commented on Sep 28, 2020

    @TTimo
    Collaborator

    @robobenklein can you identify which of your steam threads (by name) is using a full core (it was 2074097 in your screenshot)? Notice that in @StatusCode404's report all the steam threads are idle except the main one.

    ^ probably incorrect, htop may have more steam threads listed that are not captured in the snapshot. I thought it would group threads before showing child processes, but apparently not.

  11. robobenklein commented on Sep 28, 2020

    @robobenklein

    I will try to capture as much info when I encounter the bug again, I restarted steam before making a full stack trace to have it's stdout in a terminal.

  12. leon-matthews commented on Oct 9, 2020

    @leon-matthews

    I'm also seeing 100% CPU usage on Ubuntu 20.04, stable steam, on the thread CLocalLibraryCr:
    steam-100-percent
    Update: The exact same thread is up to 2hrs of CPU time now, I'm going to close Steam down. Note that I'm 'offline' in friends, am not installing or upgrading any games - I've just been working on another project all morning.

  13. TTimo commented on Oct 9, 2020

    @TTimo
    Collaborator

    That's the music library crawl. It gets bogged down and very slow, especially when you have titles with high file count installed. Unturned for instance, with 37k files in Maps/Germany/Foliage ..

  14. 4 remaining items

  15. leon-matthews commented on Oct 11, 2020

    @leon-matthews

    I can confirm that the work-around of disabling scanning music library worked for me. Thanks!

  16. WGH- commented on Dec 3, 2020

    @WGH-

    I noticed that it ventured into Proton directory, which contained a symlink to the root, and basically ended up with infinite recursion.

    openat(AT_FDCWD, "/mnt/games/SteamLibrary/steamapps/common/Proton 5.13/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.13/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.13/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.0/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.0/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.0/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common/Proton 5.0/dist/share/default_pfx/dosdevices/z:/mnt/games/SteamLibrary/steamapps/common", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 123

  17. WGH- commented on Dec 11, 2020

    @WGH-

    The scanner keeps reenabling itself for me, by the way.

  18. liskin commented on Dec 24, 2020

    @liskin

    Same here, the scanner gets infinitely deep:

    [pid 3738769] access("/data/tomi/.steam/steamapps/common/Proton 4.11/dist/share/default_pfx/dosdevices/z:/proc/1/root/proc/1/root/proc/1/root/proc/1/root/data/hudba/Children of Bodom/2000 - Hate Me (single)", F_OK) = 0
    
  19. robobenklein commented on Dec 25, 2020

    @robobenklein

    So a temporary workaround could be either disabling following of symlinks in the scan or add a symlink depth cutoff? (I think following a maximum of 2 symlinks would be acceptable.)

    Although I normally would not think that anything in the auto-generated wine prefix needs to be searched for music, right?

  20. Plagman commented on Feb 25, 2021

    @Plagman
    Member

    Please re-test today's Beta client, thanks!


    "Fixed a regression where the client would follow recursively follow symlinks in Proton install folders while discovering music files" in the 2021-02-24 Steam client beta update.

  21. mlassnig commented on Feb 25, 2021

    @mlassnig

    @Plagman Thanks!

    I added a Proton bundle (just to make sure one exists, judging from the ChangeLog), reset the music database, and restarted. Took a minute or so and my albums were found again, with no excessive CPU usage anymore.

  22. kisak-valve commented on Mar 26, 2021

    @kisak-valve
    Member

    Closing as fixed in the 2021-03-22 Steam client update.

  23. kkartaltepe commented on Oct 16, 2021

    @kkartaltepe

    It seems like this is still an issue with an Oct 13 2021 build, Steam package version: 1634158817. One core was burning 100% cpu until disabling the music library scanning in settings. Perf reported CLocalLibraryCr as the steam stack as someone had reported earlier (though the thread seemed be doing a whole lot of nothing but locking mutexes).

  24. f0o commented on Oct 22, 2021

    @f0o

    I can confirm that 1634158817 consumes 5 cores while absolutely idle. Music scanning en/disable has no effect.

    //edit seems to be the Chat Window that drains 500% CPU. closing the chat window (even with just one chat) removes all CPU load

  25. exa18 commented on May 5, 2022

    @exa18

    confirm, opened only Deck and rised CPU usage to 1/3 (all cores). This issue also prevents display to blank (power manager). Also list steam in htop show over 100 pids open where ps reports only 12-15. ref
    and also despite of output 14 from ps axjf | grep steam | wc -l
    I get this:
    Screenshot_2022-05-05_21-28-02

  26. edenist commented on Jun 8, 2023

    @edenist

    Just popping in so say this is still an issue on the latest release version of the steam client.

    Removing all music library locations and disabling auto-scans resolved the issue for me, but the scan still appears to be getting bogged down somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions