From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: Mon, 11 Apr 2016 23:41:10 -0400
Message-ID: <2490.1460432470@sss.pgh.pa.us> (raw)
In-Reply-To: <20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org>
<1881.1460431476@sss.pgh.pa.us>
<20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andres Freund <andres@anarazel.de> writes:
> The issue is likely that either Alexander or I somehow made
> MarkLocalBufferDirty() use pg_atomic_fetch_or_u32(), instead of the
> proper pg_atomic_read_u32()/pg_atomic_write_u32().
The stack trace I'm seeing is
#5 0x7279cc in elog_finish (elevel=6,
fmt=0x40057cf8 '\177' <repeats 200 times>...) at elog.c:1378
#6 0x5cecd8 in s_lock_stuck (p=0x402995b8, file=0x21bae0 "s_lock.c", line=92)
at s_lock.c:81
#7 0x5cedd4 in perform_spin_delay (status=0x7b03b8c8) at s_lock.c:130
#8 0x5ced40 in s_lock (lock=0x6, file=0x20 <Address 0x20 out of bounds>,
line=6) at s_lock.c:96
#9 0x53a4b0 in pg_atomic_compare_exchange_u32_impl (ptr=0x402995b8,
expected=0x5c, newval=58982400) at atomics.c:122
#10 0x5a280c in MarkLocalBufferDirty (buffer=6)
at ../../../../src/include/port/atomics/generic.h:224
#11 0x59bba0 in MarkBufferDirty (buffer=6) at bufmgr.c:1489
#12 0x2c9cd0 in heap_multi_insert (relation=0x401c41d0, tuples=0x40201888,
ntuples=561, cid=0, options=0, bistate=0x40153128) at heapam.c:2760
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
In-Reply-To: <2490.1460432470@sss.pgh.pa.us>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org> <1881.1460431476@sss.pgh.pa.us> <20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de> <2490.1460432470@sss.pgh.pa.us>
* 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