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] undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv #1235

Open
3 tasks done
crisbodnar opened this issue Feb 25, 2025 · 8 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@crisbodnar
Copy link

Describe the bug

Getting the following error when using a CUDA machine and importing tensordict 0.7.* with torch 2.6.* installed using rye.

packages/tensordict/utils.py", line 46, in <module>
    from tensordict._C import (  # noqa: F401  # @manual=//pytorch/tensordict:_C
ImportError: /home/.venv/lib/python3.11/site-packages/tensordict/_C.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv

The issue does not appear in tensordict 0.6.* with torch 2.5.*

To Reproduce

Run the following on a CUDA machine with the versions above.

from tensordict import TensorDict as TD

Screenshots

If applicable, add screenshots to help explain your problem.

System info

Libraries were installed via rye.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)
@crisbodnar crisbodnar added the bug Something isn't working label Feb 25, 2025
@vmoens
Copy link
Contributor

vmoens commented Feb 25, 2025

Hello!
Are you sure you don't have another remnant version of tensordict in your venv (eg nightly or install from source)?
Can you share details about your machine such as OS and similar?

@crisbodnar
Copy link
Author

crisbodnar commented Feb 25, 2025

Hi! Yes. I've done a clean install and issue persists.

>>> print(numpy.__version__, sys.version, sys.platform, torch.__version__)
1.26.4 3.11.9 (main, Apr 15 2024, 18:24:23) [Clang 17.0.6 ] linux 2.6.0+cu124

And using python 3.11.

@vmoens
Copy link
Contributor

vmoens commented Feb 25, 2025

It's linux on a M* apple machine, right?

@crisbodnar
Copy link
Author

crisbodnar commented Feb 25, 2025

No. It's just a regular Linux machine from gcloud

uname -a
Linux 5.10.0-33-cloud-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64 GNU/Linux

Also I have been using this machine with many tensordict versions in the past and everything worked fine until the 0.7.x upgrade.

@crisbodnar
Copy link
Author

Here is the full error stack in case it helps

python
Python 3.11.9 (main, Apr 15 2024, 18:24:23) [Clang 17.0.6 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensordict
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/cbodnar/.venv/lib/python3.11/site-packages/tensordict/__init__.py", line 6, in <module>
    import tensordict._reductions
  File "/home/cbodnar/.venv/lib/python3.11/site-packages/tensordict/_reductions.py", line 11, in <module>
    from tensordict._lazy import LazyStackedTensorDict
  File "/home/cbodnar/.venv/lib/python3.11/site-packages/tensordict/_lazy.py", line 36, in <module>
    from tensordict.memmap import MemoryMappedTensor
  File "/home/cbodnar/.venv/lib/python3.11/site-packages/tensordict/memmap.py", line 22, in <module>
    from tensordict.utils import _shape, implement_for, IndexType, NESTED_TENSOR_ERR
  File "/home/cbodnar/venv/lib/python3.11/site-packages/tensordict/utils.py", line 46, in <module>
    from tensordict._C import (  # noqa: F401  # @manual=//pytorch/tensordict:_C
ImportError: /home/cbodnar/.venv/lib/python3.11/site-packages/tensordict/_C.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv

@vmoens
Copy link
Contributor

vmoens commented Feb 25, 2025

As the smoke tests ran successfully with the latest stable wheels, I wonder if this could be a distribution-specific issue?

Smoke tests: https://github.com/pytorch/tensordict/actions/runs/13388604579/job/37391051255

The binaries are generic and do not depend on cuda - this CI run is as good as any other.

cc @atalman

@atalman
Copy link

atalman commented Feb 25, 2025

hi @crisbodnar could you please run:

wget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

and post output to this issue ? It should help us to reproduce this problem.

@crisbodnar
Copy link
Author

PyTorch version: 2.6.0+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: Could not collect
CMake version: version 3.18.4
Libc version: glibc-2.31

Python version: 3.11.9 (main, Apr 15 2024, 18:24:23) [Clang 17.0.6 ] (64-bit runtime)
Python platform: Linux-5.10.0-33-cloud-amd64-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 12.3.107
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA A100-SXM4-80GB
GPU 1: NVIDIA A100-SXM4-80GB
GPU 2: NVIDIA A100-SXM4-80GB
GPU 3: NVIDIA A100-SXM4-80GB

Nvidia driver version: 550.90.07
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Byte Order:                           Little Endian
Address sizes:                        46 bits physical, 48 bits virtual
CPU(s):                               48
On-line CPU(s) list:                  0-47
Thread(s) per core:                   2
Core(s) per socket:                   24
Socket(s):                            1
NUMA node(s):                         1
Vendor ID:                            GenuineIntel
CPU family:                           6
Model:                                85
Model name:                           Intel(R) Xeon(R) CPU @ 2.20GHz
Stepping:                             7
CPU MHz:                              2200.224
BogoMIPS:                             4400.44
Hypervisor vendor:                    KVM
Virtualization type:                  full
L1d cache:                            768 KiB
L1i cache:                            768 KiB
L2 cache:                             24 MiB
L3 cache:                             38.5 MiB
NUMA node0 CPU(s):                    0-47
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni md_clear arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] numpy-groupies==0.11.2
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-cusparselt-cu12==0.6.2
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] torch==2.6.0
[pip3] torch_harmonics==0.7.4
[pip3] torchmetrics==1.6.1
[pip3] torchrl==0.7.1
[pip3] torchvision==0.21.0
[pip3] triton==3.2.0
[conda] numpy                     1.25.2                   pypi_0    pypi

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

3 participants