-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Unable to build arm64 binaries (segfault during v8 bytecode_builtins_list_generator) #17100
Comments
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
I have encountered this problem, have you solved it? |
Nope, it's still segement fault... |
I'm building on aarch64 Linux on a Raspberry Pi and MacOS M1. I don't use Docker to build and I compile out a bunch of functionality I don't need include the WASM support that causes your segfault. From my ~/.bazelrc
More info at https://github.com/envoyproxy/envoy/tree/main/bazel#enabling-and-disabling-extensions This doesn't fix the segfault and is a work around however this approach will unblock you if you don't require WASM filters |
@moderation thanks, I did have success building without any wasm support for arm64 builds. But we are looking for build with wasm support... The last update is I have successfully built wee8 under huaweicloud Kunpeng. (still cannot build with AWS Graviton, very strange...) |
Any ideas for WASM support for aarch64 @lizan @PiotrSikora @mathetake ? |
It builds and passes all the tests on the CI on Linux-aarch64, so I have no idea what could be the issue. Perhaps too little memory on RPi? You could try building from #19275. Maybe that will work, or at least provide a more helpful error. |
@PiotrSikora It should:
However it produces:
|
It's interesting that on machine that's ok running
However on break one:
UPDATE: Using strace On node which is ok:
On node which fails:
|
@timonwong thanks for investigating!
It's not only about the build system, but those builds are quite different in terms of compiler flags, etc., so you never know. Could you see if debug build helps? Perhaps run On the
In #19275:
|
gdb does not help much, the bytecode_builtins_list_generator crash during startup, even before loading any :
What is more interesting is, after I compile the The build command: buildtools/linux-arm64/gn gen out/wee8 '--args= is_debug=true v8_symbol_level=2 v8_optimized_debug=false is_clang=false custom_toolchain="//build/toolchain/linux/unbundle:default" use_custom_libcxx=false use_custom_libcxx_for_host=true use_sysroot=false use_glib=false v8_expose_symbols=true is_component_build=false v8_enable_i18n_support=false v8_enable_gdbjit=false v8_use_external_startup_data=false v8_enable_shared_ro_heap=false target_cpu="arm64"'
# Just build the bytecode_builtins_list_generator binary
ninja -C out/wee8 bytecode_builtins_list_generator I'm wondering whether it's a page error |
Perhaps it's a PAGESIZE issue? on good host machine (debian/ubuntu):
on problem host machine (CentOS/RHEL):
Some issues maybe related after searching: |
My guess: The sections headers from the generated binary (using llvm+clang):
Generated However, for gcc builds:
As you can see, PT_LOAD(RW) - PT_LOAD(RE) do not overlap under 64k page size So it's ok for gcc builds... Generated binaries (gcc & llvm): |
It's basically caused by the gn (or ninja), which adds
Maybe switching to bazel will solve this problem, I'll try it later in a few days. |
Thanks for investigating! This flag is added by the existing |
Otherwise, v8 compilation failed with the symptoms in envoyproxy/envoy#17100
Otherwise, v8 compilation failed with the symptoms in envoyproxy/envoy#17100
Hello,
I'm encountering a strange error when building arm64(aarch64) binaries (It's worked for amd64 build though):
Using following command from https://github.com/envoyproxy/envoy/tree/main/ci#on-linux:
And during wee8 building, there is a strange error:
[130/1236] CXX obj/third_party/inspector_protocol/crdtp/cbor.o
[131/1236] LINK ./bytecode_builtins_list_generator
[132/1236] ACTION //:generate_bytecode_builtins_list(//build/toolchain/linux/unbundle:default)
FAILED: gen/builtins-generated/bytecodes-builtins-list.h
python ../../tools/run.py ./bytecode_builtins_list_generator gen/builtins-generated/bytecodes-builtins-list.h
Return code is -11
[133/1236] CXX obj/src/inspector/inspector/Console.o
[134/1236] CXX obj/third_party/inspector_protocol/crdtp/dispatch.o
[135/1236] CXX obj/src/inspector/inspector/Profiler.o
[136/1236] CXX obj/src/inspector/inspector/Schema.o
[137/1236] CXX obj/src/inspector/inspector/HeapProfiler.o
[138/1236] CXX obj/torque_base/implementation-visitor.o
[139/1236] CXX obj/src/inspector/inspector/Debugger.o
[140/1236] CXX obj/src/inspector/inspector/Runtime.o
Which is a segmentation fault without any additional messages.
Envoy Branch: release/v1.18
Machine Information:
AWS Graviton: c6g.2xlarge
The text was updated successfully, but these errors were encountered: