gpu_ptr_encoding test fails during make test_rust but passes 5/5 times in isolation — test-ordering or GPU-state-pollution issue
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- testing-qa
Research direction
Start with qdp/qdp-core/tests/gpu_ptr_encoding.rs:795 and reproduce the failure with make test_rust. Run the gpu_ptr_encoding test with --test-threads=1, then use --skip to bisect for state pollution while checking the non-default-stream setup and synchronization described in the issue. Done means the full Rust test suite passes reliably and the isolation-only failure is explained and resolved.
Written by the indexing model from the issue text.
Description
Summary
test_encode_from_gpu_ptr_f32_with_stream_non_default_success (in qdp/qdp-core/tests/gpu_ptr_encoding.rs:795) fails reproducibly during full make test_rust runs, but passes 5/5 times when run in isolation. Suggests a test-isolation issue (GPU state pollution from preceding tests, or a synchronization gap exposed only under specific test ordering) rather than a defect in the f32-non-default-stream code path itself.
Failure observed
thread 'test_encode_from_gpu_ptr_f32_with_stream_non_default_success' panicked at
qdp-core/tests/gpu_ptr_encoding.rs:795:14:
encode_from_gpu_ptr_f32_with_stream (non-default stream):
InvalidInput("Input data (f32) has zero or non-finite norm
(contains NaN, Inf, or all zeros)")
The other 63 tests in gpu_ptr_encoding (including test_encode_from_gpu_ptr_f32_with_stream_success on the default stream) pass.
Reproducer
git checkout mahout-qumat-0.6.0-RC2
export CXX=g++-13 QDP_CUDA_ARCH_LIST=61+PTX
# Fails consistently as part of the full Rust suite
make test_rust # 1 failure: test_encode_from_gpu_ptr_f32_with_stream_non_default_success
# Passes consistently in isolation
cd qdp
for i in 1 2 3 4 5; do
cargo test -p qdp-core --test gpu_ptr_encoding -- \
test_encode_from_gpu_ptr_f32_with_stream_non_default_success --exact 2>&1 | tail -1
done
# test result: ok. 1 passed; 0 failed (×5)
Likely causes (worth investigating in order)
- Test ordering / state pollution. A preceding test in
gpu_ptr_encoding(or in another test binary linked into the same process if cargo-test reuses one) leaves GPU memory or stream state in a configuration that breaks the non-default-stream input setup. Try runninggpu_ptr_encodingwith--test-threads=1and bisecting via--skipto find the polluting test. - Missing synchronization in the test harness. The test creates an input buffer on a user-provided stream, then calls the encoder which reads the norm — possibly on a different stream — without a
cudaStreamSynchronizeor event ordering between the two. Under high GPU load (full suite), the encoder reads before the buffer is populated. - Encoder bug with non-default stream. Less likely given isolation passes, but if (1) and (2) rule out, the encoder may be assuming default-stream semantics in some f32 path.
Environment
- OS: Ubuntu 24.04
- CUDA Toolkit: 12.4
- GPU: NVIDIA GeForce GTX 1060 with Max-Q Design (sm_61)
- Rust: stable, compiled with
CXX=g++-13(CUDA 12.4 rejects gcc 14) - Arch list:
QDP_CUDA_ARCH_LIST=61+PTX
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 1k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 7
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/mahout
-
[Bug] Amazon Braket get_final_state_vector() changes the circuit, so execute_circuit() fails afterwardsPossibly taken @Howardisme claimed this 48 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
apache/mahout#1538 · 1 comment ·
Maintainers usually reply within 2 days
-
[Bug] Reusing a parameter name on two gates fails on Qiskit only (name conflict adding parameter)Possibly taken @Imad2702 claimed this 50 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/mahout#1509 · 2 comments ·
Maintainers usually reply within 2 days
-
[Bug] Cirq backend ignores the initialized simulator and creates its own cirq.Simulator()Possibly taken @Howardisme claimed this 49 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
apache/mahout#1508 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug] Unknown backend_name leaks ModuleNotFoundError instead of a clear ValueErrorPossibly taken @Asterisk-Hunter claimed this 38 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/mahout#1506 · 5 comments ·
Maintainers usually reply within 2 days
-
bug docs enhancement question
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 2 days
Similar issues
-
chat compiler P1
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
HerringtonDarkholme/hd-lang#2793 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
security-advisory
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MinBZK/regelrecht#2173 ·
-
ci
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jonathanong/no-mistakes#5804 ·
-
triage: failed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxc-project/tsrs#1277 · 1 comment ·
Maintainers usually reply within 1 day