EvEmu under Valgrind
Posted: Sat Aug 16, 2014 8:32 pm
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....
at the time of shutdown, this was the server info.... (using my new interactive console. )
*********** this is on main branch codebase..........
this log is 3.3Mb and is incomplete due to server crash before loading completed.
which is NOT accurate, because the server crashed before it finished loading......
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.
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. )
*********** 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.