EvEmu under Valgrind

Read-Only Forum for General News concerning Alasiya EvE.
Guest read access allowed.

Server Development

Posts: 571

Joined: Tue Mar 25, 2014 6:47 pm

Post Sat Aug 16, 2014 8:32 pm

EvEmu under Valgrind

I have recently decided to run the server using Valgrind with the MemoryCheck tool to verify my new code and check for memory leaks.

i was not expecting what i found.

************ this is using my codebase...
my log from that run was 10.4Mb and this is the summary....
  Code:
...
==25438== LEAK SUMMARY:
==25438==       loss records: 6,761
==25438==    definitely lost: 682,698 bytes in 14,644 blocks
==25438==    indirectly lost: 29,610,002 bytes in 804,875 blocks
==25438==      possibly lost: 11,482,767 bytes in 316,388 blocks
==25438==    still reachable: 40,518,938 bytes in 1,163,427 blocks
==25438==         suppressed: 0 bytes in 0 blocks
==25438==
==25438== ERROR SUMMARY: 2078 errors from 2078 contexts (suppressed: 4 from 4)

at the time of shutdown, this was the server info.... (using my new interactive console. :) )
  Code:
...
14:18:15 L      Memory Usage:  RSS: 810.109Mb  VM: 115.913Mb                                                                         
14:18:15 L     Server UpTime:  11 H, 33 M, 15 S.     
14:18:15 L Connected Clients:  0
14:18:15 L      Loaded Items:  4195
14:18:15 L    Active Systems:  5
14:18:15 L    Active Bubbles:  430


*********** this is on main branch codebase..........
this log is 3.3Mb and is incomplete due to server crash before loading completed.
  Code:
==19590== LEAK SUMMARY:
==19590==    definitely lost: 0 bytes in 0 blocks
==19590==    indirectly lost: 0 bytes in 0 blocks
==19590==      possibly lost: 6,121,679 bytes in 174,797 blocks
==19590==    still reachable: 37,164,560 bytes in 1,128,072 blocks
==19590==         suppressed: 0 bytes in 0 blocks
==19590==
==19590== For counts of detected and suppressed errors, rerun with: -v
==19590== ERROR SUMMARY: 822 errors from 822 contexts (suppressed: 4 from 4)

which is NOT accurate, because the server crashed before it finished loading......
  Code:
15:43:01 S Log: Opened logfile '../log/log_16-08-2014-15-43.log'.
15:43:01 D Log: Log system initiated
15:43:01 L server init: Loading server configuration...
15:43:01 L
15:43:01 L SERVER VERSION: EVEmu 0.7.11-master-67bf8e0
15:43:01 L
15:43:01 L SOURCE: get at https://github.com/zhyrohaad/evemu_server.git
15:43:01 L
15:43:02 L SERVER INIT:
        Supported Client: EVE-EVE-TRANQUILITY@ccp
        Version 7.31
        Build 360229
        MachoNet 320
15:43:02 S server init: Log settings loaded from ../etc/log.ini
15:43:02 S server init: Found log directory ../log/
15:43:03 L dbcore: Connecting to
        DB:     EVE_Cruc_Test
        server: localhost:3306
        user:   eve
15:44:03 S server init: TCP listener started on port 26000.
15:44:03 L server init: starting item factory
15:44:03 L server init: starting service manager
15:44:04 L server init: Creating services.
15:44:04 L Threading: Starting TCPServerLoop with thread ID 129292032
15:44:18 L Station DB: Loading Solar systems:
........................................
15:44:40 L Station DB: Storing solar system data Done
15:44:49 L server init: Priming cached objects.
15:44:51 L server init: finished priming
15:44:51 L image server: our URL: http://localhost:26001/
15:44:51 L image server: our base: ../image_cache/
15:44:51 L server init: started image server
15:44:52 L image server: listening on port 26001
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  bind: Permission denied
15:44:53 L server init: started API server
15:44:53 L server init: Loading Dynamic Database Table Objects...
15:44:53 L server init: ---> sDGM_Effects_Table: Loading...
Killed

it still showed a loss record of 1,836 before it crashed.


so, it turns out this server code has horrible memory leaks.

i have not yet looked into it to find out where they are, but when i do, i'll post here.

Server Development

Posts: 571

Joined: Tue Mar 25, 2014 6:47 pm

Post Sat Aug 16, 2014 10:21 pm

Re: EvEmu under Valgrind

now that i've actually LOOKED at the log, i see why the main branch crashed.....
i've updated and re-run, and this is my result...

  Code:
==20249== LEAK SUMMARY:
==20249==       loss records: 253
==20249==    definitely lost: 2,754,024 bytes in 44,964 blocks
==20249==    indirectly lost: 17,701,105 bytes in 463,245 blocks
==20249==      possibly lost: 36,841 bytes in 888 blocks
==20249==    still reachable: 48,817 bytes in 80 blocks
==20249==         suppressed: 0 bytes in 0 blocks
==20249==
==20249== ERROR SUMMARY: 77 errors from 77 contexts (suppressed: 4 from 4)


please note......this is from a 15 minute run, with no clients, no systems loaded, and no items loaded.

Return to News

Who is online

Users browsing this forum: No registered users and 1 guest

cron