Skip to content

Hang with AtomicMemory and single-thread #59030

@vchuravy

Description

@vchuravy

A smaller reproducer that deadlocks:

 julia -e "a=AtomicMemory{NTuple{3,Int64}}(undef,2);@atomic a[1] = (-1,-1,-1); @atomic a[2]=(-1,-1,-1);"

Originally posted by @bbrehm in #58993

This seems rather concerning, since it occurs on a single thread, it reproduced for me on 1.12-rc1.

julia> a=AtomicMemory{NTuple{3,Int64}}(undef,2)
2-element AtomicMemory{Tuple{Int64, Int64, Int64}}:
 (0, 0, 0)
 (0, 0, 0)

julia> @atomic a[2]=(-1,-1,-1)
(-1, -1, -1)

julia> @atomic a[1]=(-1,-1,-1)
(-1, -1, -1)

julia> @atomic a[2]=(-1,-1,-1)
^C^C^C^C^CWARNING: Force throwing a SIGINT

Metadata

Metadata

Assignees

No one assigned

    Labels

    atomicsbugIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwing

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions