onnxruntime: [Linux] CApiTest.dim_param fails with mutex error
Describe the bug trying to bump package version for nixpkgs to 1.1.0 when I ran into this error when running the ctest suite:
[ RUN ] CApiTest.dim_param
onnxruntime_shared_lib_test: ../nptl/pthread_mutex_lock.c:142: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
7/7 Test #2: onnxruntime_test_all ................................................ Passed 16.45 sec
86% tests passed, 1 tests failed out of 7
Total Test time (real) = 16.46 sec
The following tests FAILED:
7 - onnxruntime_shared_lib_test (Child aborted)
Errors while running CTest
likely to be incorrect usage of a mutex lock.
Urgency
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): NixOS
- ONNX Runtime installed from (source or binary): source
- ONNX Runtime version: 1.1.0
- Python version: Python 3.7.6
- Visual Studio version (if applicable): N/A
- GCC/Compiler version (if compiling from source): gcc (GCC) 9.2.0
- CUDA/cuDNN version: N/A
- GPU model and memory: N/A
Cmake configure step details
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_LOCALEDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/share/doc/ -DCMAKE_INSTALL_INFODIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/vw6ndlplgw6xira45wzggahzmq25kdkf-onnxruntime-1.1.0-dev/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/vw6ndlplgw6xira45wzggahzmq25kdkf-onnxruntime-1.1.0-dev/include -DCMAKE_INSTALL_SBINDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/5nxyf0yn836j0acm82cz3g50d4glk5df-binutils-2.31.1/bin/strip -DCMAKE_RANLIB=/nix/store/5nxyf0yn836j0acm82cz3g50d4glk5df-binutils-2.31.1/bin/ranlib -DCMAKE_AR=/nix/store/5nxyf0yn836j0acm82cz3g50d4glk5df-binutils-2.31.1/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/1m7mmscxhr9cfvfb2qvkgv9masxpm273-onnxruntime-1.1.0 -Donnxruntime_USE_OPENMP=ON -Donnxruntime_BUILD_SHARED_LIB=ON -Donnxruntime_ENABLE_LTO=ON
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /nix/store/a9hbzlkdfvpr4r8mjwcxcda9smjp5v1i-gcc-wrapper-9.2.0/bin/gcc
-- Check for working C compiler: /nix/store/a9hbzlkdfvpr4r8mjwcxcda9smjp5v1i-gcc-wrapper-9.2.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/a9hbzlkdfvpr4r8mjwcxcda9smjp5v1i-gcc-wrapper-9.2.0/bin/g++
-- Check for working CXX compiler: /nix/store/a9hbzlkdfvpr4r8mjwcxcda9smjp5v1i-gcc-wrapper-9.2.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Found PythonInterp: /nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3 (found suitable version "3.7.6", minimum required is "3.4")
-- Found PythonLibs: /nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/lib/libpython3.7m.so (found suitable version "3.7.6", minimum required is "3.4")
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
# date: USE_SYSTEM_TZ_DB ON
# date: USE_TZ_DB_IN_DOT OFF
# date: BUILD_SHARED_LIBS OFF
# date: ENABLE_DATE_TESTING OFF
-- Performing Test HAS_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAS_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAS_UNUSED_PARAMETER
-- Performing Test HAS_UNUSED_PARAMETER - Success
-- Performing Test HAS_CAST_FUNCTION_TYPE
-- Performing Test HAS_CAST_FUNCTION_TYPE - Success
-- Performing Test HAS_PARENTHESES
-- Performing Test HAS_PARENTHESES - Success
-- Performing Test HAS_USELESS_CAST
-- Performing Test HAS_USELESS_CAST - Success
-- Performing Test HAS_NONNULL_COMPARE
-- Performing Test HAS_NONNULL_COMPARE - Success
-- Performing Test HAS_TAUTOLOGICAL_POINTER_COMPARE
-- Performing Test HAS_TAUTOLOGICAL_POINTER_COMPARE - Failed
-- Performing Test HAS_CATCH_VALUE
-- Performing Test HAS_CATCH_VALUE - Success
-- Performing Test HAS_MISSING_BRACES
-- Performing Test HAS_MISSING_BRACES - Success
-- Performing Test HAS_IGNORED_ATTRIBUTES
-- Performing Test HAS_IGNORED_ATTRIBUTES - Success
-- Performing Test HAS_DEPRECATED_COPY
-- Performing Test HAS_DEPRECATED_COPY - Success
-- Performing Test HAS_CLASS_MEMACCESS
-- Performing Test HAS_CLASS_MEMACCESS - Success
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
enabling optimizations for gemmlowp
-- The ASM compiler identification is GNU
-- Found assembler: /nix/store/a9hbzlkdfvpr4r8mjwcxcda9smjp5v1i-gcc-wrapper-9.2.0/bin/gcc
-- Performing Test HAS_AVX512F
-- Performing Test HAS_AVX512F - Success
-- Performing Test AVX512F_COMPILES
-- Performing Test AVX512F_COMPILES - Success
-- Performing Test HAS_AVX512BW
-- Performing Test HAS_AVX512BW - Success
-- Performing Test AVX512BW_COMPILES
-- Performing Test AVX512BW_COMPILES - Success
-- Found PythonInterp: /nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3 (found version "3.7.6")
-- Configuring done
-- Generating done
To Reproduce
Either: get a linux system with gcc==9.2.0, python3.7.6, and cmake. Then use the cmake flags listed in the system info step
OR:
git clone git@github.com:jonringer/nixpkgs.git
cd nixpkgs
git checkout bump-onnxruntime
nix-build -A onnxruntime
Expected behavior builds correctly
Screenshots
Additional context
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (7 by maintainers)
Hi @jonringer , I just tested it again, it seems fine.
onnxruntime version 1.3.1 nixpkg version: dc1c3f3203b455f1abb62880ca925f1ccd1e9e2c
As for now, I suggest you turn off onnxruntime_ENABLE_LTO. I believe it will solve the issue. I’ll fix the bug (if it’s possible), but as you know, 1.1.0 is already released, I can’t change it. I can only fix it bug in master and wait for the next release.
I can reproduce the bug without using nix.