Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.5.1
-
None
-
Debian 7 amd64, Ubuntu 14.04 amd64
Qt 5.5.1 from online installer
PostgreSQL 9.4.5 from apt.postgresql.org
-
e8eaf82e584c2d27bdeb0a50055e10d55d9c00dc
Description
After migrating from 5.2.1 to 5.5.1 we noticed >1GB leak per 12h at server software making about 10-20 connections to PostgreSQL database per second. After some investigation I've found leak here:
http://code.qt.io/cgit/qt/qtbase.git/tree/src/sql/drivers/psql/qsql_psql.cpp?h=5.5#n760
result variable is overwritten without releasing it's previous resource.
There is another question - why this block is entered in the first place if I'm using PostgreSQL and libpq5 from pgdg repository with version 9.4.5:
apt-cache policy libpq5 libpq5: Installed: 9.4.5-1.pgdg14.04+1 Candidate: 9.4.5-1.pgdg14.04+1 Version table: *** 9.4.5-1.pgdg14.04+1 0 500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages 100 /var/lib/dpkg/status 9.3.10-0ubuntu0.14.04 0 500 http://lt.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 9.3.4-1 0 500 http://lt.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
Maybe it's something to do with ifdefs above on Qt build server environment? If I build libsqlpsql.so in Debian 7 machine using packages from apt.postgresql.org, there is no leak.
Attachments
For Gerrit Dashboard: QTBUG-49789 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
143101,3 | PostgreSQL: Fix memory leak in QPSQLDriverPrivate::getPSQLVersion() | 5.5 | qt/qtbase | Status: MERGED | +2 | 0 |