Page MenuHomeSchine - Phabricator

Starmade | linking system memory leak
Closed, FinishedPublic

Description

Repeatedly linking and unlinking a large amount of blocks causes a memory leak.

Tested on a 100 000 block group, memory usage went from 600 MB to 2GB and higher.

Details

Commits
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Single and Multi
Reproducible
Yes
Last tested (version)
0.199.535
Category
Control Block System: Weapons
First occurrence (version)
0.1885
Hardware/Software/System
OS-Specific
No
Hardware-Specific
No
Video Card Vendor
uncertain
Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>

Event Timeline

lancake updated the task description. (Show Details)Jun 5 2015, 1:21 PM
lancake added a project: Issue Navigation.
lancake changed Category from none/unspecified to Control Block System: Weapons.
lancake changed Affected Gamemode(s) from none/unspecified to Single and Multi.
lancake set First occurrence (version) to 0.1885.
lancake changed Reproducible from uncertain to Yes.
lancake set Last tested (version) to 0.19247 (Dev).
lancake edited a custom field.
lancake edited Serverconfig (server.cfg). (Show Details)
lancake edited Clientconfig (settings.cfg). (Show Details)
lancake added a subscriber: lancake.
lancake created this task.
lancake raised the priority of this task from to High.
lancake changed the task status from Open to In Queue (Game).Jun 5 2015, 4:30 PM
Restricted Application edited projects, added Game Development, Starmade; removed Issue Navigation. · View Herald TranscriptJun 5 2015, 4:30 PM
schema added a commit: Restricted Diffusion Commit.Jul 22 2015, 4:45 PM
schema changed the task status from In Queue (Game) to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed Game Development. · View Herald TranscriptJul 22 2015, 4:45 PM
Restricted Application added a subscriber: AndyP. · View Herald Transcript
lancake set Task Type to Bug.Jul 28 2015, 10:16 PM
lancake changed Last tested (version) from 0.19247 (Dev) to 0.19349 (Dev).
lancake set OS-Specific to No.
lancake set Hardware-Specific to No.
lancake set Video Card Vendor to uncertain.
lancake changed the task status from Resolved to In Queue (Game).
lancake lowered the priority of this task from High to Low.
Restricted Application edited projects, added Game Development; removed Quality Assurance. · View Herald TranscriptJul 28 2015, 10:16 PM

It's still there, but you really have to try to get a memory increase. Tested it out on the same 100 000 blocks. Had to press shift + V rapidly 30-50 times before noticing it climbing steadily. FPS did go down rapidly at the end till I got stuck at 1-2 fps.

Lowered priority since you really need to abuse it hard before it goes wrong.

AndyP shifted this object from the S1 Public space to the S3 Starmade space.Aug 11 2015, 8:57 PM
AndyP changed the edit policy from "Starmade (Project)" to "All Users".
micdoodle8 added a subscriber: micdoodle8.EditedSep 5 2015, 3:58 AM
micdoodle8 raised the priority of this task from Low to High.

I've looked at this a bit, and it appears to be quite a serious issue that may be the source of a lot of out of memory issues. Simply spamming V on a single module block will cause a memory leak, see the attached screenshot (the area between the red lines is when V is being spammed). I'm going to pass this issue on because schema has a better understanding of the data structures being used to store connection information.

More debug info for @schema :

lancake claimed this task.Sep 21 2015, 10:48 AM
AndyP changed the task status from In Queue (Game) to In Queue.Mar 10 2017, 5:15 PM
Restricted Application added a project: CBS: Weapons. · View Herald TranscriptMar 10 2017, 5:15 PM
schema changed the task status from In Queue to Resolved.Mar 21 2017, 5:16 AM

Solved by previous optimization in the group calculation (reusing variable sized threads)

Restricted Application edited projects, added Quality Assurance; removed Game Development. · View Herald TranscriptMar 21 2017, 5:16 AM

-QA Testing-

Fix confirmed, can still make it climb slowly but you require quite a lot of spamming and blocks to even make a dent. Spammed Shift + V on 25 000 blocks for about 30 seconds, memory usage increased by about 300MB.
It fully recovered afterwards so no permanent impact.

lancake changed Last tested (version) from 0.19349 (Dev) to 0.199.535.Jun 15 2017, 3:54 PM
lancake closed this task as Closed.Jun 16 2017, 8:12 PM
Restricted Application removed a project: Quality Assurance. · View Herald TranscriptJun 16 2017, 8:12 PM
Restricted Application removed a subscriber: AndyP. · View Herald Transcript