Re: Configure with thread sanitizer fails the thread test

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Ewan Higgs <ewan_higgs(at)yahoo(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Configure with thread sanitizer fails the thread test
Date: 2015-08-17 19:02:06
Message-ID: 20150817190206.GF10786@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-08-17 14:31:24 -0300, Alvaro Herrera wrote:
> The postmaster process in particular runs in a rather unusual
> arrangement, where most of the interesting stuff does happen in signal
> handlers.

FWIW, I think it might be worthwhile to convert postmaster into a loop
over a process local latch, with that latch being set in signal
handlers. My feeling is that that'd simplify the code rather
significantly. I'm not 100% it's worth the code churn, but it'd
definitely be easier to understand. Thread sanitizer isn't the first
analysis tool that has problems coping with forks in signal handlers
btw, valgrind on amd64 for a long while had misaligned stacks in the
children afterwards leading to very odd crashes.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-08-17 19:04:25 Re: Raising our compiler requirements for 9.6
Previous Message Jim Nasby 2015-08-17 18:58:23 Re: Test code is worth the space