-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UBSAN issue in a CHECK in MiniTabletServer::bound_rpc_addr() in TestUpdateLagMetrics #10224
Comments
mbautin
added a commit
to mbautin/yugabyte-db
that referenced
this issue
Oct 30, 2021
…ugabyte#10230] [yugabyte#10251] [yugabyte#10295] Enable Clang 12 ASAN build on AlmaLinux 8 and fix relevant bugs Summary: Enabling the Clang 12 ASAN build on AlmaLinux 8 and fixing these bugs from that build: - yugabyte#7092 - pick up an updated version of LLVM where libunwind has been patched to work around crashing with an unknown x86_64 register error. - yugabyte#10046 - suppress harmless undefined behavior in gflags.cc. - yugabyte#10222 - increase the timeout for waiting for tablet server registration in mini cluster. - yugabyte#10224 - when looping to wait for leader/follower of a tablet in TestUpdateLagMetrics, reset tablet server pointers to nullptr at every iteration. - yugabyte#10230, yugabyte#10251 - use posix_spawn on Linux to create subprocesses to avoid getting stuck in the child process when allocating memory when setting environment variables because some memory allocation lock is already held by the parent process. On macOS, we still use fork+exec because posix_spawnp throws errors related to closing file descriptors. Making sure all files in our code are opened with FD_CLOEXEC is out of scope of this revision, and will be addressed by yugabyte#10321. - yugabyte#10295 - fix undefined behavior (adding to a null pointer) in a Postgres sorting function. Also removing Clang 7 ASAN build on CentOS 7 from Jenkins (we don't need two ASAN builds). Test Plan: Jenkins Reviewers: bogdan, steve.varnau, sergei Reviewed By: sergei Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D13301
mbautin
added a commit
that referenced
this issue
Oct 30, 2021
…Clang 12 ASAN build on AlmaLinux 8 and fix relevant bugs Summary: Updating third-party dependencies from 44ba3719652858e1f7816df87b25101e09527c88 to 2d282c38cfcbc10af7bdc1c86bf1e8af88f36efd (updating the LLVM toolchain with a bug fix, and also picking up the program_options Boost library addition by @mikhpolitov, commit yugabyte/yugabyte-db-thirdparty@2d282c3). yugabyte-db-thirdparty diff link: https://github.com/yugabyte/yugabyte-db-thirdparty/compare/44ba3719652858e1f7816df87b25101e09527c88..2d282c38cfcbc10af7bdc1c86bf1e8af88f36efd Enabling the Clang 12 ASAN build on AlmaLinux 8 and fixing these bugs from that build: - #7092 - pick up an updated version of LLVM where libunwind has been patched to work around crashing with an unknown x86_64 register error. - #10046 - suppress harmless undefined behavior in gflags.cc. - #10222 - increase the timeout for waiting for tablet server registration in mini cluster. - #10224 - when looping to wait for leader/follower of a tablet in TestUpdateLagMetrics, reset tablet server pointers to nullptr at every iteration. - #10230, #10251 - use posix_spawn on Linux to create subprocesses to avoid getting stuck in the child process when allocating memory when setting environment variables because some memory allocation lock is already held by the parent process. On macOS, we still use fork+exec because posix_spawnp throws errors related to closing file descriptors. Making sure all files in our code are opened with FD_CLOEXEC is out of scope of this revision, and will be addressed by #10321. - #10295 - fix undefined behavior (adding to a null pointer) in a Postgres sorting function. - Fix HostPort& field type in ysql_upgrade.h (make it HostPort). Otherwise there is an ASAN issue accessing a deallocated stack value. (No separate GitHub issue for this bug.) Also consolidating Status generation from a C standard library error number in errno.h and errno.c, and adding a few utility macros for convenient invocation of C functions that either return an errno as the return value, or return zero vs. non zero depending on whether there is an error, and set errno as a side effect. As part of this diff, we are removing Clang 7 ASAN build on CentOS 7 from Jenkins (we don't need two different ASAN builds). Test Plan: Jenkins Reviewers: bogdan, steve.varnau, sergei Reviewed By: sergei Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D13301
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Noticed this in an Clang 12 ASAN x86_64 AlmaLinux 8 test run of EnableReplicateIntents/CDCServiceTestMultipleServersOneTablet.TestUpdateLagMetrics/0.
The root cause seems to be this loop in
cdc_service-int-test.cc
, where theleader_mini_tserver
andfollower_mini_tserver
variables are not even being initialized (not sure how our compiler checks missed that):Log fragment (have to look carefully for lines starting with
#0
,#1
, etc. to find the UBSAN stack trace):The text was updated successfully, but these errors were encountered: