Opened 15 months ago
Last modified 12 months ago
#6699 new defect
[macOS] Memory issue (sandboxed, spindump, ReportCrash) — at Version 21
Reported by: | Langbart | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
to consistently reproduce (1)
- add this debug message in
chatHelper.js
-
binaries/data/mods/public/simulation/ai/petra/chatHelper.js
a b PETRA.chatNewDiplomacy = function(gameState, player, newDiplomaticStance) 220 220 221 221 PETRA.chatAnswerRequestDiplomacy = function(gameState, player, requestType, response, requiredTribute) 222 222 { 223 warn(uneval(['debug', gameState, player, requestType, response, requiredTribute])) 223 224 Engine.PostCommand(PlayerID, { 224 225 "type": "aichat", 225 226 "message": "/msg " + gameState.sharedScript.playersData[player].name + " " +
- start the attached replay from ticket #6654 (~2mins long)
- the game freezes at the 97th turn
- forcefully quit the
pyrogenesis
app - check activity monitor for
spindump
- For the case described above, the process is always called
spindump
to allocate large amounts of memory, but the process can also be calledsandboxed
orReportCrash
in other situations.
- For the case described above, the process is always called
to consistently reproduce (2)
- pass this to the terminal and run
pyrogenesis -replay-visual="/Users/paria\ crash"
- the game crashes with the following message
- check activity monitor for
ReportCrash
- same as above with
spindump
, if I don`t stop the process manually, the PC becomes unusable with time
- same as above with
to consistently reproduce (3)
- the
sandboxed
process occurs when I try to start a replay from the built-in command line within theVSCodium
(based ofVSCode
) app.pyrogenesis -replay-visual=<here is your path to a legit replay, does not matter which one>
bisect
- conflicting test results, could still have been due to spidermonkey
- reproducing the steps with the released A26 version did not show any problems, so the problem must be with macOS or somewhere in the development cycle of A27
with [27411] the game would also freeze, but once I would forcefully closepyrogenesis
no extra process would be eating up my memoryscreenshot below is from the terminal after I forcefully closedpyrogenesis
on [27411]
related ticket
related articles
Change History (28)
by , 15 months ago
Attachment: | terminal.png added |
---|
follow-up: 2 comment:1 by , 15 months ago
comment:2 by , 15 months ago
Replying to Stan‘:
In your case it's printing the game state thousands of times that crashes the game. Is it just a way to make it faster? Can't be vulkan if it happened before. So it's Spidermonley most likely but it's probably cause we're doing something it does not like
the issue is not about the lldb
(ignore that), it about an external processing spinning up called spindump
.
follow-up: 5 comment:3 by , 15 months ago
@langbart -> Did this happen to you in regular play? Or just when adding some debugs?
comment:5 by , 15 months ago
Replying to wraitii:
@langbart -> Did this happen to you in regular play? Or just when adding some debugs?
- I have also noticed it in a regular game but have not found consistently reproducible steps.
- I described some details here: Comment 1 in Ticket 6697
comment:6 by , 15 months ago
Description: | modified (diff) |
---|
The description was extended by another possibility to reproduce the problem consistently.
by , 15 months ago
Attachment: | term_report.png added |
---|
by , 15 months ago
Attachment: | ReportCrash.png added |
---|
follow-up: 9 comment:7 by , 15 months ago
Description: | modified (diff) |
---|
- Remove bisect number
- conflicting test results, could still have been due to spidermonkey
- reproducing the steps with the released A26 version did not show any problems, so the problem must be with macOS or somewhere in the development cycle of A27
- lldb has been removed as it is not needed for the problem.
- Reproduction steps remain valid
comment:8 by , 15 months ago
Installed macOS Dependencies
❯ uname -a Darwin Paria 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 x86_64 ❯ xcode-select --version xcode-select version 2373. ❯ rustc --version rustc 1.66.1 (90743e729 2023-01-10) (built from a source tarball) ❯ cmake --version cmake version 3.25.2
comment:9 by , 15 months ago
follow-up: 11 comment:10 by , 15 months ago
Have you updated macOS recently? Both examples you mentioned produce actual crashes maybe it's a requirement. E.g you second example is just making it crash with an unsupported path
comment:11 by , 15 months ago
- terminal output: fresh install with
--force-rebuild
on library folder (latest GIT [27471]) - issue remains as described in the description
- Rename the title without including the alleged changeset, since it is no longer certain that this is the reason for the problem
Replying to Stan‘:
Have you updated macOS recently?
- always macOS 10.15.7
- only rust/cmake are updated via homebrew when new updates are released
Both examples you mentioned produce actual crashes maybe it's a requirement. E.g you second example is just making it crash with an unsupported path
The crash doesn't matter, it's just the trigger. It's about the external process eating up my memory. Crashes happened with A26 in testing as well, but never causes this external process to allocate all my memory.
comment:12 by , 15 months ago
Summary: | [macOS] Memory issue with 27412 → [macOS] Memory issue (sandboxed, spindump, ReportCrash) |
---|
comment:13 by , 15 months ago
two videos
A26 release version
- all good, no over allocation of memory after the crash
current pyrogenesis build
- the problem occurs as described in the description
follow-up: 15 comment:14 by , 15 months ago
Does it do something different in release or debug modes? I know it's tedious but since it seems reproductible can you try to bisect again?
I'll see if I can try on my macos (i have monterey)
We need to figure out why macos does weird stuff with the game. When you say A26 you mean the bundle or a version you compiled yourself?
comment:15 by , 15 months ago
Replying to Stan‘:
When you say A26 you mean the bundle or a version you compiled yourself?
Yes, the official version downloaded with Homebrew.
spindump
points at [27412], ReportCrash
pointing at [27409]
I don't know how to bisect that.
the sandboxed
issue occurs when I try to start a replay from the built-in command line within the VSCodium
(based of VSCode
) app.
follow-up: 18 comment:16 by , 15 months ago
Could you try a self compiled A26? What if you run outside of vscodium?
comment:18 by , 15 months ago
Replying to Stan‘:
Could you try a self compiled A26?
is not on my wish list today, I don't think I need to. I compiled with [27408] and none of the problems listed here occur. All problems came with [27409] and above.
What if you run outside of vscodium?
then the sandboxed
issue does not occur
for the ReportCrash
process it would fill my Console
(macOS default installed application) with out of bounds abstract origin
messages and keeps going till i kill the process
by , 15 months ago
comment:19 by , 15 months ago
Maybe vscode is sandboxed. Is there any more info about those warnings
comment:20 by , 15 months ago
Yes, there is the possibility to create a sample
from the Activity Monitor
for any process
. Here are the samples that are created once I triggered the issue.
ReportCrash
issuesandboxed
issuespindump
issue
by , 15 months ago
Attachment: | spindump.txt added |
---|
by , 15 months ago
Attachment: | sandboxed.txt added |
---|
by , 15 months ago
Attachment: | ReportCrash.txt added |
---|
comment:21 by , 15 months ago
Description: | modified (diff) |
---|
In your case it's printing the game state thousands of times that crashes the game. Is it just a way to make it faster? Can't be vulkan if it happened before. So it's Spidermonley most likely but it's probably cause we're doing something it does not like