bugGlobulation 2 - Bugs: bug #32132, yog server runs at high CPU usage...

 
 

bug #32132: yog server runs at high CPU usage with no people logged in

Submitter:  Leo Wandersleb <giszmo>
Submitted:  Fri 14 Jan 2011 03:39:56 PM UTC
   
 
Severity:  4 - Important Status:  None
Assigned to:  None Open/Closed:  Open
Release:  0.9.4 (Beta 4) Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 14 Jan 2011 07:02:10 PM UTC, comment #2: 

According to my ps output [1] It looks as if the server script [2] is spawning more and more servers. After restarting, I get 5 lines of ./glob2-beta4 -daemon. This old process had 10.

[1]
$ ps -ALF | grep glob2
glob2     5698     1  5698  0    1   595  1044   0 Jan12 ?        00:00:00 su glob2 ./Beta4YOGServer.sh
glob2     5700  5698  5700  0    1   736  1300   0 Jan12 ?        00:00:00 bash ./Beta4YOGServer.sh
glob2    14251  5700 14251 17   10 28984  6656   0 08:03 ?        01:42:03 ./glob2-beta4 -daemon
glob2    14251  5700 14253  0   10 28984  6656   0 08:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 14255  0   10 28984  6656   0 08:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 14256  0   10 28984  6656   0 08:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 14259  0   10 28984  6656   0 08:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 31889  0   10 28984  6656   0 09:57 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700  3325  0   10 28984  6656   0 17:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700  3335  0   10 28984  6656   0 17:03 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 10129  0   10 28984  6656   0 17:19 ?        00:00:00 ./glob2-beta4 -daemon
glob2    14251  5700 10153  0   10 28984  6656   0 17:19 ?        00:00:00 ./glob2-beta4 -daemon
leo      19743  5669 19743  0    1   428   508   0 17:40 pts/0    00:00:00 grep glob2

[2]
$ sudo cat ~glob2/glob2_servers/Beta4YOGServer.sh
#!/bin/bash

while sleep 5
do
        cd /home/glob2/glob2_servers/glob2-beta4-rc/src/
        cp -f glob2 glob2-beta4
        ./glob2-beta4 -daemon >> /home/glob2/glob2_servers/logs/Beta4YOGServer.txt
done

Leo Wandersleb <giszmo>
Group Member
Fri 14 Jan 2011 04:23:52 PM UTC, comment #1: 

ok. learning about strace ...

strace can do the counting for me. now i let it count a bit and logged into yog, hosted a map, had a look at the map download section and quit:
$ sudo strace -c -p14251
Process 14251 attached - interrupt to quit
Process 14251 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 95.50    0.109950           0   2678309           time
  4.34    0.004995           1      8338           nanosleep
  0.12    0.000141           0     29189           gettimeofday
  0.04    0.000045           0     25007     25005 accept
  0.00    0.000000           0         1           restart_syscall
  0.00    0.000000           0         2           brk
  0.00    0.000000           0         2           clone
  0.00    0.000000           0         1           mprotect
  0.00    0.000000           0         1           mmap2
  0.00    0.000000           0         4           fcntl64
  0.00    0.000000           0         6           futex

Leo Wandersleb <giszmo>
Group Member
Fri 14 Jan 2011 03:39:56 PM UTC, original submission:  

right now yog is using 18-20% CPU constantly. strace showed the following:
time(NULL)                              = 1295017216
repeated 30.000 times per second. While this is clearly the source of 20% CPU, maybe the differing lines are of interest, too:
gettimeofday({1295017217, 55105}, NULL) = 0
gettimeofday({1295017217, 55143}, NULL) = 0
nanosleep({0, 0}, {0, 0})               = 0
gettimeofday({1295017217, 64964}, NULL) = 0
accept(5, 0xbfc1b058, [16])             = -1 EAGAIN (Resource temporarily unavailable)
time(NULL)                              = 1295017217
time(NULL)                              = 1295017217
accept(3, 0xbfc1afc8, [16])             = -1 EAGAIN (Resource temporarily unavailable)
accept(4, 0xbfc1af68, [16])             = -1 EAGAIN (Resource temporarily unavailable)

output of top at the time
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
14251 glob2     15   0  103m 6644 3568 R 19.7  0.1  90:32.71 glob2-beta4

Leo Wandersleb <giszmo>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by giszmo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code