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] [JNI] CudaTest.testCudaException will not throw cudaErrorInvalidValue expectedly under certain environment #15705

Closed
sperlingxx opened this issue May 9, 2024 · 0 comments · Fixed by #15706
Labels
bug Something isn't working

Comments

@sperlingxx
Copy link
Contributor

Describe the bug
For the test case CudaTest.testCudaException:

  assertThrows(CudaException.class, () -> {
        try {
          Cuda.memset(Long.MAX_VALUE, (byte) 0, 1024);
        } catch (CudaFatalException ignored) {
        } catch (CudaException ex) {
          assertEquals(CudaException.CudaError.cudaErrorInvalidValue, ex.getCudaError());
          throw ex;
        }
      }
  );

It seems the CUDA API cudaMemsetAsync will not throw cudaErrorInvalidValue under certain environment (like ARM arch). Therefore, this test case might be failed under certain environment. Due to the instability, the test is skipped if SANITIZER is ON for now.

@sperlingxx sperlingxx added the bug Something isn't working label May 9, 2024
rapids-bot bot pushed a commit that referenced this issue May 10, 2024
…daError under aarch64 (#15706)

Fix #15705

1. Replacing  `Cuda.memset(Long.MAX_VALUE, (byte) 0, 1024)` with `Cuda.freePinned(-1L)`, the previous one throws fatal CUDAError `cudaErrorIllegalAddress`  instead of nonFatal CUDAError `cudaErrorInvalidValue` under aarch64, while the later one throwing the correct kind of error. 

2. Enable the test case when Sanitizer is ON

Authors:
  - Alfred Xu (https://github.com/sperlingxx)

Approvers:
  - Tim Liu (https://github.com/NvTimLiu)
  - Jason Lowe (https://github.com/jlowe)

URL: #15706
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
Status: Done
1 participant