From c6eeb2e4f029a190db2d16b52d5d3ea4f3d5fdd4 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Wed, 1 Feb 2023 15:45:51 +1100 Subject: Import wiredtiger: 4dff67dd815aeaecb3f2987afa9bb63766b8c888 from branch mongodb-6.0 ref: d31db8f8be..4dff67dd81 for: 6.0.5 WT-8981 Enable evergreen testing for RHEL8 on PPC --- src/third_party/wiredtiger/dist/s_string.ok | 1 + src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/os_posix/os_fs.c | 11 ++++- src/third_party/wiredtiger/test/evergreen.yml | 53 ++++++++++++++++++++----- 4 files changed, 55 insertions(+), 12 deletions(-) diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok index da396a97162..94998e091e2 100644 --- a/src/third_party/wiredtiger/dist/s_string.ok +++ b/src/third_party/wiredtiger/dist/s_string.ok @@ -411,6 +411,7 @@ STEC STL STR STRUCT +SYSCALL Scalability Scalable Sedgewick diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 099e6426b82..9bbb8d4c316 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-6.0", - "commit": "d31db8f8be34e8ec6b584a1602eee7710243d085" + "commit": "4dff67dd815aeaecb3f2987afa9bb63766b8c888" } diff --git a/src/third_party/wiredtiger/src/os_posix/os_fs.c b/src/third_party/wiredtiger/src/os_posix/os_fs.c index 1ae6259e5d8..bb5a80644fb 100644 --- a/src/third_party/wiredtiger/src/os_posix/os_fs.c +++ b/src/third_party/wiredtiger/src/os_posix/os_fs.c @@ -401,6 +401,7 @@ static int __posix_file_read( WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session, wt_off_t offset, size_t len, void *buf) { + WT_DECL_RET; WT_FILE_HANDLE_POSIX *pfh; WT_SESSION_IMPL *session; size_t chunk; @@ -420,10 +421,16 @@ __posix_file_read( len >= S2C(session)->buffer_alignment && len % S2C(session)->buffer_alignment == 0)); /* Break reads larger than 1GB into 1GB chunks. */ + nr = 0; for (addr = buf; len > 0; addr += nr, len -= (size_t)nr, offset += nr) { chunk = WT_MIN(len, WT_GIGABYTE); - if ((nr = pread(pfh->fd, addr, chunk, offset)) <= 0) - WT_RET_MSG(session, nr == 0 ? WT_ERROR : __wt_errno(), + /* + * The WT_SYSCALL_RETRY macro expects 0 for success. pread returns > 0 when successful, + * adjust the return value. + */ + WT_SYSCALL_RETRY((nr = pread(pfh->fd, addr, chunk, offset)) <= 0 ? -1 : 0, ret); + if (ret != 0) + WT_RET_MSG(session, nr == 0 ? WT_ERROR : ret, "%s: handle-read: pread: failed to read %" WT_SIZET_FMT " bytes at offset %" PRIuMAX, file_handle->name, chunk, (uintmax_t)offset); } diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index e68e1195f3d..74fc03cc3e9 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -682,6 +682,22 @@ variables: vars: format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 360 + - &format-stress-sanitizer-ppc-test + exec_timeout_secs: 25200 + commands: + - func: "get project" + - func: "compile wiredtiger" + vars: + posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v4_clang.cmake -DCMAKE_BUILD_TYPE=ASan -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 + - func: "format test script" + vars: + # Always disable mmap for PPC due to issues on variant setup. + # See https://bugzilla.redhat.com/show_bug.cgi?id=1686261#c10 for the potential cause. + format_test_script_args: -t 360 -- -C "mmap=false,mmap_all=false" + test_env_vars: + ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1" + ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer + - &format-stress-sanitizer-test exec_timeout_secs: 25200 commands: @@ -2644,9 +2660,8 @@ tasks: set -o verbose for i in {1..10}; do ${test_env_vars|} ${python_binary|python3} split_stress.py; done - # The task name is ppc-zseries because this task will be used in both buildVariants - - name: format-stress-ppc-zseries-test - tags: ["stress-test-ppc-1", "stress-test-zseries-1"] + - name: format-stress-zseries-test + tags: ["stress-test-zseries-1"] # Set 2.5 hours timeout (60 * 60 * 2.5) exec_timeout_secs: 9000 commands: @@ -2657,6 +2672,22 @@ tasks: #run for 2 hours ( 2 * 60 = 120 minutes), use default config format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 120 + - name: format-stress-ppc-test + tags: ["stress-test-ppc-1"] + # Set 2.5 hours timeout (60 * 60 * 2.5) + exec_timeout_secs: 9000 + commands: + - func: "get project" + - func: "compile wiredtiger" + vars: + posix_configure_flags: -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 + - func: "format test script" + vars: + #run for 2 hours ( 2 * 60 = 120 minutes), use default config + # Always disable mmap for PPC due to issues on variant setup. + # See https://bugzilla.redhat.com/show_bug.cgi?id=1686261#c10 for the potential cause. + format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 120 -- -C "mmap=false,mmap_all=false" + - <<: *format-stress-test name: format-stress-test-1 tags: ["stress-test-1"] @@ -2669,12 +2700,18 @@ tasks: - <<: *format-stress-test name: format-stress-test-4 tags: ["stress-test-4"] + - <<: *format-stress-sanitizer-ppc-test + name: format-stress-sanitizer-ppc-test-1 + tags: ["stress-test-ppc-1"] + - <<: *format-stress-sanitizer-ppc-test + name: format-stress-sanitizer-ppc-test-2 + tags: ["stress-test-ppc-2"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-1 - tags: ["stress-test-1", "stress-test-ppc-1"] + tags: ["stress-test-sanitizer-1"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-2 - tags: ["stress-test-2", "stress-test-ppc-2"] + tags: ["stress-test-sanitizer-2"] - <<: *format-stress-sanitizer-test name: format-stress-sanitizer-test-3 tags: ["stress-test-3"] @@ -4162,8 +4199,6 @@ buildvariants: - name: rhel8-ppc display_name: "~ RHEL8 PPC" - # FIXME-WT-8981 - activate: false run_on: - rhel81-power8-small batchtime: 120 # 2 hours @@ -4182,8 +4217,8 @@ buildvariants: -DENABLE_STRICT=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/LOCAL_INSTALL python_binary: '/opt/mongodbtoolchain/v4/bin/python3' - # Use half number of vCPU to avoid OOM kill failure - smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 2 | bc) + # Use quarter of the vCPUs to avoid OOM kill failure and disk issues on this variant. + smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 4 | bc) cmake_generator: Ninja make_command: ninja tasks: -- cgit v1.2.1