Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBesm-0003hY-Jt for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Apr 2019 12:20:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBesl-0005hX-2m for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Apr 2019 12:20:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBesk-0005h8-J9 for pgsql-bugs@lists.postgresql.org; Wed, 03 Apr 2019 12:20:42 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBesd-0008MJ-2M for pgsql-bugs@lists.postgresql.org; Wed, 03 Apr 2019 12:20:40 +0000 Received: by mail-wr1-x442.google.com with SMTP id r4so21021179wrq.8 for ; Wed, 03 Apr 2019 05:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ON5QoBAOxCOvsnT5kLkTYRAFJf5RA2Gj+Y0tJVRkdwU=; b=fnTmJ5KL3r38zvuj7vRB6TzTlzorIWndDXgqkMf2AzRAFiqguPYKP9nIi0PadsqiXd SsBKDJDeT4qt4ZuOGMM5qs5ZhXqcVhhxELVWuw6jFqN7Sc6M6VTDE6YwD98A9VY6rclF hhe9rrEqSqDKqlXRgeqNtNtK3lDVZQQCQ40zFIfnfTZIayd5oNa+jl7Fb1YNUt17el8o RZIedjZX5ygIPkSyXdE/6M4D6oQYO8uAQwVvoVkjmCNuLTDLO576nIXCYKtbBGUoAQa8 KS5XsKsO0j+IiRqkJC7JxWL7Ru3O90MeEEXXv0UjOZ6gdcGix3lbbU/WgopVSxGyJBXu nX1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ON5QoBAOxCOvsnT5kLkTYRAFJf5RA2Gj+Y0tJVRkdwU=; b=NWFNojM7QQhuBjkHownMMGY7huNYZgJlKTR1ysh4f3QU3QoM6tgTKtMkEEcAb5A3BB tyrT/1K4fXME/K31UVI9EmTTifDUv9E9Y6tMtU9TcSCwSa36CrlUaHri/nAQcShH79Q7 JH8XNwqVK+YevkqLEueEfaSLv7Pivxw47aoBNflaA0FQrXgazPJrtP+ePcQzdILLGJ8g J6yd/L8MpFnKAFRX7gnGywZZDp6B+43cbQn1qVbLmGsIq6qji4p7+7yN7N1ACsPRlgX4 zHkST+Wxx8yO6ddNIBw0IgalZ96wNgF+yXimKVIpTAvu+EnPfWfhVNOMzDk882DJJCEU tunA== X-Gm-Message-State: APjAAAUMI3OYn+MpIMd0WtrmvKPiUDDutcBtn3SEz+wwbxJhPRdq0+GK 4CYEV4qXjVMczqNbktYSPMLY2NBq1Ps= X-Google-Smtp-Source: APXvYqwgMoCktHFOCs+VXcQ61T+nmm3oyS6D0iYFM2+tibyVyPCV6V3knGcoy5P1MYjViT73nZ/HWg== X-Received: by 2002:adf:ee07:: with SMTP id y7mr47390012wrn.219.1554294033413; Wed, 03 Apr 2019 05:20:33 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id z1sm12931503wrs.52.2019.04.03.05.20.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 05:20:32 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id BB8BC121AAF; Wed, 3 Apr 2019 09:20:27 -0300 (-03) Date: Wed, 3 Apr 2019 09:20:27 -0300 From: Alvaro Herrera To: r.zharkov@postgrespro.ru Cc: Tom Lane , Andres Freund , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15727: PANIC: cannot abort transaction 295144144, it was already committed Message-ID: <20190403122027.GA17929@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f71a201d23777478ae48c548dd6f9d1@postgrespro.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-03, r.zharkov@postgrespro.ru wrote: > #0 0x00007f5e0dc7b428 in __GI_raise (sig=sig@entry=6) at > ../sysdeps/unix/sysv/linux/raise.c:54 > #1 0x00007f5e0dc7d02a in __GI_abort () at abort.c:89 > #2 0x0000000000a9b7ce in ExceptionalCondition ( > conditionName=0xb3de08 "!((((tuple->t_data->t_infomask) & 0x0080) || > (((tuple->t_data->t_infomask) & (0x1000 | ((0x0040 | 0x0010) | 0x0040 | > 0x0010))) == 0x0040)))", > errorType=0xb39a69 "FailedAssertion", fileName=0xb39ae8 "heapam.c", > lineNumber=4286) at assert.c:54 > #3 0x00000000004ea024 in heap_lock_tuple (relation=0x7f5e0f252d80, > tuple=0x30f4dd0, cid=0, mode=LockTupleNoKeyExclusive, > wait_policy=LockWaitBlock, follow_updates=false, > buffer=0x7ffed968cbb4, tmfd=0x7ffed968cd80) at heapam.c:4286 Uhm ... this assertion failure is doesn't seem related to the other problem you were reporting. Here, it's failing because it thinks the tuple should be marked as only locked when the current transaction is the only Xmax for the tuple. /* * As a check independent from those above, we can also avoid sleeping * if the current transaction is the sole locker of the tuple. Note * that the strength of the lock already held is irrelevant; this is * not about recording the lock in Xmax (which will be done regardless * of this optimization, below). Also, note that the cases where we * hold a lock stronger than we are requesting are already handled * above by not doing anything. * * Note we only deal with the non-multixact case here; MultiXactIdWait * is well equipped to deal with this situation on its own. */ if (require_sleep && !(infomask & HEAP_XMAX_IS_MULTI) && TransactionIdIsCurrentTransactionId(xwait)) { /* ... but if the xmax changed in the meantime, start over */ LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE); if (xmax_infomask_changed(tuple->t_data->t_infomask, infomask) || !TransactionIdEquals(HeapTupleHeaderGetRawXmax(tuple->t_data), xwait)) goto l3; Assert(HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_data->t_infomask)); // <--- failed assertion require_sleep = false; } I'm not quite sure what's up with that. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services