pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix deadlock danger when atomic ops are done under spinlock. 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cf1234a10e50ff9be0dc85184689ee4ebc57cd77 Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 52 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5fffa8fce37b981e1a5bb79affce9a856e021265 Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 52 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6cc2866c4cdf6a167be1ed9cb0fff9fce55758d6 Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 52 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/825d89dda5add2eecdc26fa36365720b22c72b71 Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 52 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c2a84bee1228830e82b1d2e86dc836bc00ac812a Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 52 ++++++++++++++++++++++ 2 files changed, 119 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8bc13287ed3e1856c9b8892df98683298d2f0cec Modified Files -------------- src/backend/storage/lmgr/spin.c | 97 ++++++++++++++++++++++++++++------------- src/test/regress/regress.c | 47 ++++++++++++++++++++ 2 files changed, 114 insertions(+), 30 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix deadlock danger when atomic ops are done under spinlock. @ 2020-06-18 21:36 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 7+ messages in thread From: Andres Freund @ 2020-06-18 21:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix deadlock danger when atomic ops are done under spinlock. This was a danger only for --disable-spinlocks in combination with atomic operations unsupported by the current platform. While atomics.c was careful to signal that a separate semaphore ought to be used when spinlock emulation is active, spin.c didn't actually implement that mechanism. That's my (Andres') fault, it seems to have gotten lost during the development of the atomic operations support. Fix that issue and add test for nesting atomic operations inside a spinlock. Author: Andres Freund Discussion: https://postgr.es/m/20200605023302.g6v3ydozy5txifji@alap3.anarazel.de Backpatch: 9.5- Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3e69bf3b142be3f4205435ef3baabcae168c6a14 Modified Files -------------- src/backend/storage/lmgr/spin.c | 99 +++++++++++++++++++++++++++++++---------- src/test/regress/regress.c | 47 +++++++++++++++++++ 2 files changed, 123 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-06-18 21:36 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de> 2020-06-18 21:36 pgsql: Fix deadlock danger when atomic ops are done under spinlock. Andres Freund <andres@anarazel.de>
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