Memory leak in 32 bit but not in 64 bit (linux ubuntu)



  • Hi

    I have made this daemon, listning to the com port and storing data in a mysql database.

    It was developed on my 64 bit ubuntu, copied to and compiled, unmodified, on a 32 bit ubuntu.

    On the 64 bit machine I have had the daemon running for more than 48 hours without any memory leak (according to pmap -d).

    On the 32 bit machine I have detectable memory leak after less than an hour, and it keeps leaking.

    Output from pmap -d just after startup :

    @Address Kbytes Mode Offset Device Mapping
    08048000 124 r-x-- 0000000000000000 0fc:00000 vejrstationd
    08067000 4 r---- 000000000001e000 0fc:00000 vejrstationd
    08068000 4 rw--- 000000000001f000 0fc:00000 vejrstationd
    097f8000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4400000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4421000 892 ----- 0000000000000000 000:00000 [ anon ]
    b4517000 4 ----- 0000000000000000 000:00000 [ anon ]
    <truncated>
    bfdf6000 132 rw--- 0000000000000000 000:00000 [ stack ]
    mapped: 52888K writeable/private: 9376K shared: 0K@

    Output from pmap -d after about 5 hours :

    @Address Kbytes Mode Offset Device Mapping
    08048000 124 r-x-- 0000000000000000 0fc:00000 vejrstationd
    08067000 4 r---- 000000000001e000 0fc:00000 vejrstationd
    08068000 4 rw--- 000000000001f000 0fc:00000 vejrstationd
    097f8000 1960 rw--- 0000000000000000 000:00000 [ anon ]
    b4400000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4421000 892 ----- 0000000000000000 000:00000 [ anon ]
    b4517000 4 ----- 0000000000000000 000:00000 [ anon ]
    <truncated>
    bfdf6000 132 rw--- 0000000000000000 000:00000 [ stack ]
    mapped: 54716K writeable/private: 11204K shared: 0K@

    Please observer the block at 097f8000, this one just keeps growing !

    Any idea why I have this difference between a 32bit and a 64bit machine, and how I find the cause of the leak ?

    To the best of my knowledge Qt, Mysql and Ubuntu is the same, except for the number of bits !

    Kim


  • Lifetime Qt Champion

    Hi,

    This sounds rather strange indeed. You should bring this question to the interest mailing list, there you'll find Qt's developers/maintainers (this forum is more user oriented)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.