Search Postgresql Archives

leak in libpq, getpwuid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey folks,

I am getting leaks on my machine, valgrind points to getpwuid_r called
by libpq's PQConnectDb()

==11784== 32,772 bytes in 1 blocks are indirectly lost in loss record 31 of 31
==11784==    at 0x4004BA2: calloc (vg_replace_malloc.c:397)
==11784==    by 0x63D9FCB: ???
==11784==    by 0x63C10FD: ???
==11784==    by 0x63AF5BE: ???
==11784==    by 0x63AFB4D: ???
==11784==    by 0x63A0C0E: ???
==11784==    by 0x63A3520: ???
==11784==    by 0x63A42BD: ???
==11784==    by 0x63A4A86: ???
==11784==    by 0x63A513F: ???
==11784==    by 0x4949C1: getpwuid_r@@GLIBC_2.1.2 (in /lib/libc-2.8.so)
==11784==    by 0x297F2D: (within /usr/lib/libpq.so.5.1)
==11784==    by 0x283050: (within /usr/lib/libpq.so.5.1)
==11784==    by 0x287118: (within /usr/lib/libpq.so.5.1)
==11784==    by 0x287269: (within /usr/lib/libpq.so.5.1)
==11784==    by 0x2875AE: PQconnectStart (in /usr/lib/libpq.so.5.1)
==11784==    by 0x287601: PQconnectdb (in /usr/lib/libpq.so.5.1)


The application fires up few threads once in a while, and they connect
to db on different hosts.
What matters, is that after few days it started to fail in
pthread_create(), because of memory problems.

And looks like this is causing the problem. Please note that it
happends on both 8.3 and 8.4, in the same way (above backtrace is from
8.4).
Any ideas ?
I call PGconnectdb, and than PQfinish, on that test - it can't connect
because db is down.
Now, I am very sure that PQfinish is called.
Since no connection exists during that test, nothing else is called in libpq.

Any ideas ?

-- 
GJ

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux