Skip to content

Flaky test: test_list_of_dataclass_update_failures::test11 fails intermittently on arm64 #3923

@huaweil-nv

Description

@huaweil-nv

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

test11 in test_list_of_dataclass_update_failures (python/tests/kernel/test_assignments.py) fails intermittently on py3.11 + arm64 + cuda12.6 (Fedora 42 wheel validation). The failure is non-deterministic — it passes on re-run.
This test was previously wrapped in pytest.raises(AssertionError) because the struct argument marshaling was broken (hardcoded double type for all vector members). PR #3879 fixed the type mismatch, and the test was unwrapped. It now passes on all x86_64 configurations and most arm64 configurations, but fails intermittently on the combination above.

Steps to reproduce the bug

from dataclasses import dataclass
import cudaq

@dataclass(slots=True)
class MyTuple:
    l1: list[int]
    l2: list[int]

@cudaq.kernel
def test11(t: MyTuple, size: int) -> list[int]:
    l = [t.copy(deep=True) for _ in range(size)]
    l[0].l1 = [2]
    l[1].l2[0] = 3
    res = [0 for _ in range(4 * len(l))]
    for idx, item in enumerate(l):
        res[4 * idx] = len(item.l1)
        res[4 * idx + 1] = item.l1[0]
        res[4 * idx + 2] = len(item.l2)
        res[4 * idx + 3] = item.l2[0]
    return res

result = test11(MyTuple([1], [1]), 2)
assert result == [1, 2, 1, 1, 1, 1, 1, 3]

Expected behavior

PASS

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA-Q version: v0.13.0
  • Python version: 3.11
  • C++ compiler:
  • Operating system: Fedora 42
  • ** arch ** : arm64
  • CUDA: 12.6
    Other arm64 combinations (e.g. py3.13 + cuda13.0) are not affected.

Suggestions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions