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

Assertion ... failed error when running compiled opensplat executable on Archlinux #144

Open
ctrl-alt-breathe opened this issue Jan 3, 2025 · 3 comments

Comments

@ctrl-alt-breathe
Copy link

I just installed the dependencies I need and built Opensplat without any errors, but when I go to run the executable, it returns:
opensplat: /usr/src/debug/hip-runtime/clr-rocm-6.2.4/rocclr/thread/monitor.hpp:180: bool amd::Monitor::tryLock(): Assertion thread != NULL && "cannot lock() from (null)"' failed.`
The path it's trying to look at also doesn't exist

@BlueCyro
Copy link

BlueCyro commented Jan 9, 2025

Hopefully I can push this past the "possible bug" sticker.

Specs

  • Operating System: EndeavourOS (arch-based)
  • CPU: AMD 7800x3D
  • GPU: AMD 7900XT
  • RAM: 16GB DDR5
  • Opensplat version: 1.1.4
  • Linux kernel: 6.12.8-arch1-1

Relevant error

I appear to get the same error message as the OP. Here's a snippet of my terminal when attempting to run opensplat with the help flag:

❯ ./opensplat --help
opensplat: /usr/src/debug/hip-runtime/clr-rocm-6.2.4/rocclr/thread/monitor.hpp:180: bool amd::Monitor::tryLock(): Assertion `thread != NULL && "cannot lock() from (null)"' failed.
zsh: IOT instruction (core dumped)  ./opensplat --help

As far as I can tell, I've followed the instructions for installation correctly. As I understand however, this library is expecting a more ubuntu-based build environment, and arch's packages may differ from the versions this library was built to expect.

My shot in the dark is that rocm has updated and the relevant method it's attempting to call was deprecated and removed in a later version.

Supplementary Information

Here's the CMake config log:

OpenSplat Version: 1.1.4 (git commit eba9476)
-- Using the multi-header code from /home/cyro/Documents/Coding/OpenSplat/build/_deps/nlohmann_json-src/include/
CMake Deprecation Warning at build/_deps/nanoflann-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- nanoflann version: 1.5.5
CMake Deprecation Warning at build/_deps/glm-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at build/_deps/glm-src/CMakeLists.txt:2 (cmake_policy):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- GLM: Version 1.0.1
-- GLM: Build with C++ features auto detection
Building PyTorch for GPU arch: gfx906
HIP VERSION: 6.2.41134
-- Caffe2: Header version is: 6.2.4

***** ROCm version from rocm_version.h ****

ROCM_VERSION_DEV: 6.2.4
ROCM_VERSION_DEV_MAJOR: 6
ROCM_VERSION_DEV_MINOR: 2
ROCM_VERSION_DEV_PATCH: 4
ROCM_VERSION_DEV_INT:   60204
HIP_VERSION_MAJOR: 6
HIP_VERSION_MINOR: 2
TORCH_HIP_VERSION: 602

***** Library versions from dpkg *****


***** Library versions from cmake find_package *****

hip VERSION: 6.2.41134
hsa-runtime64 VERSION: 1.14.0
amd_comgr VERSION: 2.8.0
rocrand VERSION: 3.1.1
hiprand VERSION: 2.11.1
rocblas VERSION: 4.2.4
hipblas VERSION: 2.2.0
hipblaslt VERSION: 0.8.0
miopen VERSION: 3.2.0
hipfft VERSION: 1.0.16
hipsparse VERSION: 3.1.1
rccl VERSION: 2.20.5
rocprim VERSION: 3.2.2
hipcub VERSION: 3.2.1
rocthrust VERSION: 3.1.1
hipsolver VERSION: 2.2.0
CMake Deprecation Warning at /opt/rocm/lib/cmake/hiprtc/hiprtc-config.cmake:21 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
  /home/cyro/Downloads/libtorch_rocm/share/cmake/Caffe2/public/LoadHIP.cmake:36 (find_package)
  /home/cyro/Downloads/libtorch_rocm/share/cmake/Caffe2/public/LoadHIP.cmake:168 (find_package_and_print_version)
  /home/cyro/Downloads/libtorch_rocm/share/cmake/Caffe2/Caffe2Config.cmake:74 (include)
  /home/cyro/Downloads/libtorch_rocm/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:164 (find_package)


hiprtc VERSION: 6.2.41134
HIP is using new type enums
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/cyro/Documents/Coding/OpenSplat/build

And here's the CMake build log:

[  3%] Building CXX object _deps/glm-build/glm/CMakeFiles/glm.dir/detail/glm.cpp.o
[  6%] Building CXX object CMakeFiles/gsplat_cpu.dir/rasterizer/gsplat-cpu/gsplat_cpu.cpp.o
[ 13%] Building HIP object CMakeFiles/gsplat.dir/rasterizer/gsplat/backward.cu.o
[ 13%] Building HIP object CMakeFiles/gsplat.dir/rasterizer/gsplat/forward.cu.o
[ 16%] Building HIP object CMakeFiles/gsplat.dir/rasterizer/gsplat/bindings.cu.o
[ 20%] Linking CXX static library libglm.a
[ 20%] Built target glm
[ 23%] Linking CXX static library libgsplat_cpu.a
[ 23%] Built target gsplat_cpu
[ 26%] Linking CXX static library libgsplat.a
[ 26%] Built target gsplat
[ 33%] Building CXX object CMakeFiles/simple_trainer.dir/cv_utils.cpp.o
[ 36%] Building CXX object CMakeFiles/opensplat.dir/nerfstudio.cpp.o
[ 43%] Building CXX object CMakeFiles/opensplat.dir/kdtree_tensor.cpp.o
[ 33%] Building CXX object CMakeFiles/opensplat.dir/model.cpp.o
[ 46%] Building CXX object CMakeFiles/simple_trainer.dir/project_gaussians.cpp.o
[ 40%] Building CXX object CMakeFiles/opensplat.dir/spherical_harmonics.cpp.o
[ 53%] Building CXX object CMakeFiles/opensplat.dir/utils.cpp.o
[ 53%] Building CXX object CMakeFiles/opensplat.dir/cv_utils.cpp.o
[ 56%] Building CXX object CMakeFiles/opensplat.dir/optim_scheduler.cpp.o
[ 60%] Building CXX object CMakeFiles/simple_trainer.dir/simple_trainer.cpp.o
[ 63%] Building CXX object CMakeFiles/opensplat.dir/point_io.cpp.o
[ 66%] Building CXX object CMakeFiles/opensplat.dir/opensplat.cpp.o
[ 70%] Building CXX object CMakeFiles/opensplat.dir/project_gaussians.cpp.o
[ 73%] Building CXX object CMakeFiles/simple_trainer.dir/rasterize_gaussians.cpp.o
[ 76%] Building CXX object CMakeFiles/opensplat.dir/rasterize_gaussians.cpp.o
[ 80%] Building CXX object CMakeFiles/opensplat.dir/ssim.cpp.o
[ 83%] Building CXX object CMakeFiles/opensplat.dir/opensfm.cpp.o
[ 86%] Building CXX object CMakeFiles/opensplat.dir/input_data.cpp.o
[ 93%] Building CXX object CMakeFiles/opensplat.dir/tensor_math.cpp.o
[ 93%] Building CXX object CMakeFiles/opensplat.dir/colmap.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[ 96%] Linking HIP executable opensplat
[100%] Linking HIP executable simple_trainer
[100%] Built target opensplat
[100%] Built target simple_trainer

@BlueCyro
Copy link

BlueCyro commented Jan 9, 2025

So an update, I believe I may have found the source file where the error is occurring.

It seems amd's monitor wants to make sure the thread it's on isn't null.

I don't really know C++ that well to know if maybe I'm just marveling at a common pattern, but it seems really unintuitive to think about code that's running on seemingly no thread. In any case, something is being fishy here, but I have no idea how I'd debug what's causing it.

@pierotofy
Copy link
Owner

pierotofy commented Jan 9, 2025

Thanks for sharing your findings! I would love to help fix this (I run Arch Linux also) but I don't have an AMD card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants