From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Bernd Helmle <mailings@oopsware.de>
Subject: Re: [HACKERS] Deadlock in XLogInsert at AIX
Date: Mon, 07 Oct 2019 15:06:35 -0400
Message-ID: <5304.1570475195@sss.pgh.pa.us> (raw)
In-Reply-To: <20191005173400.GA3979129@rfd.leadboat.com>
References: <5de6b64a-f842-9166-e41a-ed7b87a2729b@iki.fi>
<7609057e-b021-56d8-afb6-27acc1dfdeea@postgrespro.ru>
<15802dd8-4601-d9d2-3388-35dcb326b4a2@iki.fi>
<20170203002650.GA775605@tornado.leadboat.com>
<20180116071211.GB3679@paquier.xyz>
<20180116165024.4j24kgfqmjmrrqf7@alap3.anarazel.de>
<20180117083631.GB3885604@rfd.leadboat.com>
<20190831071157.GA3251746@rfd.leadboat.com>
<2525.1567276075@sss.pgh.pa.us>
<20190831223026.GA3257395@rfd.leadboat.com>
<20191005173400.GA3979129@rfd.leadboat.com>
Noah Misch <noah@leadboat.com> writes:
> [ fetch-add-gcc-xlc-unify-v2.patch ]
This still fails on Apple's compilers. The first failure I get is
ccache gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -I../../../src/include -I/usr/local/include -isysroot /Developer/SDKs/MacOSX10.5.sdk -c -o nodeHashjoin.o nodeHashjoin.c
/var/tmp//ccXUM8ep.s:449:Parameter error: r0 not allowed for parameter 2 (code as 0 not r0)
Line 449 of the assembly file is the addi in
LM87:
sync
lwarx r0,0,r2
addi r11,r0,1
stwcx. r11,0,r2
bne $-12
isync
which I suppose comes out of PG_PPC_FETCH_ADD. I find this idea of
constructing assembly code by string-pasting pretty unreadable and am not
tempted to try to debug it, but I don't immediately see why this doesn't
work when the existing s_lock.h code does. I think that the assembler
error message is probably misleading: while it seems to be saying to
s/r0/0/ in the addi, gcc consistently uses "rN" syntax for the second
parameter elsewhere. I do note that gcc never generates r0 as addi's
second parameter in several files I checked through, so maybe what it
means is "you need to use some other register"? (Which would imply that
the constraint for this asm argument is too loose.)
I'm also wondering why this isn't following s_lock.h's lead as to
USE_PPC_LWARX_MUTEX_HINT and USE_PPC_LWSYNC.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, michael.paquier@gmail.com, andres@anarazel.de, hlinnaka@iki.fi, k.knizhnik@postgrespro.ru, mailings@oopsware.de
Subject: Re: [HACKERS] Deadlock in XLogInsert at AIX
In-Reply-To: <5304.1570475195@sss.pgh.pa.us>
References: <5de6b64a-f842-9166-e41a-ed7b87a2729b@iki.fi> <7609057e-b021-56d8-afb6-27acc1dfdeea@postgrespro.ru> <15802dd8-4601-d9d2-3388-35dcb326b4a2@iki.fi> <20170203002650.GA775605@tornado.leadboat.com> <20180116071211.GB3679@paquier.xyz> <20180116165024.4j24kgfqmjmrrqf7@alap3.anarazel.de> <20180117083631.GB3885604@rfd.leadboat.com> <20190831071157.GA3251746@rfd.leadboat.com> <2525.1567276075@sss.pgh.pa.us> <20190831223026.GA3257395@rfd.leadboat.com> <20191005173400.GA3979129@rfd.leadboat.com> <5304.1570475195@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