Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6SY2-0005NW-GX for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 09:00:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6SXz-0007WA-PW for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 09:00:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6SXz-0007Pb-F4 for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 09:00:11 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q6SXs-000V8n-RH for pgsql-hackers@postgresql.org; Tue, 06 Jun 2023 09:00:10 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f3b4ed6fdeso7260337e87.3 for ; Tue, 06 Jun 2023 02:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686042003; x=1688634003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MaAy4rg+G+O/JxirBJzjeS4dqUNnMKUbSWk6w3KmAG0=; b=G/XT2MZMp0HT4rDuzzKyf0CdJCI6XEmWCW6MZGE0sPfUlcq0hBIWSGw2Gvh6vAvSDu I2OWE0R6JIjoQO0D16oFm9IbNxY9RHgZUmK7Gebk5lZ2vhRq41p6+nXeqrHwIN4FTMEx yxUJ+GnpYQoKLqpE82oeFnqLNzOUSXpsfRQ//AOmMbxN2KpM070Vbb8LKPHe+Y86PKDv InUTWd/mlDYY1e7fpsF/OWnjCYe8ZhMZTq/O36c5feAdKQuxi+v/HWqWnirraFEdsKjy yoWpRwq7m1zUCVWShjmZ/bXE/QRSIec2Q3EDKAd++YtXMOaJ7EdTtIabZlRtvC+3R2wx ScsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686042003; x=1688634003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MaAy4rg+G+O/JxirBJzjeS4dqUNnMKUbSWk6w3KmAG0=; b=bi3gZN3XQQB2nLg4RjbSxIrAvcAR9fgM/teBJn5RSHUnPyvS+hRlmljfQvIC1f0NYn aVweYM7pRGueEksdal9o3sfcvWe8HPMaY/J7gUtAS3wkJTAb8VukpSZsvLgEpjWR9UAK TSom/PRiZge9m7k0WkRo0HKNVOQyCZYJNsStFMpo9Dle4xIKqubfteAT+Dy9R8ahj6JV Ws9cA4EAVRGj15ffmhEuX9kd1eb3SgagdLQatl2B38d9iCLsvmXJn6o4gJ40IM5FNm2K V6UOcsMkXh2jzPSrcLJLsOMhqk+1LXlnn0riDnBKljwfRGJCMX70DMfDHkQpJGkmIoD1 5rzw== X-Gm-Message-State: AC+VfDzNMxwVA1xBLCwHmwcuRtJmVirKeofKv/oqZv9LptQXmjYuH5vA ywnjei5dTLj3lbv64eGlypI= X-Google-Smtp-Source: ACHHUZ5o+MJzVHD+CqwmvoX3DK4Ek9rUvvdSPlqmUMsgTVE3CLlFsmJbN0HarpB6t8ybsgYQqwAnNg== X-Received: by 2002:a19:700a:0:b0:4ef:f1f4:14db with SMTP id h10-20020a19700a000000b004eff1f414dbmr666798lfc.16.1686042002915; Tue, 06 Jun 2023 02:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.22.130]) by smtp.gmail.com with ESMTPSA id c24-20020ac25318000000b004eefdd8b37fsm1387314lfh.194.2023.06.06.02.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 02:00:02 -0700 (PDT) Message-ID: Date: Tue, 6 Jun 2023 12: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: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639) Content-Language: en-US To: Amit Kapila , Masahiko Sawada Cc: Tomas Vondra , pgsql-hackers References: 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, 21.10.2022 08:49, Amit Kapila wrote: > On Fri, Oct 21, 2022 at 8:01 AM Masahiko Sawada wrote: >> Thank you for the comment! I agreed with all comments and I've updated >> patches accordingly. >> > Pushed after removing the test case from v11-13 branches as it is not > relevant to those branches and the test-1 in > catalog_change_snapshot.spec already tests the same case for those > branches. I've managed to get that assertion failure again (on master) while playing with the concurrent installcheck. This can be easily reproduced with the following script: numclients=5 for ((c=1;c<=numclients;c++)); do   cp -r contrib/test_decoding contrib/test_decoding_$c   sed "s/isolation_slot/isolation_slot_$c/" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Use independent slots   sed "$(printf '$p; %.0s' `seq 50`)" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Repeat the last permutation 50 times done for ((c=1;c<=numclients;c++)); do   EXTRA_REGRESS_OPTS="--dbname=regress_$c" make -s installcheck-force -C contrib/test_decoding_$c USE_MODULE_DB=1 >"installcheck-$c.log" 2>&1 & done wait grep 'TRAP:' server.log Produces for me: TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794105 TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794104 TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794099 TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794105 TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794104 TRAP: failed Assert("prev_first_lsn < cur_txn->first_lsn"), File: "reorderbuffer.c", Line: 942, PID: 3794099 With the debug logging added inside AssertTXNLsnOrder() I see: ctx->snapshot_builder->start_decoding_at: 209807224, ctx->reader->EndRecPtr: 210043072, SnapBuildXactNeedsSkip(ctx->snapshot_builder, ctx->reader->EndRecPtr): 0 and inside the loop: cur_txn->first_lsn: 209792872 cur_txn->first_lsn: 209975744 cur_txn->first_lsn: 210043008 cur_txn->first_lsn: 210043008 and it triggers the Assert. Best regards, Alexander