Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sK1TV-007vSn-E9 for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2024 20:00:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sK1TS-0061rn-Mq for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2024 20:00:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sK1TS-0061nf-BI for pgsql-hackers@lists.postgresql.org; Wed, 19 Jun 2024 20:00:07 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sK1TQ-002Wa8-Ut for pgsql-hackers@lists.postgresql.org; Wed, 19 Jun 2024 20:00:06 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ec1e5505abso10127081fa.1 for ; Wed, 19 Jun 2024 13:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718827202; x=1719432002; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Yn8kih6G3ub8ysjaDxdnP79asjjDVvifF3SXJ4iAWe0=; b=PFPzzIEHESAHl+e9F0K9vNgdcC9JpHBsg8/z83l8NCaOFaYY7QoSELUi1SvqzqmdFe 6AECljW3Lzet+uUXpQVoQwRaIaQXyYzrSRuV9MlfNOOfhKAwc93TRwvy87TJ+FhCxDgS z1YI6lwux3zVsPPpc91OeTqPTE9/qV5K6ZZ0yT2ZrtaObi9M5XKbDxw+Q9dnVKOWiuNC kwHdVmOnsbOa7cOJ1VyvY4GB/wy6w5mFC8K7rBXO5N8DUHKEktcG4tKAxw17j/Mp4g0z 00INEay792nIlqxQuP/GEnZRR6RZgPqXfE1egeCoMRGeTKu8Km6suBZXQfeKbTEZDsJT u6Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718827202; x=1719432002; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Yn8kih6G3ub8ysjaDxdnP79asjjDVvifF3SXJ4iAWe0=; b=eZ5z+pMQaqF5rIXnIjhRNNwdHJ1fcAy9b8cCY5k5hzS684qHtECcAkpTMLLr9kn9uj BE5PxijKYVfdpDKWDpeEYA7IgejxeTAIcg6AxRnnn9xLV92xIhH8hyH5EX9Kj7YOIpRs FQpD2qFaKx9CPNAIO2wLhmPEik7BAP7svZJA5UDdKCshs3MKG7wM791fmiKickBkq8/l cqusR6Enrm93GA2jE/3Gr4YQQ+JtvbEMQe/Wr7x2bVaNX6+r9g+aTyzpHZHig37G+VDk TUoi0ijNKJuL/Ur4lUAHyJ6hUXzq2XoakXTt0HYMjtKogr7UVlDliAcGIW7ptGq0jQRL LMiQ== X-Forwarded-Encrypted: i=1; AJvYcCWf3Wgu00Gw9s6ZuHZob+kuafMOrd+47cfDgOEV24idxmEebg/HDyqJaLTZsIBr6IWVgcfJlUkMkOMQh3PXXoeAfI5w3dfJRoC/8fQRBFQctjzP X-Gm-Message-State: AOJu0YwGOy1dS39QcggS62tVblneja6Z12His7gfPtk1MtF+jwif1mmu bl1wfC43k4BmopZ5X+B50uU38wZG6VIRjp7qiXz7vEnSUQB5bOxK X-Google-Smtp-Source: AGHT+IGwk/esDtihc6MW+d/0a3I3mBSQeTJAphytNfOUN9QT4vzAX4Uc56JLHhqmJN5VnhDApDvs+w== X-Received: by 2002:a2e:a40c:0:b0:2eb:ec25:b759 with SMTP id 38308e7fff4ca-2ec3463e0a1mr17870801fa.3.1718827202139; Wed, 19 Jun 2024 13:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.17.134]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ec05c78126sm20552121fa.81.2024.06.19.13.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jun 2024 13:00:01 -0700 (PDT) Message-ID: <987b1c8c-8c91-4847-ca0e-879f421680ff@gmail.com> Date: Wed, 19 Jun 2024 23:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Failures in constraints regression test, "read only 0 of 8192 bytes" To: Heikki Linnakangas , Thomas Munro Cc: Tomas Vondra , Ronan Dunklau , PostgreSQL Hackers References: <2185821.Icojqenx9y@aivenlaptop> <5c5a0015-723a-4fa7-85d5-2f0f47b92094@enterprisedb.com> <61ef0b89-1ec6-4d88-afbd-2ffc2c977511@enterprisedb.com> <05fd672f-2eac-4758-91e9-fa7afafa147e@enterprisedb.com> <50ebc494-0d52-4b76-bea4-f7ab5569300a@iki.fi> Content-Language: en-US From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Heikki, 11.03.2024 10:09, Heikki Linnakangas wrote: > On 10/03/2024 22:59, Thomas Munro wrote: >> On Mon, Mar 11, 2024 at 9:30 AM Heikki Linnakangas wrote: >>> Barring objections, I'll commit the attached. >> >> +1 > > Pushed, thanks! Please look at a new anomaly, that I've discovered in master. Starting from af0e7deb4, the following script: numjobs=80 for ((i=1;i<=50;i++)); do echo "I $i" for ((j=1;j<=numjobs;j++)); do createdb db$j; done for ((j=1;j<=numjobs;j++)); do echo " VACUUM FULL pg_class; REINDEX INDEX pg_class_oid_index; " | psql -d db$j >/dev/null 2>&1 & echo " CREATE TABLE tbl1 (t text); DROP TABLE tbl1; " | psql -d db$j >/dev/null 2>&1 & done wait grep 'was terminated' server.log && break; for ((j=1;j<=numjobs;j++)); do dropdb db$j; done done triggers a segfault: 2024-06-19 19:22:49.009 UTC [1607210:6] LOG:  server process (PID 1607671) was terminated by signal 11: Segmentation fault with the following stack trace: Core was generated by `postgres: law db50 [local] CREATE TABLE                                       '. Program terminated with signal SIGSEGV, Segmentation fault. warning: Section `.reg-xstate/1607671' in core file too small. #0  0x000055d04cb8232e in RelationReloadNailed (relation=0x7f7d0a1b1fd8) at relcache.c:2415 2415                            relp = (Form_pg_class) GETSTRUCT(pg_class_tuple); (gdb) bt #0  0x000055d04cb8232e in RelationReloadNailed (relation=0x7f7d0a1b1fd8) at relcache.c:2415 #1  0x000055d04cb8278c in RelationClearRelation (relation=0x7f7d0a1b1fd8, rebuild=true) at relcache.c:2560 #2  0x000055d04cb834e9 in RelationCacheInvalidate (debug_discard=false) at relcache.c:3048 #3  0x000055d04cb72e3c in InvalidateSystemCachesExtended (debug_discard=false) at inval.c:680 #4  0x000055d04cb73190 in InvalidateSystemCaches () at inval.c:794 #5  0x000055d04c9754ad in ReceiveSharedInvalidMessages (     invalFunction=0x55d04cb72eee ,     resetFunction=0x55d04cb7317e ) at sinval.c:105 #6  0x000055d04cb731b4 in AcceptInvalidationMessages () at inval.c:808 #7  0x000055d04c97d2ed in LockRelationOid (relid=2662, lockmode=1) at lmgr.c:136 #8  0x000055d04c404b1f in relation_open (relationId=2662, lockmode=1) at relation.c:55 #9  0x000055d04c47941e in index_open (relationId=2662, lockmode=1) at indexam.c:137 #10 0x000055d04c4787c2 in systable_beginscan (heapRelation=0x7f7d0a1b1fd8, indexId=2662, indexOK=true, snapshot=0x0,     nkeys=1, key=0x7ffd456a8570) at genam.c:396 #11 0x000055d04cb7e93d in ScanPgRelation (targetRelId=3466, indexOK=true, force_non_historic=false) at relcache.c:381 #12 0x000055d04cb7fe15 in RelationBuildDesc (targetRelId=3466, insertIt=true) at relcache.c:1093 #13 0x000055d04cb81c93 in RelationIdGetRelation (relationId=3466) at relcache.c:2108 #14 0x000055d04c404b29 in relation_open (relationId=3466, lockmode=1) at relation.c:58 #15 0x000055d04cb720a6 in BuildEventTriggerCache () at evtcache.c:129 #16 0x000055d04cb71f6a in EventCacheLookup (event=EVT_SQLDrop) at evtcache.c:68 #17 0x000055d04c61c037 in trackDroppedObjectsNeeded () at event_trigger.c:1342 #18 0x000055d04c61bf02 in EventTriggerBeginCompleteQuery () at event_trigger.c:1284 #19 0x000055d04c9ac744 in ProcessUtilitySlow (pstate=0x55d04d04aca0, pstmt=0x55d04d021540,     queryString=0x55d04d020830 "CREATE TABLE tbl1 (t text);", context=PROCESS_UTILITY_TOPLEVEL, params=0x0,     queryEnv=0x0, dest=0x55d04d021800, qc=0x7ffd456a8fb0) at utility.c:1107 #20 0x000055d04c9ac64d in standard_ProcessUtility (pstmt=0x55d04d021540,     queryString=0x55d04d020830 "CREATE TABLE tbl1 (t text);", readOnlyTree=false, context=PROCESS_UTILITY_TOPLEVEL,     params=0x0, queryEnv=0x0, dest=0x55d04d021800, qc=0x7ffd456a8fb0) at utility.c:1067 #21 0x000055d04c9ab54d in ProcessUtility (pstmt=0x55d04d021540,     queryString=0x55d04d020830 "CREATE TABLE tbl1 (t text);", readOnlyTree=false, context=PROCESS_UTILITY_TOPLEVEL,     params=0x0, queryEnv=0x0, dest=0x55d04d021800, qc=0x7ffd456a8fb0) at utility.c:523 #22 0x000055d04c9a9dc6 in PortalRunUtility (portal=0x55d04d0c1020, pstmt=0x55d04d021540, isTopLevel=true,     setHoldSnapshot=false, dest=0x55d04d021800, qc=0x7ffd456a8fb0) at pquery.c:1158 #23 0x000055d04c9aa03d in PortalRunMulti (portal=0x55d04d0c1020, isTopLevel=true, setHoldSnapshot=false,     dest=0x55d04d021800, altdest=0x55d04d021800, qc=0x7ffd456a8fb0) at pquery.c:1315 #24 0x000055d04c9a9487 in PortalRun (portal=0x55d04d0c1020, count=9223372036854775807, isTopLevel=true, run_once=true,     dest=0x55d04d021800, altdest=0x55d04d021800, qc=0x7ffd456a8fb0) at pquery.c:791 #25 0x000055d04c9a2150 in exec_simple_query (query_string=0x55d04d020830 "CREATE TABLE tbl1 (t text);")     at postgres.c:1273 #26 0x000055d04c9a71f5 in PostgresMain (dbname=0x55d04d05dbf0 "db50", username=0x55d04d05dbd8 "law") at postgres.c:4675 #27 0x000055d04c8bd8c8 in BackendRun (port=0x55d04d0540c0) at postmaster.c:4475 #28 0x000055d04c8bcedd in BackendStartup (port=0x55d04d0540c0) at postmaster.c:4151 #29 0x000055d04c8b93a9 in ServerLoop () at postmaster.c:1769 #30 0x000055d04c8b8ca4 in PostmasterMain (argc=3, argv=0x55d04d01a770) at postmaster.c:1468 #31 0x000055d04c76c577 in main (argc=3, argv=0x55d04d01a770) at main.c:197 (gdb) p pg_class_tuple $1 = (HeapTuple) 0x0 server.log might also contain: 2024-06-19 19:25:38.060 UTC [1618682:5] psql ERROR:  could not read blocks 3..3 in file "base/28531/28840": read only 0 of 8192 bytes Best regards, Alexander