|
It's a plugin issue because memory usage of a normal Pawn script is fixed (size of the globals + size of the stack). Using unthreaded MySQL queries may cause memory leaks if you forget to free the result (cache_delete).
|
|
Some plugins, such as mysql, doesn't free the result cache when you use unthreaded queries (mysql_query), so it means that every time a 'select' query gets executed, results are stored in RAM but never cleared, and so on, so it keeps increasing your RAM usage.
|

|
load up an empty instance of the server with valgrind, then test all plugins you use separatly, each time running valgrind too. Valgrind will tell you if a plugin has memory leaks by reporting it as inaccessible/lost memory.
|
==8128== Memcheck, a memory error detector ==8128== Copyright © 2002-2013, and GNU GPL'd, by Julian Seward et al. ==8128== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==8128== Command: ./samp03svr --leak-check=full ==8128== ==8128== Conditional jump or move depends on uninitialised value(s) ==8128== at 0x80822F6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80835A8: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x807EC25: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x806EF28: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x807B9E6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AF584: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AA0E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x41C9AF2: (below main) (libc-start.c:287) ==8128== Started server on port: 9999, with maxplayers: 12 lanmode is ON. ^C==8128== Conditional jump or move depends on uninitialised value(s) ==8128== at 0x8066B40: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x8070EF6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80710E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AB31E: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AA24B: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x41C9AF2: (below main) (libc-start.c:287) ==8128== ==8128== Conditional jump or move depends on uninitialised value(s) ==8128== at 0x8077476: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x806E9AA: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x8071068: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80710E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AB31E: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x80AA24B: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==8128== by 0x41C9AF2: (below main) (libc-start.c:287) ==8128== ==8128== ==8128== HEAP SUMMARY: ==8128== in use at exit: 3,323 bytes in 104 blocks ==8128== total heap usage: 5,858 allocs, 5,754 frees, 32,079,356 bytes allocated ==8128== ==8128== LEAK SUMMARY: ==8128== definitely lost: 992 bytes in 62 blocks ==8128== indirectly lost: 176 bytes in 32 blocks ==8128== possibly lost: 35 bytes in 1 blocks ==8128== still reachable: 2,120 bytes in 9 blocks ==8128== suppressed: 0 bytes in 0 blocks ==8128== Rerun with --leak-check=full to see details of leaked memory ==8128== ==8128== For counts of detected and suppressed errors, rerun with: -v ==8128== Use --track-origins=yes to see where uninitialised values come from ==8128== ERROR SUMMARY: 31 errors from 3 contexts (suppressed: 0 from 0)
==9099== Memcheck, a memory error detector ==9099== Copyright © 2002-2013, and GNU GPL'd, by Julian Seward et al. ==9099== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==9099== Command: ./samp03svr --leak-check=full ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x80822F6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80835A8: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807EC25: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x806EF28: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807B9E6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AF584: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA0E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== Started server on port: 9999, with maxplayers: 12 lanmode is ON. ==9099== Thread 2: ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x402D3F7: strlen (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x4114584: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19) ==9099== by 0x47F001D: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/plugins/irc.so) ==9099== by 0x47F7D11: boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, Client, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<Client> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned int) (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/plugins/irc.so) ==9099== by 0x480F28B: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/plugins/irc.so) ==9099== by 0x480E161: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/plugins/irc.so) ==9099== by 0x47DFB60: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/plugins/irc.so) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Thread 3: ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x8077736: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80740C2: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808EC9C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8074845: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x80822F6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80835A8: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8080D57: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807367F: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808EC9C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8074845: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x8077736: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80750D0: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x8077736: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80761CB: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Thread 1: ==9099== Mismatched free() / delete / delete [] ==9099== at 0x402B838: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x806D4AE: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AED31: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AEF01: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA139: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== Address 0x15829b68 is 0 bytes inside a block of size 7 alloc'd ==9099== at 0x402ADFC: operator new[](unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x807E2F7: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808106D: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807367F: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808EC9C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8074845: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x8077476: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x806E9AA: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x806EB02: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807BBA7: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8071B42: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807C192: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x806D61E: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807C30E: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AC298: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80C9042: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80D09D3: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80B5514: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== ==9099== Mismatched free() / delete / delete [] ==9099== at 0x402B838: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x806D4AE: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8071DCB: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807BC4F: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AED3C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AEF01: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA139: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== Address 0x11cb6108 is 0 bytes inside a block of size 78 alloc'd ==9099== at 0x402ADFC: operator new[](unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x807E2F7: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808106D: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807367F: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x808EC9C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8074845: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== ==9099== Thread 3: ==9099== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) ==9099== at 0x4057368: sendto (socket.S:98) ==9099== by 0x808ED15: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807D0EE: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8080217: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8074C39: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80763FD: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x404FF71: start_thread (pthread_create.c:312) ==9099== by 0x429E2AD: clone (clone.S:129) ==9099== Address 0x5e9ba27 is 143 bytes inside a block of size 576 alloc'd ==9099== at 0x402A17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==9099== by 0x804C989: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807EC8C: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x806EF28: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x807B9E6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AF584: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA0E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== ==9099== Thread 1: ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x80C9E24: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80CAB17: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80D0E86: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AF006: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA139: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x80AC534: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80C9ED0: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80CAB17: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80D0E86: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AF006: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA139: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== ==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x80AC53B: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80C9ED0: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80CAB17: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80D0E86: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AF006: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA139: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== ^C==9099== Conditional jump or move depends on uninitialised value(s) ==9099== at 0x8066B40: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x8070EF6: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80710E5: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AB31E: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x80AA24B: ??? (in /var/www/html/gpx/_SERVERS/accounts/esv5/185.107.96.218.9999/samp03svr) ==9099== by 0x41C9AF2: (below main) (libc-start.c:287) ==9099== ==9099== ==9099== HEAP SUMMARY: ==9099== in use at exit: 217,364 bytes in 220 blocks ==9099== total heap usage: 3,822,375 allocs, 3,822,155 frees, 482,622,673 bytes allocated ==9099== ==9099== LEAK SUMMARY: ==9099== definitely lost: 2,329 bytes in 68 blocks ==9099== indirectly lost: 35,017 bytes in 52 blocks ==9099== possibly lost: 175,040 bytes in 78 blocks ==9099== still reachable: 4,978 bytes in 22 blocks ==9099== suppressed: 0 bytes in 0 blocks ==9099== Rerun with --leak-check=full to see details of leaked memory ==9099== ==9099== For counts of detected and suppressed errors, rerun with: -v ==9099== Use --track-origins=yes to see where uninitialised values come from ==9099== ERROR SUMMARY: 18872 errors from 14 contexts (suppressed: 0 from 0)
|
I think I would do it as follows:
1) indeed use a blank gamemode for each plugin (which uses the plugin functionality just as your "full" gamemode does) 2) run only that plugin and the gamemode just for the plugin which resembles your gamemode usage with valgrind 3) let a few testers join and perform the same actions (maybe use raksamp bots or something for reproducability) 4) let them leave 5) shutdown the server 6) compare to the base measurement of you 992 bytes / 62 blocks lost, this means sa-mp leaks only 992 bytes by itself. It's not uncommon for applications to do this with a set of "static / one time initialized" variables that are not RAII encapsulated / are not freed on close (because they let the OS do this and thus purposefully leak, I call this a "static leak" - one time purposeful leak, your problem is the opposite of that, a plugin or multiple plugins keep leaking memory all the time on specific actions and don't release them when needed). 7) from your full report you know that some plugins leak memory / don't clean up on exit, time to find out which ones Maybe test each plugin with a different user count / dfferent usage count (e.g. query count + free count). If a plugin really leaks memory then you will see an increase in lost bytes / blocks when using more of the plugin functions. If a plugin does not leak then you should see the same amount of lost bytes / blocks with different usage scenarios. Once you identify the leaking plugin(s) check if you are not purposefully telling the plugin to leak (from your script). If that's done then contact the author(s) of the plugin(s) with your findings and please give them a working leaking sample/script. That will help them identify the issue faster and apply a patch almost instantly compared to "hey your plugin has a memory leak". Also just out of curiosity, if you kick all the players before a gmx, does the ram usage drop significantly? Edit: Ahw denNorske you fucked up my 1337 rep someone please reset my rep to 1337 ![]() |
|
I realised just after giving you a rep that I did - I feel bad about dat ! (I wish I could just take the rep back)
And nope, kicking players doesn't free the memory. Ram always increase, and does never go down according to graphs. It's a slower growth when there are fewer players online. And lets say this could be the MYSQL plugin, how could i test all the code I have in my gamemode? There are quite some functionality related to it, as it's a bit of it everywhere. Also - I went through my commits and found that MySQL and Streamer are the only ones that has been Changed or added functions for. (Either added objects, or added new queries) |