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

Illegal memory access for SparseIndices.Sort with TBB backend #391

Closed
pca006132 opened this issue Mar 24, 2023 · 4 comments
Closed

Illegal memory access for SparseIndices.Sort with TBB backend #391

pca006132 opened this issue Mar 24, 2023 · 4 comments
Milestone

Comments

@pca006132
Copy link
Collaborator

The sort function will perform illegal memory access when dealing with large meshes and with TBB backend enabled. This can be checked by enabling the address sanitizer.

Build instruction:

mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DMANIFOLD_PAR="TBB" -DCMAKE_CXX_FLAGS="-g -fsanitize=address" -DMANIFOLD_USE_CUDA=off -DMANIFOLD_EXPORT=on ..

Run the following test:

TEST(Boolean, LargeSpheres) {
  auto a = Manifold::Sphere(100, 2000);
  auto b = a + a.Translate({30, 0, 0});
  a.GetMesh();
}
@pca006132
Copy link
Collaborator Author

Note that thrust have quite a lot of undefined behavior if you enable the UB sanitizer...
Not sure if this is related to it. I will find some time to try to reproduce it with a pure thrust program.

@pca006132
Copy link
Collaborator Author

Thinking about this, maybe we should use single threaded sort for now until the root cause of this is fixed.

@elalish
Copy link
Owner

elalish commented Apr 3, 2023

Perhaps so; any luck with the Thrust-only repro? That sounds like a bug Nvidia should take pretty seriously.

@pca006132
Copy link
Collaborator Author

Ah, it seems that the issue disappeared after updating thrust. Forgot to rerun the test after thrust update. Closing for now.

@elalish elalish added this to the v2.2 milestone May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants