BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction - Mailing list pgsql-bugs
From | PG Bug reporting form |
---|---|
Subject | BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction |
Date | |
Msg-id | 17116-d6ca217acc180e30@postgresql.org Whole thread Raw |
Responses |
Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction
|
List | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 17116 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 13.3 Operating system: Ubuntu 20.04 Description: The isolation test "serializable-parallel-2" modified as follows: # Exercise the case where a read-only serializable transaction has # SXACT_FLAG_RO_SAFE set in a parallel query. setup { CREATE TABLE foo AS SELECT generate_series(1, 10)::int a; ALTER TABLE foo SET (parallel_workers = 2); } teardown { DROP TABLE foo; } session s1 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } step s1r { SELECT * FROM foo; } step s1c { COMMIT; } session s2 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY; SET parallel_setup_cost = 0; SET parallel_tuple_cost = 0; } step s2r1 { SELECT * FROM foo; } step s2r2 { SELECT * FROM foo; } step s2c { COMMIT; } session s3 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } step s3r { SELECT * FROM foo; } step s3c { COMMIT; } session s4 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY; SET parallel_setup_cost = 0; SET parallel_tuple_cost = 0; } step s4r1 { SELECT * FROM foo; } step s4r2 { SELECT * FROM foo; } step s4c { COMMIT; } permutation s1r s3r s2r1 s4r1 s1c s2r2 s3c s4r2 s4c s2c leads to a failed assertion with the following stacktrace: Core was generated by `postgres: law isolation_regression [local] COMMIT '. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f21de1dd859 in __GI_abort () at abort.c:79 #2 0x0000555e1740b1ac in ExceptionalCondition ( conditionName=conditionName@entry=0x555e17581ce8 "!TransactionIdIsValid(serialControl->tailXid) || TransactionIdFollows(xid, serialControl->tailXid)", errorType=errorType@entry=0x555e17466028 "FailedAssertion", fileName=fileName@entry=0x555e17581789 "predicate.c", lineNumber=lineNumber@entry=1056) at assert.c:67 #3 0x0000555e172d3c5c in SerialSetActiveSerXmin (xid=6187) at predicate.c:1056 #4 0x0000555e172d3ecf in SetNewSxactGlobalXmin () at predicate.c:3309 #5 0x0000555e172d811c in ReleasePredicateLocks (isCommit=false, isCommit@entry=true, isReadOnlySafe=isReadOnlySafe@entry=false) at predicate.c:3697 #6 0x0000555e1743fbb0 in ResourceOwnerReleaseInternal (owner=<optimized out>, phase=phase@entry=RESOURCE_RELEASE_LOCKS, isCommit=isCommit@entry=true, isTopLevel=isTopLevel@entry=true) at resowner.c:569 #7 0x0000555e17440166 in ResourceOwnerRelease (owner=<optimized out>, phase=phase@entry=RESOURCE_RELEASE_LOCKS, isCommit=isCommit@entry=true, isTopLevel=isTopLevel@entry=true) at resowner.c:484 #8 0x0000555e1700a156 in CommitTransaction () at xact.c:2227 #9 0x0000555e1700af28 in CommitTransactionCommand () at xact.c:2974 #10 0x0000555e172e319d in finish_xact_command () at postgres.c:2662 #11 0x0000555e172e5972 in exec_simple_query (query_string=query_string@entry=0x555e18e17350 "COMMIT;") at postgres.c:1264 #12 0x0000555e172e7b06 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x555e18e42ad8, dbname=<optimized out>, username=<optimized out>) at postgres.c:4339 #13 0x0000555e17253165 in BackendRun (port=port@entry=0x555e18e3bb10) at postmaster.c:4526 #14 0x0000555e172562c0 in BackendStartup (port=port@entry=0x555e18e3bb10) at postmaster.c:4210 #15 0x0000555e17256507 in ServerLoop () at postmaster.c:1739 #16 0x0000555e17257a30 in PostmasterMain (argc=8, argv=<optimized out>) at postmaster.c:1412 #17 0x0000555e171a0a4f in main (argc=8, argv=0x555e18e119e0) at main.c:210 (Discovered by running multiple installcheck-world's in parallel.) Reproduced on REL_12_STABLE..master. It looks like the offending commit is 47a338cf.
pgsql-bugs by date: