fhq-server
fhq-server copied to clipboard
leak memory
I just started the server from under "valgrind" and sent a few requests using tests/basic/test_ws_crash.py
Result:
LEAK SUMMARY:
definitely lost: 448 bytes in 4 blocks
indirectly lost: 2,208 bytes in 28 blocks
possibly lost: 80,740 bytes in 49 blocks
still reachable: 289,495 bytes in 1,869 blocks
suppressed: 0 bytes in 0 blocks
ERROR SUMMARY: 42 errors from 42 contexts (suppressed: 0 from 0)
Attached full logs: server.log valgrind.log
Thanks for you!
Basically problem in wrapper or in mysql driver, also problem can be in wrong code which use QMySQL driver.
- main target solution: replace wrapper by Qt and use original code for working with mysql database
https://stackoverflow.com/questions/5134891/how-do-i-use-valgrind-to-find-memory-leaks
Runned new test:
$ valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt \
./fhq-server -wd ../ci/travis/data
valgrind:
==7435== LEAK SUMMARY:
==7435== definitely lost: 11,296 bytes in 84 blocks
==7435== indirectly lost: 135,164 bytes in 1,310 blocks
==7435== possibly lost: 592,608 bytes in 1,610 blocks
==7435== still reachable: 1,056,532 bytes in 11,688 blocks
==7435== suppressed: 0 bytes in 0 blocks
==7435==
==7435== ERROR SUMMARY: 340 errors from 340 contexts (suppressed: 0 from 0)
==7435== HEAP SUMMARY:
==7435== in use at exit: 1,795,600 bytes in 14,692 blocks
==7435== total heap usage: 125,078 allocs, 110,386 frees, 21,563,189 bytes allocated