-
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
LLVM's libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register" #7092
Comments
mbautin
changed the title
libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register"
LLVM's libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register"
Jun 5, 2021
Also happened in initdb on AlmaLinux 8 with Clang 12, also in ASAN.
|
Potentially related fix: https://reviews.llvm.org/D66685 |
mbautin
added a commit
to yugabyte/yugabyte-db-thirdparty
that referenced
this issue
Oct 4, 2021
Picking up a fix for the libunwind x86_64 register issue in yugabyte/yugabyte-db#7092. Original fix in LLVM: https://reviews.llvm.org/D66685 The fix merged to LLVM as part of https://reviews.llvm.org/D107919 Merged to LLVM main branch as commit llvm/llvm-project@2f1ee56 The above fix has been cherry-picked into branches: - https://github.com/yugabyte/llvm-project/tree/11.1.0-yb : yugabyte/llvm-project@130bd22 - https://github.com/yugabyte/llvm-project/tree/12.0.1-yb : yugabyte/llvm-project@bdb147e - https://github.com/yugabyte/llvm-project/commits/13.0.0-yb : yugabyte/llvm-project@4b60e64 (not yet being built).
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
Repro:
./yb_build.sh --clang11 asan --cxx-test pg_libpq-test --gtest_filter PgLibPqTest.ConcurrentInsertTruncateForeignKey
The text was updated successfully, but these errors were encountered: