I ran a trial version of a memory leak detector called Deleaker on windows
and found some modules that are listed as having leaks. I  ran the program
on Linux under valgrind and I do not see any leaks reported there. I have
attached the reported leaks on windows as windows_leaks.txt and valgrind
summary report as valgrind.txt.

I am working on generating a trimmed down version of the sample program to
share with you.  Let me know if you have any questions.

Thanks,
Rajesh

On Fri, Aug 2, 2024 at 10:19 PM Rajesh Kokkonda <rajeshk.kokko...@gmail.com>
wrote:

> We did run our application under valgrind on Linux. We did not see any
> leaks. There is no platform dependent code in our application. We are
> seeing gradual memory growth only on windows.
>
> That is what lead me to believe the leak may be present in postgresql. I
> will run under available memory tools on windows and get back to you.
>
> I will also try to create a sample and see if I can reproduce the problem.
>
> Thanks,
> Rajesh
>
> On Fri, 2 Aug 2024, 21:45 Ranier Vilela, <ranier...@gmail.com> wrote:
>
>> Em sex., 2 de ago. de 2024 às 11:54, Rajesh Kokkonda <
>> rajeshk.kokko...@gmail.com> escreveu:
>>
>>> Okay. I will try to create one sample program and send it to you
>>> sometime next week. In the meantime, I am listing down all the methods we
>>> are consuming from libpq.
>>>
>>> PQconnectdbParams
>>> PQstatus
>>> PQerrorMessage
>>> PQpingParams
>>> PQfinish
>>> PQresultStatus
>>> PQclear
>>> PQsetSingleRowMode
>>> PQntuples
>>> PQnfields
>>> PQftype
>>> PQgetvalue
>>> PQgetlength
>>> PQgetisnull
>>> PQgetCancel
>>> PQfreeCancel
>>> PQcancel
>>> PQsetErrorVerbosity
>>> PQsendPrepare
>>> PQsendQueryPrepared
>>> PQgetResult
>>> PQconsumeInput
>>> PQisBusy
>>> PQsetnonblocking
>>> PQflush
>>> PQsocket
>>> PQtransactionStatus
>>> PQresultErrorField
>>>
>>> It is highly likely that the memory consumption is caused by your
>> application.
>> Perhaps due to the lack of freeing up the resources used by the library.
>> You can try using this tool, to find out the root cause.
>>
>> https://drmemory.org/
>>
>> best regards,
>> Ranier Vilela
>>
>
==1659429== LEAK SUMMARY:
==1659429==    definitely lost: 0 bytes in 0 blocks
==1659429==    indirectly lost: 0 bytes in 0 blocks
==1659429==      possibly lost: 0 bytes in 0 blocks
==1659429==    still reachable: 36,482 bytes in 121 blocks
==1659429==                       of which reachable via heuristic:
==1659429==                         stdstring          : 537 bytes in 1 blocks
==1659429==         suppressed: 0 bytes in 0 blocks
==1659429==
==1659429== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
<Allocation Value="0x000001dae2184cf0" Type="Heap memory" HitCount="1" 
Size="40" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\localealias.c"
 Line="239" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184410" Type="Heap memory" HitCount="1" 
Size="49" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\relocatable.c"
 Line="340" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184a60" Type="Heap memory" HitCount="1" 
Size="33" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\bindtextdom.c"
 Line="202" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2182080" Type="Heap memory" HitCount="1" 
Size="14" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\bindtextdom.c"
 Line="225" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184db0" Type="Heap memory" HitCount="1" 
Size="44" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\l10nflist.c"
 Line="190" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184e80" Type="Heap memory" HitCount="1" 
Size="41" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\l10nflist.c"
 Line="190" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184ee0" Type="Heap memory" HitCount="1" 
Size="48" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\l10nflist.c"
 Line="270" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184d50" Type="Heap memory" HitCount="1" 
Size="40" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\localealias.c"
 Line="239" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184e10" Type="Heap memory" HitCount="1" 
Size="56" 
FileName="d:\zilan\tarballs\gettext-0.19.8\gettext-tools\intl\..\..\gettext-runtime\intl\l10nflist.c"
 Line="270" ModulePath="C:\Program Files\PostgreSQL\16\bin\libintl-9.dll" 
ModuleName="libintl-9.dll">
<Allocation Value="0x000001dae2184f40" Type="Heap memory" HitCount="1" 
Size="24" FileName="" Line="" ModulePath="C:\Program 
Files\PostgreSQL\16\bin\libwinpthread-1.dll" ModuleName="libwinpthread-1.dll">
<StackTrace>
<Allocation Value="0x000001dae2181ee0" Type="Heap memory" HitCount="1" 
Size="50" FileName="D:\tmp\libiconv-1.17\lib\.\relocatable.c" Line="340" 
ModulePath="C:\Program Files\PostgreSQL\16\bin\libiconv-2.dll" 
ModuleName="libiconv-2.dll">

Reply via email to