-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Add tests for AArch64 version of ClickHouse to CI #15174
Copy link
Copy link
Closed
Labels
alternative buildbuildcomp-build-systemBuild system (CMake, compilation, platform builds).Build system (CMake, compilation, platform builds).comp-ci-infrastructureCI/CD pipelines (GitHub Actions, CI scripts, runners).CI/CD pipelines (GitHub Actions, CI scripts, runners).
Description
AArch64 version is built but not covered by tests.
But it's quite easy to run AArch64 binary on x86_64 Linux.
Step 1: install QEMU and support to run AArch64 binaries:
sudo apt install qemu-user-static binfmt-support
Step 2: Obtain the libc binaries from AArch64 Linux.
wget 'https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz?revision=2e88a73f-d233-4f96-b1f4-d8b36e9bb0b9&la=en' -O gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz
tar xJf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz --strip-components=1
And look into aarch64-linux-gnu/libc/ subdirectory.
Step 3: use the corresponding .so files to prepare the chroot environment:
mkdir root
pushd root
mkdir lib lib64 etc tmp root
cp ${BUILD_DIR}/programs/clickhouse .
cp ${SRC_DIR}/programs/server/{config,users}.xml .
cp lib/x86_64-linux-gnu/{libc.so.6,libdl.so.2,libm.so.6,libpthread.so.0,librt.so.1,libnss_dns.so.2,libresolv.so.2} lib
cp lib64/ld-linux-x86-64.so.2 lib64
cp /etc/resolv.conf ./etc
mkdir proc
sudo mount --bind /proc proc
Step 4: put clickhouse AArch64 binary there.
Step 5: run it in chroot:
sudo chroot . ./clickhouse server -- --mlock_executable false
As you see, some tweaks may be required.
Step 6: run tests:
./clickhouse-test --order asc --no-shard
Running 2296 stateless tests.
00001_select_1: [ OK ]
00002_system_numbers: [ OK ]
00003_reinterpret_as_string: [ OK ]
00004_shard_format_ast_and_remote_table: [ SKIPPED ] - no shard
00005_shard_format_ast_and_remote_table_lambda: [ SKIPPED ] - no shard
00006_extremes_and_subquery_from: [ OK ]
00007_array: [ OK ]
00008_array_join: [ OK ]
00009_array_join_subquery: [ OK ]
00010_big_array_join: [ OK ]
00011_array_join_alias: [ OK ]
00012_array_join_alias_2: [ OK ]
00013_create_table_with_arrays: [ OK ]
00014_select_from_table_with_nested: [ OK ]
00015_totals_having_constants: [ OK ]
00016_totals_having_constants: [ OK ]
00017_in_subquery_with_empty_result: [ OK ]
00018_distinct_in_subquery: [ OK ]
00019_shard_quantiles_totals_distributed: [ SKIPPED ] - no shard
00020_sorting_arrays: [ OK ]
00021_sorting_arrays: [ OK ]
00022_func_higher_order_and_constants: [ OK ]
00023_agg_select_agg_subquery: [ OK ]
00024_unused_array_join_in_subquery: [ OK ]
00025_implicitly_used_subquery_column: [ OK ]
00026_shard_something_distributed: [ SKIPPED ] - no shard
00027_distinct_and_order_by: [ OK ]
00027_simple_argMinArray: [ OK ]
00028_shard_big_agg_aj_distributed: [ SKIPPED ] - no shard
00029_test_zookeeper_optimize_exception: [ SKIPPED ] - no zookeeper
00030_alter_table: [ OK ]
00031_parser_number: [ OK ]
00032_fixed_string_to_string: [ OK ]
00033_fixed_string_to_string: [ OK ]
00034_fixed_string_to_number: [ OK ]
00035_function_array_return_type: [ OK ]
00036_array_element: [ OK ]
00037_totals_limit: [ OK ]
00038_totals_limit: [ OK ]
00039_inserts_through_http: [ OK ]
00040_array_enumerate_uniq: [ OK ]
00041_aggregation_remap: [ OK ]
00041_big_array_join: [ OK ]
00042_set: [ OK ]
00043_summing_empty_part: [ OK ]
00044_sorting_by_string_descending: [ OK ]
00045_sorting_by_fixed_string_descending: [ OK ]
00046_stored_aggregates_simple: [ OK ]
00047_stored_aggregates_complex: [ OK ]
00048_a_stored_aggregates_merge: [ FAIL ] - return code 32
[milovidov-desktop] 2020.09.22 22:03:50.951209 [ 30908 ] <Fatal> BaseDaemon: ########################################
[milovidov-desktop] 2020.09.22 22:03:50.953203 [ 30908 ] <Fatal> BaseDaemon: (version 20.10.1.4715 (official build), build id: BF78A7E6DB73182C) (from thread 30103) (query_id: d2d1bbb2-5451-4888-a025-7398306dac47) Received signal Segmentation fault (11)
[milovidov-desktop] 2020.09.22 22:03:50.954072 [ 30908 ] <Fatal> BaseDaemon: Address: 0x1 Address not mapped to object.
[milovidov-desktop] 2020.09.22 22:03:50.954442 [ 30908 ] <Fatal> BaseDaemon: Stack trace: 0x61aa158 0xa558788
[milovidov-desktop] 2020.09.22 22:03:50.961289 [ 30908 ] <Fatal> BaseDaemon: 0. /build/build_docker/../src/Common/StackTrace.cpp:291: StackTrace::StackTrace(ucontext_t const&) @ 0x61aa158 in /clickhouse
[milovidov-desktop] 2020.09.22 22:03:50.970543 [ 30908 ] <Fatal> BaseDaemon: 1. /build/build_docker/../src/Common/CurrentThread.h:81: signalHandler(int, siginfo_t*, void*) @ 0xa558788 in /clickhouse
Error on processing query: INSERT INTO stored_aggregates
SELECT
toDate(toUInt16(toDate('2014-06-01')) + intDiv(number, 100)) AS d,
uniqState(intDiv(number, 10)) AS Uniq
FROM
(
SELECT * FROM system.numbers LIMIT 1000
)
GROUP BY d;
As you see, we definitely need to have this run in CI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
alternative buildbuildcomp-build-systemBuild system (CMake, compilation, platform builds).Build system (CMake, compilation, platform builds).comp-ci-infrastructureCI/CD pipelines (GitHub Actions, CI scripts, runners).CI/CD pipelines (GitHub Actions, CI scripts, runners).