diff --git a/CI/Dockerfile b/CI/Dockerfile index bcc169263411450953e9bcb68d71de80c00c8d3e..d953da9f26c9853f43969a37f389082086e471d8 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -114,7 +114,7 @@ RUN set -x && \ cd ~ && \ git clone https://gitee.com/src-openeuler/cmake.git && \ cd cmake && \ - git checkout origin/openEuler-20.03-LTS && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar -xzvf cmake-3.12.1.tar.gz && \ cd cmake-3.12.1 && \ ./bootstrap && make && make install && \ @@ -127,6 +127,7 @@ RUN set -x && \ cd ~ && \ git clone https://gitee.com/src-openeuler/protobuf.git && \ cd protobuf && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar -xzvf protobuf-all-3.9.0.tar.gz && \ cd protobuf-3.9.0 && \ ./autogen.sh && \ @@ -141,6 +142,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/c-ares.git && \ cd c-ares && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar -xzvf c-ares-1.15.0.tar.gz && \ cd c-ares-1.15.0 && \ autoreconf -if && \ @@ -168,6 +170,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/libevent.git && \ cd libevent && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar -xzvf libevent-2.1.11-stable.tar.gz && \ cd libevent-2.1.11-stable && \ ./autogen.sh && \ @@ -182,12 +185,11 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/libevhtp.git && \ cd libevhtp && \ - tar -xzvf libevhtp-1.2.18.tar.gz && \ - cd libevhtp-1.2.18 && \ - patch -p1 -F1 -s < ../0001-decrease-numbers-of-fd-for-shared-pipe-mode.patch && \ - patch -p1 -F1 -s < ../0002-evhtp-enable-dynamic-thread-pool.patch && \ - patch -p1 -F1 -s < ../0003-close-open-ssl.-we-do-NOT-use-it-in-lcrd.patch && \ - patch -p1 -F1 -s < ../0004-Use-shared-library-instead-static-one.patch && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ + tar -xzvf libevhtp-1.2.16.tar.gz && \ + cd libevhtp-1.2.16 && \ + patch -p1 -F1 -s < ../0001-support-dynamic-threads.patch && \ + patch -p1 -F1 -s < ../0002-close-openssl.patch && \ rm -rf build && \ mkdir build && \ cd build && \ @@ -202,8 +204,9 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/http-parser.git && \ cd http-parser && \ - tar -xzvf http-parser-2.9.4.tar.gz && \ - cd http-parser-2.9.4 && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ + tar -xzvf http-parser-2.9.2.tar.gz && \ + cd http-parser-2.9.2 && \ make -j CFLAGS="-Wno-error" && \ make CFLAGS="-Wno-error" install && \ ldconfig @@ -214,8 +217,10 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/libwebsockets.git && \ cd libwebsockets && \ - tar -xzvf libwebsockets-4.0.1.tar.gz && \ - cd libwebsockets-4.0.1 && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ + tar -xzvf libwebsockets-2.4.2.tar.gz && \ + cd libwebsockets-2.4.2 && \ + patch -p1 -F1 -s < ../libwebsockets-fix-coredump.patch && \ mkdir build && \ cd build && \ cmake -DLWS_WITH_SSL=0 -DLWS_MAX_SMP=32 -DCMAKE_BUILD_TYPE=Debug ../ && \ @@ -229,6 +234,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/gtest.git && \ cd gtest && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar xf release-1.8.1.tar.gz && \ cd googletest-release-1.8.1 && \ patch -p1 -F1 -s < ../gtest-1.8.1-null-pointer.patch && \ @@ -248,10 +254,10 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ cd ~ && \ git clone https://gitee.com/src-openeuler/libarchive.git && \ cd libarchive && \ + git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \ tar -zxvf libarchive-3.4.1.tar.gz && \ cd libarchive-3.4.1 && \ patch -p1 -F1 -s < ../libarchive-uninitialized-value.patch && \ - patch -p1 -F1 -s < ../CVE-2020-9308.patch && \ cd build && \ cmake -DCMAKE_USE_SYSTEM_LIBRARIES=ON ../ && \ make -j $(nproc) && \ diff --git a/CI/test_cases/helpers.bash b/CI/test_cases/helpers.bash index 3df8c38555f0739651f6eded0871dca83ed6d83c..cf0b96469ee5d5ffc3b2356818fcc86b89815ee8 100755 --- a/CI/test_cases/helpers.bash +++ b/CI/test_cases/helpers.bash @@ -95,6 +95,7 @@ function wait_isulad_running() { fi if [ $waitcnt -gt $maxcnt ];then echo "iSulad is not running after ${maxcnt}s" + tail $ISUALD_LOG return 1 fi waitcnt=$(($waitcnt+1)) diff --git a/src/daemon/executor/container_cb/execution_stream.c b/src/daemon/executor/container_cb/execution_stream.c index d74d7d8d4ce19fc28ed3d4a8fe0b29b741ea2cff..6aee35471dd0c6c7e92380e085d7deff6293606f 100644 --- a/src/daemon/executor/container_cb/execution_stream.c +++ b/src/daemon/executor/container_cb/execution_stream.c @@ -1462,6 +1462,7 @@ static void *follow_thread_func(void *arg) set_flag: *(farg->finish) = true; + DAEMON_CLEAR_ERRMSG(); return NULL; } diff --git a/src/daemon/modules/container/health_check/health_check.c b/src/daemon/modules/container/health_check/health_check.c index 176d0ae7b96be2b6bfdea7dfe5c4931a6b54fe89..0039f0eee075121e0fa45935053df31e90349a78 100644 --- a/src/daemon/modules/container/health_check/health_check.c +++ b/src/daemon/modules/container/health_check/health_check.c @@ -596,6 +596,7 @@ out: free_container_exec_request(container_req); free_container_exec_response(container_res); container_unref(cont); + DAEMON_CLEAR_ERRMSG(); return NULL; } @@ -728,6 +729,7 @@ out: free(container_id); container_id = NULL; container_unref(cont); + DAEMON_CLEAR_ERRMSG(); return NULL; } diff --git a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/wrapper_devmapper.c b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/wrapper_devmapper.c index 2df04d815792ea2bad036afe5bbdb4fdedb26f7e..02bd7e28a7a4ff561191d66f400d53fec16f885d 100644 --- a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/wrapper_devmapper.c +++ b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/wrapper_devmapper.c @@ -23,6 +23,7 @@ #include "wrapper_devmapper.h" #include "isula_libutils/log.h" #include "utils.h" +#include "err_msg.h" static bool g_dm_saw_busy = false; static bool g_dm_saw_exist = false; @@ -64,7 +65,6 @@ char *dev_strerror(int errnum) break; } return errmsg; - } struct dm_task *task_create(int type) @@ -342,12 +342,14 @@ static void *udev_wait_process(void *data) pthread_mutex_lock(&uwait->udev_mutex); uwait->state = ERR_UDEV_WAIT; pthread_mutex_unlock(&uwait->udev_mutex); + DAEMON_CLEAR_ERRMSG(); pthread_exit((void *)ERR_UDEV_WAIT); } pthread_mutex_lock(&uwait->udev_mutex); uwait->state = DEV_OK; pthread_mutex_unlock(&uwait->udev_mutex); + DAEMON_CLEAR_ERRMSG(); pthread_exit((void *)0); } diff --git a/src/daemon/modules/service/io_handler.c b/src/daemon/modules/service/io_handler.c index daeaeea919cc0448afb304cbdfafc330d387679f..f0f2711d4475d328a9b09d1b54de420b038356e2 100644 --- a/src/daemon/modules/service/io_handler.c +++ b/src/daemon/modules/service/io_handler.c @@ -34,6 +34,7 @@ #include "io_wrapper.h" #include "utils.h" #include "utils_file.h" +#include "err_msg.h" static char *create_single_fifo(const char *statepath, const char *subpath, const char *stdflag) { @@ -376,6 +377,7 @@ err: sem_post(&thread_arg->wait_sem); } io_copy_thread_cleanup(writers, thread_arg, infds, outfds, srcfds, len); + DAEMON_CLEAR_ERRMSG(); return NULL; } diff --git a/src/utils/http/CMakeLists.txt b/src/utils/http/CMakeLists.txt index 741cb34e4cc4cdd53028886893502abb2b61e063..1a47613a64dec1f2c6abef672226cf8fc2ed737c 100644 --- a/src/utils/http/CMakeLists.txt +++ b/src/utils/http/CMakeLists.txt @@ -5,7 +5,9 @@ if (NOT OPENSSL_VERIFY) list(REMOVE_ITEM http_client_srcs "${CMAKE_CURRENT_SOURCE_DIR}/certificate.c") endif() -add_library(libhttpclient ${LIBTYPE} ${http_client_srcs}) +add_library(libhttpclient ${LIBTYPE} ${http_client_srcs} + ${CMAKE_SOURCE_DIR}/src/utils/buffer/buffer.c + ) target_include_directories(libhttpclient PUBLIC ${CMAKE_SOURCE_DIR}/src/common