Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 130430
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: splien.ma [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.10.0



Subject: DBD-Pg 3.9.1 memory leak
Date: Mon, 2 Sep 2019 09:21:26 +0300
To: bug-DBD-Pg [...] rt.cpan.org
From: Michael <splien.ma [...] gmail.com>
Hello. There is a memory leak in the module when executing database queries. My research has shown that a leak occurs when memory is released when the finish function is called. Additional info a /home/asper/work/perl.dhcp # cpanm --info DBD::Pg TURNSTEP/DBD-Pg-3.9.1.tar.gz a /home/asper/work/perl.dhcp # uname -a Linux a 5.1.5-gentoo #1 SMP PREEMPT Mon Jun 3 08:24:06 MSK 2019 x86_64 Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz GenuineIntel GNU/Linux DATABASE SCHEME CREATE TABLE subnets (     ifname              TEXT NOT NULL,    -- Interface name     subnet              TEXT NOT NULL,    -- Only a CIDR mask.     lease_time          INTEGER NOT NULL, -- The number of seconds a lease is good for.     gateway             TEXT,             -- The IPv4 gateway to supply to clients;     subnet_mask         TEXT,             -- The IPv4 subnet mask to supply to clients;     broadcast_address   TEXT,             -- The IPv4 broadcast address to supply to clients; maybe null.     ntp_servers         TEXT,             -- A comma-separated list of IPv4 addresses pointing to NTP servers; limit 3; may be null.     domain_name_servers TEXT,             -- A comma-separated list of IPv4 addresses pointing to DNS servers; limit 3; may be null.     domain_name         TEXT,             -- The name of the search domain to be provided to clients.     PRIMARY KEY (subnet)     ); a /home/asper/work/perl.dhcp # pg_config10 BINDIR = /usr/lib64/postgresql-10/bin DOCDIR = /usr/share/doc/postgresql-10.9 HTMLDIR = /usr/share/doc/postgresql-10.9/html INCLUDEDIR = /usr/include/postgresql-10 PKGINCLUDEDIR = /usr/include/postgresql-10 INCLUDEDIR-SERVER = /usr/include/postgresql-10/server LIBDIR = /usr/lib64/postgresql-10/lib64 PKGLIBDIR = /usr/lib64/postgresql-10/lib64 LOCALEDIR = /usr/lib64/postgresql-10/share/locale MANDIR = /usr/share/postgresql-10/man SHAREDIR = /usr/share/postgresql-10 SYSCONFDIR = /etc/postgresql-10 PGXS = /usr/lib64/postgresql-10/lib64/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--htmldir=/usr/share/doc/postgresql-10.9/html' '--libdir=/usr/lib64/postgresql-10/lib64' '--prefix=/usr/lib64/postgresql-10' '--datadir=/usr/share/postgresql-10' '--docdir=/usr/share/doc/postgresql-10.9' '--includedir=/usr/include/postgresql-10' '--mandir=/usr/share/postgresql-10/man' '--sysconfdir=/etc/postgresql-10' '--with-system-tzdata=/usr/share/zoneinfo' '--enable-spinlocks' '--disable-debug' '--enable-thread-safety' '--with-icu' '--without-gssapi' '--without-ldap' '--with-pam' '--with-perl' '--with-python' '--with-readline' '--with-openssl' '--without-systemd' '--without-tcl' '--with-libxml' '--with-libxslt' '--with-zlib' '--enable-nls='''ru' 'en' ''''' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'target_alias=en' 'CFLAGS=-march=x86-64 -O2 -pipe -mtune=generic' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'PKG_CONFIG_PATH=/var/tmp/portage/dev-db/postgresql-10.9/temp/python3.5/pkgconfig' 'LDFLAGS_EX=-Wl,-O1 -Wl,--as-needed' 'LDFLAGS_SL=-Wl,-O1 -Wl,--as-needed' CC = x86_64-pc-linux-gnu-gcc CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -march=x86-64 -O2 -pipe -mtune=generic CFLAGS_SL = -fPIC LDFLAGS = -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-10/lib64',--enable-new-dtags LDFLAGS_EX = -Wl,-O1 -Wl,--as-needed LDFLAGS_SL = -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed LIBS = -lpgcommon -lpgport -lpthread -lxslt -lxml2 -lpam -lssl -lcrypto -lz -lreadline -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 10.9 a /home/asper/work/perl.dhcp # perl -V Summary of my perl5 (revision 5 version 26 subversion 3) configuration:   Platform:     osname=linux     osvers=5.1.5-gentoo     archname=x86_64-linux     uname='linux a 5.1.5-gentoo #1 smp preempt mon jun 3 08:24:06 msk 2019 x86_64 intel(r) core(tm) i5-3450 cpu @ 3.10ghz genuineintel gnulinux '     config_args='-de -Dprefix=/usr/local/perlbrew/perls/perl-5.26.3 -Aeval:scriptdir=/usr/local/perlbrew/perls/perl-5.26.3/bin'     hint=recommended     useposix=true     d_sigaction=define     useithreads=undef     usemultiplicity=undef     use64bitint=define     use64bitall=define     uselongdouble=undef     usemymalloc=n     default_inc_excludes_dot=define     bincompat5005=undef   Compiler:     cc='cc'     ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'     optimize='-O2'     cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'     ccversion=''     gccversion='8.2.0'     gccosandvers=''     intsize=4     longsize=8     ptrsize=8     doublesize=8     byteorder=12345678     doublekind=3     d_longlong=define     longlongsize=8     d_longdbl=define     longdblsize=16     longdblkind=3     ivtype='long'     ivsize=8     nvtype='double'     nvsize=8     Off_t='off_t'     lseeksize=8     alignbytes=8     prototype=define   Linker and Libraries:     ld='cc'     ldflags =' -fstack-protector-strong -L/usr/local/lib'     libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64     libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat     perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc     libc=libc-2.29.so     so=so     useshrplib=false     libperl=libperl.a     gnulibc_version='2.29'   Dynamic Linking:     dlsrc=dl_dlopen.xs     dlext=so     d_dlsymun=undef     ccdlflags='-Wl,-E'     cccdlflags='-fPIC'     lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl):   Compile-time options:     HAS_TIMES     PERLIO_LAYERS     PERL_COPY_ON_WRITE     PERL_DONT_CREATE_GVSV     PERL_MALLOC_WRAP     PERL_OP_PARENT     PERL_PRESERVE_IVUV     USE_64_BIT_ALL     USE_64_BIT_INT     USE_LARGE_FILES     USE_LOCALE     USE_LOCALE_COLLATE     USE_LOCALE_CTYPE     USE_LOCALE_NUMERIC     USE_LOCALE_TIME     USE_PERLIO     USE_PERL_ATOF   Locally applied patches:     Devel::PatchPerl 1.52   Built under linux   Compiled at Jun 14 2019 14:09:49   %ENV:     PERL5LIB="/root/perl5-5.26.3/lib/perl5:"     PERLBREW_HOME="/root/.perlbrew" PERLBREW_MANPATH="/usr/local/perlbrew/perls/perl-5.26.3/man" PERLBREW_PATH="/usr/local/perlbrew/bin:/usr/local/perlbrew/perls/perl-5.26.3/bin"     PERLBREW_PERL="perl-5.26.3"     PERLBREW_ROOT="/usr/local/perlbrew"     PERLBREW_SHELLRC_VERSION="0.86"     PERLBREW_VERSION="0.86"     PERL_CPANM_OPT=" --local-lib=/root/perl5-5.26.3"   @INC:     /root/perl5-5.26.3/lib/perl5/x86_64-linux     /root/perl5-5.26.3/lib/perl5 /usr/local/perlbrew/perls/perl-5.26.3/lib/site_perl/5.26.3/x86_64-linux     /usr/local/perlbrew/perls/perl-5.26.3/lib/site_perl/5.26.3 /usr/local/perlbrew/perls/perl-5.26.3/lib/5.26.3/x86_64-linux     /usr/local/perlbrew/perls/perl-5.26.3/lib/5.26.3 -- Regards, Michael A. Manerko Megalink Company, Engineer 318, Chehova street, Taganrog, Russia, 347932 tel work: +7 8634 431431 (ext 159) tel mobile: +7 999 6939428 sip:159@tagan.ru www.tagan.ru

Message body is not shown because sender requested not to inline it.

Thank you for the report, we will look into this.
Should be fixed in d98454985d547638409a4580e2d5a4839a3fad72. Please confirm that the change in dbdimp.c removes the leak for you.
Subject: Re: [rt.cpan.org #130430] DBD-Pg 3.9.1 memory leak
Date: Tue, 3 Sep 2019 09:24:44 +0300
To: bug-DBD-Pg [...] rt.cpan.org
From: Michael <splien.ma [...] gmail.com>
Confirm memory leak after commit d98454985d547638409a4580e2d5a4839a3fad72 resolved. 02.09.2019 20:10, Greg Sabino Mullane via RT пишет: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130430 > > > Should be fixed in d98454985d547638409a4580e2d5a4839a3fad72. Please confirm that the change in dbdimp.c removes the leak for you. > >
Thanks, will be releasing 3.10.0 soon with this fix.