Closed nkPit closed 4 months ago
Unfortunately - with your confing I cannot to build postgres
=185360==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 200 byte(s) in 1 object(s) allocated from:
#0 0x57eb57 in malloc (/usr/local/pgsql/master/bin/postgres+0x57eb57) (BuildId: 28a842ad0bc27bcd1e50f479a8c01a825b2f4ca4)
#1 0x188e36a in save_ps_display_args /home/pavel/src/postgresql.master/src/backend/utils/misc/ps_status.c:190
#2 0x7fffd7952550 ([stack]+0x20550)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 1 allocation(s).
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/pgsql/master/data"
=================================================================
==185245==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 207 byte(s) in 9 object(s) allocated from:
#0 0x4c5727 in malloc (/usr/local/pgsql/master/bin/initdb+0x4c5727) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#1 0x5405b4 in escape_single_quotes_ascii /home/pavel/src/postgresql.master/src/port/quotes.c:38
Direct leak of 76 byte(s) in 1 object(s) allocated from:
#0 0x4c5727 in malloc (/usr/local/pgsql/master/bin/initdb+0x4c5727) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#1 0x7fb1b9b57836 in __GI_getaddrinfo (/lib64/libc.so.6+0x144836) (BuildId: 4a92fcedbba6d6d2629ce066a2970017faa9995e)
#2 0x4898d3 in getaddrinfo.part.0 (/usr/local/pgsql/master/bin/initdb+0x4898d3) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#3 0x5241ad in setup_config /home/pavel/src/postgresql.master/src/bin/initdb/initdb.c:1424
Direct leak of 67 byte(s) in 5 object(s) allocated from:
#0 0x4c5727 in malloc (/usr/local/pgsql/master/bin/initdb+0x4c5727) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#1 0x53befc in pg_malloc_internal /home/pavel/src/postgresql.master/src/common/fe_memutils.c:30
Direct leak of 10 byte(s) in 2 object(s) allocated from:
#0 0x4bf8b0 in strdup (/usr/local/pgsql/master/bin/initdb+0x4bf8b0) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#1 0x53c0ea in pg_strdup /home/pavel/src/postgresql.master/src/common/fe_memutils.c:95
Indirect leak of 152 byte(s) in 2 object(s) allocated from:
#0 0x4c5727 in malloc (/usr/local/pgsql/master/bin/initdb+0x4c5727) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#1 0x7fb1b9b57836 in __GI_getaddrinfo (/lib64/libc.so.6+0x144836) (BuildId: 4a92fcedbba6d6d2629ce066a2970017faa9995e)
#2 0x4898d3 in getaddrinfo.part.0 (/usr/local/pgsql/master/bin/initdb+0x4898d3) (BuildId: 387e1c554812b157f30b4ab0387265565d04a079)
#3 0x5241ad in setup_config /home/pavel/src/postgresql.master/src/bin/initdb/initdb.c:1424
but it crashes just with enabled assertions - ASAN is not necessary
looks so perform plpgsql_check_pragma('sequence: xx');
corrupts in some cases plpgsql memory
minimal test case
select f1();
select * from plpgsql_check_function('test_function');
set plpgsql_check.mode = 'every_start';
select f1();
Unfortunately - with your confing I cannot to build postgres
This problem remains when building postgres with a CPPFLAGS="-Og"
CPPFLAGS="-Og" ./configure --enable-tap-tests --enable-debug --enable-cassert >/dev/null && make -j4 -s && make -j4 -s -C contrib && make check
I can reproduce this problem, but it looks (without deeper investigation) like hitting PostgreSQL bug. I'll fix it, but it needs more time than I have now.
https://www.postgresql.org/message-id/1694260.1718234686%40sss.pgh.pa.us
Yes. This is my bug report. What should I do with this issue, close it?
čt 13. 6. 2024 v 7:58 odesílatel nkPit @.***> napsal:
https://www.postgresql.org/message-id/1694260.1718234686%40sss.pgh.pa.us
Yes. This is my bug report. What should I do with this issue, close it?
I can close it, when it will be fixed in Postgres, and I will be able recheck it.
— Reply to this email directly, view it on GitHub https://github.com/okbob/plpgsql_check/issues/174#issuecomment-2164496003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO47HOUVCDXM2SXAEHC3ZHEYI3AVCNFSM6AAAAABI43L3DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGQ4TMMBQGM . You are receiving this because you commented.Message ID: @.***>
It still crashes after 6dfac24401b7143ad5c75f991c18105e1267f88e - it is related to using SPI - but this needs more investigation
should be fixed in 2.7.7
Hello!
After building postgres with ASAN in the following way:
And executing the following query:
the server crashes.
coredump:
postmaster.log
Postgres version:
plpgsql_check version:
commit: a7585cc39b91f294b4720edfcb9fb0e8d921e002
Best regards, Nikita Kalinin Postgres Professional: http://postgrespro.com/