develooper Front page | perl.dbi.users | Postings from January 2018

RE: Hunting down (possible) memory leak in DBD::Oracle

Thread Next
From:
Fennell, Brian
Date:
January 15, 2018 22:18
Subject:
RE: Hunting down (possible) memory leak in DBD::Oracle
Message ID:
CY4PR14MB171960FB29584A18049F33C5A2EB0@CY4PR14MB1719.namprd14.prod.outlook.com
I got this case running with valgrind - 
Valgrind reported -
8 invalid writes, 8 invalid writes, 2239 accesses to uninitialized values.
All invalid writes have a stack trace leading back to XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662) and ora_st_fetch (oci8.c:4032)

Details follow:

export DATE_MANIP=DM5;
export ORACLE_HOME=/db/app/oracle/product/12.1.0/client_1 ;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib ;
export PATH="$ORACLE_HOME/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin";
export NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P1";
export NLS_NCHAR="AL16UTF16" ;
export NLS_NCHAR_CHARACTERSET="AL16UTF16" ;
export LANGUAGE=en_US:en:C;
export LANG=C;
export LC_ALL=C;
export LC_CTYPE=C;
/bin/rm -rf    /feeds/data/search4_1/ProductAttributes-dbi-trace.txt    \
               /feeds/data/search4_1/getTableData-debug-log.txt         \
               /feeds/data/search4_1/valgrind-log.txt ;
/usr/local/bin/valgrind \
    --tool=memcheck \
    --leak-check=yes \
    --track-origins=yes \
    --leak-check=full \
    --show-leak-kinds=all \
    --num-callers=100 \
    --error-limit=no \
    --log-file=/feeds/data/search4_1/valgrind-log.txt \
        /usr/local/bin/perl \
                  [ . . . ]


$ wc -l /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
696325 /copy/sandbox/feeds/data/search4_1/valgrind-log.txt

$ du -h /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
53M     /copy/sandbox/feeds/data/search4_1/valgrind-log.txt

$ egrep -c -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
8

$ egrep -c -i 'invalid read' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
8

$ egrep  -c -i 'uninitialised value' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt
2239

$ egrep -n -A20  -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt | egrep '(oci8\.c|Oracle\.xsi)'
51575-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51576-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51596-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51597-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51614-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51615-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51670-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51671-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51710-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51711-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51731-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51732-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51771-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51772-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
51830-==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
51831-==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)

$ egrep -B1 -A20 -i 'invalid write' /copy/sandbox/feeds/data/search4_1/valgrind-log.txt | head -22
==19402==
==19402== Invalid write of size 4
==19402==    at 0xBD747E6: __intel_ssse3_rep_memcpy (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xBD6CE95: _intel_fast_memcpy.P (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF70D36: kpccclr (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF705D7: kpccs2c (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF6ED9E: ttccfpg (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF6C799: ttcfour (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF3B0AE: kpufcpf (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF392F5: kpufch0 (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xCF37C34: kpufch (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xB14F1CA: OCIStmtFetch2 (in /db/app/oracle/product/12.1.0/client_1/lib/libclntsh.so.12.1)
==19402==    by 0xAA0F269: ora_st_fetch (oci8.c:4032)
==19402==    by 0xA9EE595: XS_DBD__Oracle__st_fetchrow_array (Oracle.xsi:662)
==19402==    by 0x6D33069: XS_DBI_dispatch (DBI.xs:3797)
==19402==    by 0x4EF240E: Perl_pp_entersub (in /usr/lib64/perl5/CORE/libperl.so)
==19402==    by 0x4EEAB85: Perl_runops_standard (in /usr/lib64/perl5/CORE/libperl.so)
==19402==    by 0x4E87984: perl_run (in /usr/lib64/perl5/CORE/libperl.so)
==19402==    by 0x400D98: ??? (in /usr/bin/perl)
==19402==    by 0x6174C04: (below main) (in /usr/lib64/libc-2.17.so)
==19402==  Address 0x14ec4275f is 4,095,739,679 bytes inside a block of size 4,095,741,856 in arena "client"
==19402==

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About