Re: Change GUC hashtable to use simplehash?

From: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>
To: John Naylor <johncnaylorls(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Ants Aasma <ants(dot)aasma(at)cybertec(dot)at>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change GUC hashtable to use simplehash?
Date: 2024-12-19 00:10:30
Message-ID: a3a959f6-14b8-4819-ac04-eaf2aa2e868d@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Found that https://github.com/postgres/postgres/commit/0aba2554409ee3251d7558567edd114d8ed36dcc
produces a valgrind error in initdb.
Such a steps:
CPPFLAGS="-DUSE_VALGRIND -Og" ./configure --enable-debug --enable-tap-tests --enable-cassert --with-icu
make ...
valgrind --quiet --exit-on-first-error=yes --error-exitcode=1 --leak-check=no --time-stamp=yes \
--gen-suppressions=all --trace-children=yes <path-to>/initdb -k -D <path-to>/data

give an error:

running bootstrap script ... ok
performing post-bootstrap initialization ... ==00:00:00:01.856 967784== Conditional jump or move depends on uninitialised value(s)
==00:00:00:01.856 967784== at 0x2F41F4: fasthash_accum (hashfn_unstable.h:136)
==00:00:00:01.856 967784== by 0x2F41F4: fasthash_accum_cstring_aligned (hashfn_unstable.h:247)
==00:00:00:01.856 967784== by 0x2F41F4: fasthash_accum_cstring (hashfn_unstable.h:271)
==00:00:00:01.856 967784== by 0x2F41F4: spcachekey_hash (namespace.c:268)
==00:00:00:01.856 967784== by 0x2F479F: nsphash_lookup (simplehash.h:836)
==00:00:00:01.856 967784== by 0x2F479F: spcache_insert (namespace.c:379)
==00:00:00:01.856 967784== by 0x2F533C: cachedNamespacePath (namespace.c:4236)
==00:00:00:01.856 967784== by 0x2F5425: recomputeNamespacePath (namespace.c:4294)
==00:00:00:01.856 967784== by 0x2F5516: RelnameGetRelid (namespace.c:875)
==00:00:00:01.856 967784== by 0x2F6CD5: RangeVarGetRelidExtended (namespace.c:524)
==00:00:00:01.856 967784== by 0x2DD1C7: objectNamesToOids (aclchk.c:701)
==00:00:00:01.856 967784== by 0x2E2A9D: ExecuteGrantStmt (aclchk.c:441)
==00:00:00:01.856 967784== by 0x61FF62: ProcessUtilitySlow (utility.c:1816)
==00:00:00:01.856 967784== by 0x61E948: standard_ProcessUtility (utility.c:973)
==00:00:00:01.856 967784== by 0x61EC1A: ProcessUtility (utility.c:530)
==00:00:00:01.856 967784== by 0x61C059: PortalRunUtility (pquery.c:1158)
==00:00:00:01.856 967784==
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:fasthash_accum
fun:fasthash_accum_cstring_aligned
fun:fasthash_accum_cstring
fun:spcachekey_hash
fun:nsphash_lookup
fun:spcache_insert
fun:cachedNamespacePath
fun:recomputeNamespacePath
fun:RelnameGetRelid
fun:RangeVarGetRelidExtended
fun:objectNamesToOids
fun:ExecuteGrantStmt
fun:ProcessUtilitySlow
fun:standard_ProcessUtility
fun:ProcessUtility
fun:PortalRunUtility
}
==00:00:00:01.856 967784==
==00:00:00:01.856 967784== Exit program on first error (--exit-on-first-error=yes)
child process exited with exit code 1

The current master at b7493e1 also has this error.

With the best regards,

--
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-12-19 00:11:39 Re: Pg18 Recursive Crash
Previous Message Sterrett, Matthew 2024-12-19 00:00:37 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.