Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction
Дата
Msg-id 66a6851c-e213-b31a-c8e6-789ab06e17f1@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-bugs
Hello Thomas,

26.07.2021 10:36, Thomas Munro wrote:
> On Sat, Jul 24, 2021 at 12:56 AM Thomas Munro <thomas.munro@gmail.com> wrote:
>> On Thu, Jul 22, 2021 at 11:23 PM PG Bug reporting form
>> <noreply@postgresql.org> wrote:           '.
>>> #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
>> Thanks.  Repro'd here.  Not immediately sure what's happening here,
>> but I will look into it next week.
> Here's a draft patch that includes your test spec.  Without the
> included change to predicate.c, it hits the assertion.  With it, it
> doesn't, and pg_locks shows no leaked locks after the isolation checks
> run (that was the problem 47a338cf fixed before 12 was released, but
> it fixed it a little too far in the opposite direction, fortunately
> without ill effect AFAICS besides wasted CPU cycles).

Thanks! I'm not sure, whether this is related to the fix, but my
parallel installcheck script (attached) catches another assert with the
patch applied:

Core was generated by `postgres: postgres regress33 127.0.0.1(48582) COM'.
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  0x00007ff5251c7535 in __GI_abort () at abort.c:79
#2  0x000055b16d72aa32 in ExceptionalCondition (
    conditionName=conditionName@entry=0x55b16d89ccd0
"!SxactIsPartiallyReleased(MySerializableXact)",
    errorType=errorType@entry=0x55b16d78301d "FailedAssertion",
fileName=fileName@entry=0x55b16d89bbc9 "predicate.c",
    lineNumber=lineNumber@entry=4859) at assert.c:67
#3  0x000055b16d5f8a3a in PreCommit_CheckForSerializationFailure () at
predicate.c:4859
#4  0x000055b16d34227d in CommitTransaction () at xact.c:2140
#5  0x000055b16d3435b5 in CommitTransactionCommand () at xact.c:3085
#6  0x000055b16d602369 in finish_xact_command () at postgres.c:2662
#7  0x000055b16d604a23 in finish_xact_command () at postgres.c:2660
#8  exec_simple_query (query_string=0x55b16e9c6980 "COMMIT;") at
postgres.c:1264
#9  0x000055b16d6060d9 in PostgresMain (argc=<optimized out>,
argv=argv@entry=0x55b16e9f66a8, dbname=<optimized out>,
    username=<optimized out>) at postgres.c:4339
#10 0x000055b16d57936f in BackendRun (port=0x55b16e9f40b0,
port=0x55b16e9f40b0) at postmaster.c:4526
#11 BackendStartup (port=0x55b16e9f40b0) at postmaster.c:4210
#12 ServerLoop () at postmaster.c:1739
#13 0x000055b16d57a36c in PostmasterMain (argc=3, argv=0x55b16e9c1320)
at postmaster.c:1412
#14 0x000055b16d28bf5b in main (argc=3, argv=0x55b16e9c1320) at main.c:210

---
/tmp/t/ic01-33/src/test/isolation/expected/serializable-parallel-2.out
2021-07-26 22:04:06.206541268 +0300
+++
/tmp/t/ic01-33/src/test/isolation/output_iso/results/serializable-parallel-2.out      
2021-07-26 22:08:04.883339810 +0300
@@ -47,4 +47,6 @@
 10
 (10 rows)

-step s2c: COMMIT;
+lock wait query failed: server closed the connection unexpectedly
+       This probably means the server terminated abnormally
+       before or while processing the request.

If time permits, I will compose (till the weekend) yet another isolation
test to demonstrate this fail. But maybe the script can be useful as is.
(To simplify things I left only serializable-parallel* tests in
isolation_schedule.)

Best regards,
Alexander

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Lætitia Avrot
Дата:
Сообщение: Re: Statistics updates is delayed when using `commit and chain`
Следующее
От: Japin Li
Дата:
Сообщение: Re: Statistics updates is delayed when using `commit and chain`