You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deeps1991
changed the title
[YSQL] Multiple YSQL tests fail when TSAN enabled due to races in postgres shutdown path
[YSQL] Multiple YSQL tests fail when TSAN enabled due to race in postgres shutdown path
Feb 1, 2023
Summary:
quickdie() is the signal handler invoked to handle SIGQUIT. This is the
immediate shutdown mode, expected to be invoked when something is really
wrong, such as corrupted shared memory.
This being the case, it is not safe to invoke
YBOnPostgresBackendShutdown, which internally invokes PgApi destructor
from quickdie. This also causes TSAN failures because there could be
other concurrent threads in process of accessing the PgApi object.
Secondly as noted in the comment in quickdie(), it is not safe to call
ereport() from quickdie as it is not async-signal-safe. It has been
added by PG authors anyway as a best effort to provide some information before shutting
down. Although acceptable, this again causes TSAN failures. Therefore
this patch silences the TSAN failures by not invoking the ereport() in
TSAN build.
Test Plan: Manually tested by running tests enabled with TSAN.
Reviewers: dmitry
Reviewed By: dmitry
Subscribers: yql
Differential Revision: https://phabricator.dev.yugabyte.com/D23045
Jira Link: DB-5351
Description
The text was updated successfully, but these errors were encountered: