Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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
- Loading branch information