Re: memory leak in libpq , definitely lost: 200 bytes in 1 blocks, indirectly lost: 2,048 bytes in 1 blocks ... - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: memory leak in libpq , definitely lost: 200 bytes in 1 blocks, indirectly lost: 2,048 bytes in 1 blocks ...
Date
Msg-id b0a69fbe-f784-b429-2cac-adf692cf0c56@iki.fi
Whole thread Raw
In response to memory leak in libpq , definitely lost: 200 bytes in 1 blocks, indirectly lost: 2,048 bytes in 1 blocks ...  (Simplex <hypercube.mail@gmail.com>)
Responses Re: memory leak in libpq , definitely lost: 200 bytes in 1 blocks, indirectly lost: 2,048 bytes in 1 blocks ...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 10/10/2016 12:38 PM, Simplex wrote:
>  STEP_1_ON-THE-APP-SERVER - compile the application
>
>   gcc -o db_test.o -c -I/usr/include/postgresql db_test.c
>   gcc -o db_test db_test.o -lpq
>
> {
>   STEP_2_ON-THE-DB-SERVER - stop PostgreSQL
>
>   sudo service postgresql stop
>
>   STEP_3_ON-THE-APP-SERVER - run the application
>
>   valgrind --leak-check=full --show-reachable=yes --leak-resolution=high -v
> ./db_test > ./log.log 2>&1
>
>   STEP_4_ON-THE-DB-SERVER - wait [N] seconds (N is a random chosen number
> between 10-3000) and start PostgreSQL
>
> } Repeat several times to get the leak

I was not able to reproduce this. Can you help to analyze this in more
detail, please? Which version of PostgreSQL are you using? Can you load
debug symbols or compile from source, to get a stack trace with symbol
names? How often do you see the error? Do you have a theory of how the
leak occurs?

- Heikki

pgsql-bugs by date:

Previous
From: Tillmann Schulz
Date:
Subject: Query available indexes via jdbc meta data does not work any more in PostgreSQL 9.6.0
Next
From: Tom Lane
Date:
Subject: Re: memory leak in libpq , definitely lost: 200 bytes in 1 blocks, indirectly lost: 2,048 bytes in 1 blocks ...