Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycd2q-0002Rf-Km for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Mar 2015 17:00:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ycd2q-0005wt-2y for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Mar 2015 17:00:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ycd2p-0005w2-13 for pgsql-bugs@postgresql.org; Mon, 30 Mar 2015 17:00:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ycd2h-0000I0-BO for pgsql-bugs@postgresql.org; Mon, 30 Mar 2015 17:00:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t2UH01An027538; Mon, 30 Mar 2015 13:00:01 -0400 From: Tom Lane To: Vladimir Borodin cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12918: Segfault in BackendIdGetTransactionIds In-reply-to: References: <20150330162247.2492.923@wrigleys.postgresql.org> <17494.1427733227@sss.pgh.pa.us> Comments: In-reply-to Vladimir Borodin message dated "Mon, 30 Mar 2015 19:44:36 +0300" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <27523.1427734783.0@sss.pgh.pa.us> Date: Mon, 30 Mar 2015 13:00:01 -0400 Message-ID: <27537.1427734801@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="US-ASCII" Content-ID: <27523.1427734783.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Vladimir Borodin writes: > I=E2=80=99ve also tried to revert dd1a3bcc where this function appeared b= ut couldn=E2=80=99t do it :( If you would be able to make a build without t= his commit (if it is easier than fix it in right way), I could install it o= n several production hosts to test it. Try this. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="BackendIdGetTransactionIds-crash.patch"; charset="us-ascii" Content-ID: <27523.1427734783.2@sss.pgh.pa.us> Content-Description: BackendIdGetTransactionIds-crash.patch Content-Transfer-Encoding: quoted-printable diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/= sinvaladt.c index 81b85c0..a2fde89 100644 *** a/src/backend/storage/ipc/sinvaladt.c --- b/src/backend/storage/ipc/sinvaladt.c *************** BackendIdGetProc(int backendID) *** 403,411 **** void BackendIdGetTransactionIds(int backendID, TransactionId *xid, Transaction= Id *xmin) { - ProcState *stateP; SISeg *segP =3D shmInvalBuffer; - PGXACT *xact; =20=20 *xid =3D InvalidTransactionId; *xmin =3D InvalidTransactionId; --- 403,409 ---- *************** BackendIdGetTransactionIds(int backendID *** 415,425 **** =20=20 if (backendID > 0 && backendID <=3D segP->lastBackend) { ! stateP =3D &segP->procState[backendID - 1]; ! xact =3D &ProcGlobal->allPgXact[stateP->proc->pgprocno]; =20=20 ! *xid =3D xact->xid; ! *xmin =3D xact->xmin; } =20=20 LWLockRelease(SInvalWriteLock); --- 413,428 ---- =20=20 if (backendID > 0 && backendID <=3D segP->lastBackend) { ! ProcState *stateP =3D &segP->procState[backendID - 1]; ! PGPROC *proc =3D stateP->proc; =20=20 ! if (proc !=3D NULL) ! { ! PGXACT *xact =3D &ProcGlobal->allPgXact[proc->pgprocno]; !=20 ! *xid =3D xact->xid; ! *xmin =3D xact->xmin; ! } } =20=20 LWLockRelease(SInvalWriteLock); ------- =_aaaaaaaaaa0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ------- =_aaaaaaaaaa0--