Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#6697 closed defect (invalid)

[macOS] 0ad drives up memory and CPU usage making the computer unusable

Reported by: Langbart Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Langbart)

  • I have built spidermonkey 91 on the 11/jan/23 (GitHub) on commit [27409]
    • I did not notice any performance issues, while debugging and playing for over a week
  • on the 18/Jan/23 I did a rebuild of spidermonkey, ever since then I noticed my RAM is being filled up by some processes when the game crashes or throws errors or I just play the game, they are called ReportCrash, spindump and sandboxed
    • killing those processes manually solves the issue and my RAM reaches normal levels again
    • had no problems with such processes in the past
  • in the last 24hrs I needed to reboot my PC 4x, that is the reason for the ticket.

Note: The steps for reproduction could not be clearly determined. This is not a good bug report. Think of it more as documentation of a problem that is not yet fully understood.

questions

  • is it possible that 0ad is the cause of those processes mentioned above to eat my memory and CPU?
  • is it possible the issue was introduced between 10-18/Jan/23 ?
    • list of commits that touched the library folder
❯ git log HEAD...HEAD~10 --oneline --format="%cd %h %an %s" libraries/
17/Jan/23 f76a92f4d0 Itms Fix and cleanup the SM91 build, fixes #6676.
14/Jan/23 cdfe6cc87e Stan Fix typo noticed by @Itms Refs #6676 Phab:rP27409 Differential Revision: https://code.wildfiregames.com/D4888
14/Jan/23 56690ca834 Stan Fix a bug with Python >= 3.11 where -rU was removed as an open flag. Patch by: @sera Refs #6676 Phab:rP27409 Differential Revision: https://code.wildfiregames.com/D4888
14/Jan/23 255d879edb Stan Fix a case sensitive issue on macOS. macOS usually do not use a case sensitive filesystem, hence why it got unnoticed. Reported by: @Freagarach Refs: Phab:rP27409
12/Jan/23 a9e965f2cb Stan Commit the Spidermonkey tarball, as it puts extra strain on CI, and package manager builds don't have internet. Reported by: @Norse_Harold
10/Jan/23 9513e7eb79 Stan [SM91] Update to Spidermonkey 91.1.3 APIs Fixes: #5986 Patch by: @wraitii Comments by: @nwtour, @Stan
image of ReportCrash process

video of spindump process

Attachments (5)

ram.png (84.3 KB ) - added by Langbart 15 months ago.
game_19_Jan_23.png (265.7 KB ) - added by Langbart 15 months ago.
ram_19_Jan_23.png (64.8 KB ) - added by Langbart 15 months ago.
replay_19_Jan_23.txt (224.1 KB ) - added by Langbart 15 months ago.
mem_20_Jan_23.png (335.5 KB ) - added by Langbart 15 months ago.

Download all attachments as: .zip

Change History (11)

by Langbart, 15 months ago

Attachment: ram.png added

comment:1 by Langbart, 15 months ago

I will just document when it happens and what I did.


Date: 19/Jan/23 ~13:00

Action: Playing a game with 4 AI's on a tiny random map, at about 25min the game starts having some slow downs, about 30 seconds later it's unbearable, but I managed to take a screenshot of the RAM before forcing a restart.

System info
Replay
Screenshots

Last edited 15 months ago by Langbart (previous) (diff)

by Langbart, 15 months ago

Attachment: game_19_Jan_23.png added

by Langbart, 15 months ago

Attachment: ram_19_Jan_23.png added

by Langbart, 15 months ago

Attachment: replay_19_Jan_23.txt added

comment:2 by Langbart, 15 months ago

Description: modified (diff)

Update description, add the case when simply playing the game

comment:3 by Langbart, 15 months ago

Reproducible steps: This is reproducible over and over again, "spindump" accumulates huge amounts of memory.

Date: 20/Jan/23 ~3:00

Action: Watching a replay, with a debug message being placed in chatHelper.js, like this:

  • binaries/data/mods/public/simulation/ai/petra/chatHelper.js

    a b PETRA.chatNewDiplomacy = function(gameState, player, newDiplomaticStance)  
    220220
    221221PETRA.chatAnswerRequestDiplomacy = function(gameState, player, requestType, response, requiredTribute)
    222222{
     223    warn(uneval(['debug', gameState, player, requestType, response, requiredTribute]))
    223224    Engine.PostCommand(PlayerID, {
    224225        "type": "aichat",
    225226        "message": "/msg " + gameState.sharedScript.playersData[player].name + " " +
  • start the replay, wait for it to freeze
  • check activity monitor for spindump
Replay
Screenshots

by Langbart, 15 months ago

Attachment: mem_20_Jan_23.png added

comment:4 by Langbart, 15 months ago

Priority: Should HaveRelease Blocker

comment:5 by Stan, 15 months ago

Does the in-game profiler (f11) show anything? Does profiler2 ? Maybe it's related to https://trac.wildfiregames.com/ticket/6193 ? Maybe we have a memory leak?

Last edited 15 months ago by Stan (previous) (diff)

in reply to:  5 comment:6 by Langbart, 15 months ago

Milestone: Alpha 27
Priority: Release BlockerShould Have
Resolution: invalid
Status: newclosed

Replying to Stan‘:

Does the in-game profiler (f11) show anything? Does profiler2 ? Maybe it's related to #6193 ? Maybe we have a memory leak?

#6193 and #6593 never ate up my memory after I closed the application, the problem here is different.


  • was closed in favor of #6699
Last edited 15 months ago by Langbart (previous) (diff)
Note: See TracTickets for help on using tickets.