pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Shulgin <ash@commandprompt.com>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Date: Thu, 04 Dec 2014 18:14:47 +0300
Message-ID: <87wq6730rc.fsf@commandprompt.com> (raw)
In-Reply-To: <5480796B.7020203@2ndquadrant.com>
References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org>
	<54802C7F.90606@vmware.com>
	<87d27z4i0b.fsf@commandprompt.com>
	<20141204143555.GA26945@alvh.no-ip.org>
	<87388v4ggf.fsf@commandprompt.com>
	<5480796B.7020203@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


Craig Ringer <craig@2ndquadrant.com> writes:

> On 12/04/2014 10:50 PM, Alex Shulgin wrote:
>> Is there a way to pause the bootstrap process so I can attach gdb to it?
>
> With a newer gdb, you can instead tell gdb to follow all forks. I wrote
> some notes on it recently.
>
> http://blog.2ndquadrant.com/processes-breakpoints-watchpoints-postgresql/
>
> I've found it really handy when debugging crashes in regression tests.
>
> However, it's often simpler to just:
>
> ulimit -c unlimited
> make check
>
> (or whatever your crashing test is) then look at the core files that are
> produced.

Good one, it didn't occur to me that assert makes core files.

Figured it out with a pg_usleep in bootstrap.c anyway.  Does this look sane?


DEBUG:  inserting column 6 value "0"
DEBUG:  inserted -> 0
DEBUG:  inserting column 7 value "varchar_transform"
TRAP: FailedAssertion("!(((xmax) >= ((TransactionId) 3)))", File: "/home/ash/src/postgresql/src/backend/storage/ipc/procarray.c", Line: 1414)

Program received signal SIGABRT, Aborted.
0x00007f2757128d27 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007f2757128d27 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f275712a418 in __GI_abort () at abort.c:89
#2  0x00000000009088b2 in ExceptionalCondition (
    conditionName=0xac0710 "!(((xmax) >= ((TransactionId) 3)))", 
    errorType=0xac01d8 "FailedAssertion", 
    fileName=0xac0178 "/home/ash/src/postgresql/src/backend/storage/ipc/procarray.c", lineNumber=1414)
    at /home/ash/src/postgresql/src/backend/utils/error/assert.c:54
#3  0x000000000079e125 in GetSnapshotData (
    snapshot=0xdb2d60 <CatalogSnapshotData>)
    at /home/ash/src/postgresql/src/backend/storage/ipc/procarray.c:1414
#4  0x000000000094e02d in GetNonHistoricCatalogSnapshot (relid=1255)
    at /home/ash/src/postgresql/src/backend/utils/time/snapmgr.c:298
#5  0x000000000094dfdd in GetCatalogSnapshot (relid=1255)
    at /home/ash/src/postgresql/src/backend/utils/time/snapmgr.c:272
#6  0x00000000004c8f0d in systable_beginscan (heapRelation=0x1d0e5c0, 
    indexId=2691, indexOK=1 '\001', snapshot=0x0, nkeys=1, key=0x7fff201bbc40)
    at /home/ash/src/postgresql/src/backend/access/index/genam.c:275
#7  0x0000000000885070 in regprocin (fcinfo=0x7fff201bbce0)
    at /home/ash/src/postgresql/src/backend/utils/adt/regproc.c:106
#8  0x0000000000914fe7 in InputFunctionCall (flinfo=0x7fff201bc0c0, 
    str=0x1d349b8 "varchar_transform", typioparam=24, typmod=-1)
---Type <return> to continue, or q <return> to quit---
    at /home/ash/src/postgresql/src/backend/utils/fmgr/fmgr.c:1914
#9  0x000000000091533e in OidInputFunctionCall (functionId=44, 
    str=0x1d349b8 "varchar_transform", typioparam=24, typmod=-1)
    at /home/ash/src/postgresql/src/backend/utils/fmgr/fmgr.c:2045
#10 0x000000000052af91 in InsertOneValue (value=0x1d349b8 "varchar_transform", 
    i=7) at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:840
#11 0x0000000000527409 in boot_yyparse ()
    at /home/ash/src/postgresql/src/backend/bootstrap/bootparse.y:455
#12 0x000000000052a26b in BootstrapModeMain ()
    at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:494
#13 0x000000000052a177 in AuxiliaryProcessMain (argc=6, argv=0x1cc8378)
    at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:414
#14 0x00000000006a327c in main (argc=7, argv=0x1cc8370)
    at /home/ash/src/postgresql/src/backend/main/main.c:212
(gdb)


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (28+ messages)  latest in thread

Message-ID: <87wq6730rc.fsf@commandprompt.com>
Permalink:  ../87wq6730rc.fsf@commandprompt.com/
Also on:    postgresql.org/message-id/87wq6730rc.fsf@commandprompt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: ash@commandprompt.com, craig@2ndquadrant.com, alvherre@2ndquadrant.com, hlinnakangas@vmware.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
  In-Reply-To: <87wq6730rc.fsf@commandprompt.com>
  References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org> <54802C7F.90606@vmware.com> <87d27z4i0b.fsf@commandprompt.com> <20141204143555.GA26945@alvh.no-ip.org> <87388v4ggf.fsf@commandprompt.com> <5480796B.7020203@2ndquadrant.com> <87wq6730rc.fsf@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox