Thread: contrib/bloom Valgrind error
My Valgrind test script reports the following error, triggered from within contrib/bloom's regression test suite on master as of right now: """""" 2019-09-27 20:53:50.910 PDT 9740 DEBUG: building index "bloomidx" on table "tst" serially 2019-09-27 20:53:51.049 PDT 9740 DEBUG: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 20721/1/2 2019-09-27 20:53:51.052 PDT 9740 DEBUG: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0 2019-09-27 20:53:51.054 PDT 9740 LOG: statement: ALTER INDEX bloomidx SET (length=80); ==9740== VALGRINDERROR-BEGIN ==9740== Conditional jump or move depends on uninitialised value(s) ==9740== at 0x26D400: RangeVarGetRelidExtended (namespace.c:349) ==9740== by 0x33D084: AlterTableLookupRelation (tablecmds.c:3445) ==9740== by 0x4D0BC1: ProcessUtilitySlow (utility.c:1111) ==9740== by 0x4D0802: standard_ProcessUtility (utility.c:927) ==9740== by 0x4D083B: ProcessUtility (utility.c:360) ==9740== by 0x4CD0A4: PortalRunUtility (pquery.c:1175) ==9740== by 0x4CDBC0: PortalRunMulti (pquery.c:1321) ==9740== by 0x4CE7F9: PortalRun (pquery.c:796) ==9740== by 0x4CA3D9: exec_simple_query (postgres.c:1231) ==9740== by 0x4CB3BD: PostgresMain (postgres.c:4256) ==9740== by 0x4547DE: BackendRun (postmaster.c:4459) ==9740== by 0x4547DE: BackendStartup (postmaster.c:4150) ==9740== by 0x4547DE: ServerLoop (postmaster.c:1718) ==9740== by 0x455E2C: PostmasterMain (postmaster.c:1391) ==9740== by 0x3B94AC: main (main.c:210) ==9740== Uninitialised value was created by a stack allocation ==9740== at 0x402F202: _PG_init (blutils.c:54) ==9740== ==9740== VALGRINDERROR-END { <insert_a_suppression_name_here> Memcheck:Cond fun:RangeVarGetRelidExtended fun:AlterTableLookupRelation fun:ProcessUtilitySlow fun:standard_ProcessUtility fun:ProcessUtility fun:PortalRunUtility fun:PortalRunMulti fun:PortalRun fun:exec_simple_query fun:PostgresMain fun:BackendRun fun:BackendStartup fun:ServerLoop fun:PostmasterMain fun:main } """""" I suspect that the recent commit 69f94108 is involved here, but I haven't confirmed that explanation myself. -- Peter Geoghegan
On Fri, Sep 27, 2019 at 09:02:34PM -0700, Peter Geoghegan wrote: > My Valgrind test script reports the following error, triggered from > within contrib/bloom's regression test suite on master as of right > now: > > I suspect that the recent commit 69f94108 is involved here, but I > haven't confirmed that explanation myself. It looks that the complain is about the set of custom reloptions initialized by bloom in _PG_init(), and that lockmode is actually not set after fetching it via AlterTableGetLockLevel(), which is exactly what 736b84e was addressing. By repeating the beginning of the regression tests of bloom, I am unfortunately not able to reproduce the problem. Here is what I used to start the server with valgrind: valgrind --suppressions=$PG_SOURCE/src/tools/valgrind.supp --trace-children=yes --track-origins=yes --leak-check=full --read-var-info=yes postgres -D $PGDATA What kind of commands and or compilation options do you use? -- Michael