Skip to content
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

[Bug] ImportError: dlopen: cannot load any more object with static TLS #1599

Open
2 tasks done
Q-M-E opened this issue Nov 2, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@Q-M-E
Copy link

Q-M-E commented Nov 2, 2024

Prerequisite

Environment

OrderedDict([('sys.platform', 'linux'), ('Python', '3.8.20 | packaged by conda-forge | (default, Sep 30 2024, 17:52:49) [GCC 13.3.0]'), ('CUDA available', True), ('MUSA available', False), ('numpy_random_seed', 2147483648), ('GPU 0,1,2,3', 'NVIDIA A40'), ('CUDA_HOME', '/usr/local/cuda-11.2'), ('NVCC', 'Cuda compilation tools, release 11.2, V11.2.152'), ('GCC', 'gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)'), ('PyTorch', '1.10.0+cu111'), ('PyTorch compiling details', 'PyTorch built with:\n - GCC 7.3\n - C++ Version: 201402\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX512\n - CUDA Runtime 11.1\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\n - CuDNN 8.0.5\n - Magma 2.5.2\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, \n'), ('TorchVision', '0.11.0+cu111'), ('MMEngine', '0.10.5')])

Reproduces the problem - code sample

File "./tools/train.py", line 6, in
from mmengine.runner import Runner
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/runner/init.py", line 2, in
from ._flexible_runner import FlexibleRunner
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/runner/_flexible_runner.py", line 20, in
from mmengine.hooks import Hook
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/hooks/init.py", line 9, in
from .naive_visualization_hook import NaiveVisualizationHook
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/hooks/naive_visualization_hook.py", line 5, in
import cv2
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen: cannot load any more object with static TLS

Reproduces the problem - command or script

CUDA_VISIBLE_DEVICES=0 python ./tools/train.py configs/prfpn/prfpn_r50_4xb2-48k_pascal_voc12-512x512.py --work-dir ./weight/prfpn_r50v1c_voc_prfpn_without_offset_prfpn_headv4_with_offset_withfcn_without_crb_squeeze4-bottom-up-80k/

Reproduces the problem - error message

Traceback (most recent call last):
File "./tools/train.py", line 6, in
from mmengine.runner import Runner
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/runner/init.py", line 2, in
from ._flexible_runner import FlexibleRunner
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/runner/_flexible_runner.py", line 20, in
from mmengine.hooks import Hook
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/hooks/init.py", line 9, in
from .naive_visualization_hook import NaiveVisualizationHook
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/mmengine/hooks/naive_visualization_hook.py", line 5, in
import cv2
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/data1/leichaoran/.conda/envs/mmlab/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen: cannot load any more object with static TLS

Additional information

No response

@Q-M-E Q-M-E added the bug Something isn't working label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant