Page MenuHomeSchine - Phabricator

Starmade | High Server CPU in linux if started in background mode (&)
Confirmed task for development, LowPublic

Description

If I start the server in background mode in either bash or a service script, for example:

java -Xms1024 -Xmx4096 -jar StarMade.jar -server &

This causes high CPU usage (98+ percent) on the CPU.

It looks like the admin thread (pardon my assumptions on the program structure) is either parsing 0-length input or exception handling as fast as it can, due to no longer having access to stdin, pushing the thread to 100% usage.

A workaround is to launch the server using screen without pushing to the background. Even in screen, pushing to the background causes the same issue.

While the server is running in background by script, it maxes one CPU as described.

Thread timing shows, the main thread consuming time goes from "servercontroller" to "syninlistener" when running in background.

CPU-Time while in background:


Compare to CPU-Time while in screen session (or normal use with terminal up)

Also added two application snapshots from visual VM containing thread snapshots, they may help too, also assuming this is a similar issue to the "dedicated server GUI maxing out one CPU" issue, so will be linking this in here too.

Details

Task Type
Bug
Testing Results
Affected Gamemode(s)
Serverside
Reproducible
uncertain
Last tested (version)
0.19212 (Dev)
Category
Engine
First occurrence (version)
0.19174
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 8 2015, 8:43 AM
lancake added a project: Issue Navigation.
lancake changed Category from none/unspecified to Engine.
lancake changed Affected Gamemode(s) from none/unspecified to Serverside.
lancake set First occurrence (version) to 0.19174.
lancake set Last tested (version) to 0.19212 (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 Low.
lancake changed the task status from Open to In Queue (Game).Jun 8 2015, 2:56 PM
Restricted Application edited projects, added Game Development, Starmade; removed Issue Navigation. · View Herald TranscriptJun 8 2015, 2:56 PM
AndyP shifted this object from the S1 Public space to the S3 Starmade space.Aug 11 2015, 10:25 PM
AndyP changed the edit policy from "Starmade (Project)" to "All Users".
AndyP set Task Type to Bug.
AndyP set Reproducible to uncertain.
AndyP set OS-Specific to No.
AndyP set Hardware-Specific to No.
AndyP set Video Card Vendor to uncertain.
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:10 PM
Restricted Application added a project: Engine. · View Herald TranscriptMar 10 2017, 5:10 PM
AndyP moved this task from Backlog / Unclassed to General on the Engine board.Mar 24 2017, 9:27 PM
AndyP edited projects, added Engine (General); removed Engine.