Skip to content
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

sentry-native crashpad build fails on Linux arm64: arm64 does not support xpaclri #1123

Closed
1 of 3 tasks
aokerholm-cobot opened this issue Jan 22, 2025 · 4 comments · Fixed by #1125
Closed
1 of 3 tasks

Comments

@aokerholm-cobot
Copy link

Description

sentry-native crashpad build fails on Linux arm64

/tmp/ccxvkBk7.s: Assembler messages:
/tmp/ccxvkBk7.s:27: Error: selected processor does not support `xpaclri'
make[2]: *** [crashpad_build/util/CMakeFiles/crashpad_util.dir/build.make:930: crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/pac_helper.cc.o] Error 1

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment

  • OS: Linux 5.10.104-tegra aarch64
  • Compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
  • CMake version and config: 3.30.2

Steps To Reproduce

cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSENTRY_BACKEND=crashpad
cmake --build build --parallel

Log output

$ cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSENTRY_BACKEND=crashpad
-- SENTRY_TRANSPORT=curl
-- SENTRY_BACKEND=crashpad
-- SENTRY_LIBRARY_TYPE=SHARED
-- SENTRY_SDK_NAME=
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11")
-- Configuring done (0.1s)
-- Generating done (0.1s)
-- Build files have been written to: ~/third-party/sentry-native/build
$ cmake --build build --parallel
[  0%] Building CXX object crashpad_build/tools/CMakeFiles/crashpad_tools.dir/tool_support.cc.o
[  0%] Building CXX object crashpad_build/compat/CMakeFiles/crashpad_compat.dir/linux/sys/mman_memfd_create.cc.o
[  0%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/files/file_path.cc.o
[  2%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/debug/alias.cc.o
[  2%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/logging.cc.o
[  2%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/process/memory.cc.o
[  2%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/files/scoped_file.cc.o
[  3%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/pattern.cc.o
[  3%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/strcat.cc.o
[  3%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/rand_util.cc.o
[  3%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/stringprintf.cc.o
[  3%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/string_number_conversions.cc.o
[  4%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/utf_string_conversions.cc.o
[  4%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/synchronization/lock.cc.o
[  4%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/third_party/icu/icu_utf.cc.o
[  5%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/threading/thread_local_storage.cc.o
[  5%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/utf_string_conversion_utils.cc.o
[  5%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/files/file_util_posix.cc.o
[  6%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/memory/page_size_posix.cc.o
[  6%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/posix/safe_strerror.cc.o
[  6%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/synchronization/condition_variable_posix.cc.o
[  6%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/synchronization/lock_impl_posix.cc.o
[  6%] Linking CXX static library libcrashpad_compat.a
[  7%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/threading/thread_local_storage_posix.cc.o
[  7%] Built target crashpad_compat
[  8%] Linking CXX static library libcrashpad_tools.a
[  8%] Built target crashpad_tools
[  8%] Linking CXX static library libmini_chromium.a
[  8%] Built target mini_chromium
[  8%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_helper.cc.o
[  9%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/delimited_file_reader.cc.o
[  9%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_io.cc.o
[  9%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_seeker.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_writer.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/initialization_state_dcheck.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/string_file.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/output_stream_file_writer.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/scoped_remove_file.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/lexing.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_reader.cc.o
[ 11%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/metrics.cc.o
[ 12%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/pdb_structures.cc.o
[ 12%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/random_string.cc.o
[ 12%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/range_set.cc.o
[ 13%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/reinterpret_bytes.cc.o
[ 13%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/scoped_forbid_return.cc.o
[ 13%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/time.cc.o
[ 13%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/uuid.cc.o
[ 14%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/zlib.cc.o
[ 14%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/http_body.cc.o
[ 14%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/http_body_gzip.cc.o
[ 15%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/http_multipart_builder.cc.o
[ 15%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/http_transport.cc.o
[ 15%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/url.cc.o
[ 16%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/numeric/checked_address_range.cc.o
[ 16%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/process/process_memory.cc.o
[ 16%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/process/process_memory_range.cc.o
[ 16%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stdlib/aligned_allocator.cc.o
[ 17%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stdlib/string_number_conversion.cc.o
[ 17%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stdlib/strlcpy.cc.o
[ 17%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stdlib/strnlen.cc.o
[ 18%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stream/base94_output_stream.cc.o
[ 18%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stream/file_encoder.cc.o
[ 18%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stream/file_output_stream.cc.o
[ 19%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stream/log_output_stream.cc.o
[ 19%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/string/split_string.cc.o
[ 19%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/stream/zlib_output_stream.cc.o
[ 19%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/thread/thread.cc.o
[ 20%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/thread/thread_log_messages.cc.o
[ 20%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/thread/worker_thread.cc.o
[ 20%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/directory_reader_posix.cc.o
[ 21%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/filesystem_posix.cc.o
[ 21%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/file/file_io_posix.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/close_stdio.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/clock_posix.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/scoped_dir.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/scoped_mmap.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/signals.cc.o
[ 22%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/thread/thread_posix.cc.o
[ 23%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/synchronization/semaphore_posix.cc.o
[ 23%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/close_multiple.cc.o
[ 24%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/drop_privileges.cc.o
[ 24%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/spawn_subprocess.cc.o
[ 24%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/posix/symbolic_constants_posix.cc.o
[ 24%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/auxiliary_vector.cc.o
[ 25%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/net/http_transport_libcurl.cc.o
[ 25%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/direct_ptrace_connection.cc.o
[ 25%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/exception_handler_client.cc.o
[ 26%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/exception_handler_protocol.cc.o
[ 26%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/memory_map.cc.o
[ 26%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/pac_helper.cc.o
[ 27%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/proc_stat_reader.cc.o
[ 27%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/ptrace_broker.cc.o
[ 27%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/proc_task_reader.cc.o
[ 28%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/ptrace_client.cc.o
[ 28%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/ptracer.cc.o
/tmp/ccxvkBk7.s: Assembler messages:
/tmp/ccxvkBk7.s:27: Error: selected processor does not support `xpaclri'
make[2]: *** [crashpad_build/util/CMakeFiles/crashpad_util.dir/build.make:930: crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/pac_helper.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 28%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/scoped_pr_set_ptracer.cc.o
[ 28%] Building CXX object crashpad_build/util/CMakeFiles/crashpad_util.dir/linux/scoped_pr_set_dumpable.cc.o
make[1]: *** [CMakeFiles/Makefile2:461: crashpad_build/util/CMakeFiles/crashpad_util.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@supervacuus
Copy link
Collaborator

I guess the assembler doesn't support/allow the mnemonic for PAC stripping (xpaclri). I can prep a PR for you to test.

@kahest
Copy link
Member

kahest commented Jan 23, 2025

related: getsentry/sentry#83907

@supervacuus
Copy link
Collaborator

supervacuus commented Jan 24, 2025

@aokerholm-cobot, you can try #1125 to check whether the fix works in your setup.

@aokerholm-cobot
Copy link
Author

Just tried it. It does work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants