remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.15k stars 299 forks source link

Redroid build fail core dump with turbo boost CPU 12700kf #435

Closed felixguo closed 1 year ago

felixguo commented 1 year ago

Describe the bug Building redroid with docker. It worked on different machine with CPU 12400F,however, when I build with 12700kf. Compiling will randomly failed on compiling cpp file (fail on different file each time).

Environemtn

uname -a

Linux street 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

lscpu

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 20 On-line CPU(s) list: 0-19 Vendor ID: GenuineIntel Model name: 12th Gen Intel(R) Core(TM) i7-12700KF CPU family: 6 Model: 151 Thread(s) per core: 2 Core(s) per socket: 12 Socket(s): 1 Stepping: 2 CPU max MHz: 5000.0000 CPU min MHz: 800.0000 BogoMIPS: 7219.20 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_f ault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt shani xsaveopt xsavec xgetbv1 xsaves split lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x

collect debug logs

FAILED: out/soong/.intermediates/external/protobuf/libprotoc/linux_glibc_x86_64_static/obj/external/protobuf/src/google/protobuf/compiler/js/js_generator.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ -c  -Wa,--noexecstack -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -fstack-protector-strong -m64 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-info-for-profiling -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang  -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -Wno-psabi  -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/x86_64-linux/bin -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next   -Iexternal/protobuf/src -Iexternal/protobuf/android -Iexternal/protobuf/src -Iexternal/protobuf/config -Iexternal/protobuf/android -Iexternal/protobuf/src -Iexternal/protobuf -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Iexternal/zlib -Wall -Werror -Wno-unused-function -Wno-sign-compare -Wno-unused-parameter -Wno-sign-promo -DHAVE_ZLIB=1 -Wno-unused-const-variable -Wno-error=user-defined-warnings -std=gnu++17 -nostdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include  -Werror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -MD -MF out/soong/.intermediates/external/protobuf/libprotoc/linux_glibc_x86_64_static/obj/external/protobuf/src/google/protobuf/compiler/js/js_generator.o.d -o out/soong/.intermediates/external/protobuf/libprotoc/linux_glibc_x86_64_static/obj/external/protobuf/src/google/protobuf/compiler/js/js_generator.o external/protobuf/src/google/protobuf/compiler/js/js_generator.cc
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.  Program arguments: prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real -c -Wa,--noexecstack -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -fstack-protector-strong -m64 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-info-for-profiling -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -Wno-psabi -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/x86_64-linux/bin -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/protobuf/src -Iexternal/protobuf/android -Iexternal/protobuf/src -Iexternal/protobuf/config -Iexternal/protobuf/android -Iexternal/protobuf/src -Iexternal/protobuf -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Iexternal/zlib -Wall -Werror -Wno-unused-function -Wno-sign-compare -Wno-unused-parameter -Wno-sign-promo -DHAVE_ZLIB=1 -Wno-unused-const-variable -Wno-error=user-defined-warnings -std=gnu++17 -nostdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -Werror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -MD -MF out/soong/.intermediates/external/protobuf/libprotoc/linux_glibc_x86_64_static/obj/external/protobuf/src/google/protobuf/compiler/js/js_generator.o.d -o out/soong/.intermediates/external/protobuf/libprotoc/linux_glibc_x86_64_static/obj/external/protobuf/src/google/protobuf/compiler/js/js_generator.o external/protobuf/src/google/protobuf/compiler/js/js_generator.cc
1.  <eof> parser at end of file
2.  Optimizer
 #0 0x0000000003fba0e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x3fba0e8)
 #1 0x0000000003fb9f70 llvm::sys::RunSignalHandlers() (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x3fb9f70)
 #2 0x0000000003f86c53 (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x3f86c53)
 #3 0x0000000003f86e51 (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x3f86e51)
 #4 0x00007f4c266aa420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #5 0x00007f4c262ae012 realloc (/lib/x86_64-linux-gnu/libc.so.6+0x9b012)
 #6 0x000000000229609c llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x229609c)
 #7 0x0000000004cf1f23 (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x4cf1f23)
 #8 0x0000000002a4d832 clang::Sema::CheckSVEBuiltinFunctionCall(unsigned int, clang::CallExpr*) (prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++.real+0x2a4d832)
 #9 0x00007fff210fb300
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Android (7485623, based on r416183b1) clang version 12.0.7 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: prebuilts/clang/host/linux-x86/clang-r416183b1/bin
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /src/out/soong/.temp/js_generator-d62cc6.cpp
clang++: note: diagnostic msg: /src/out/soong/.temp/js_generator-d62cc6.sh
clang++: note: diagnostic msg:

********************
09:15:52 ninja failed with: exit status 1
zhouziyang commented 1 year ago

Should not related to this CPU. Run out of memory? Try decrease parallel jobs (-j).

felixguo commented 1 year ago

It's equiped with 64GB memory. Shouldn't be the issue. I will try to decrease the parallelism.

felixguo commented 1 year ago

Mem test found some hardware issue. Change the memory fix the problem. Sorry for the bother. Thank you very much for your time.