Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG]: repeated keys in static_map after a sequence of insertions and deletions

Đang mở
#606 4 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@sleeepyjack đang làm issue này rồi.

Từ ngày 16/1/2025.

  • #659 của @sleeepyjack — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện chuỗi va chạm k1/k2 được mô tả cho cuco::static_map, sau đó kiểm tra các điểm vào để probing, xóa và chèn của nó. Công việc được hoàn tất khi các lần chèn và xóa lặp lại không bao giờ tạo ra các khóa trùng lặp khi truy xuất tất cả các khóa và giá trị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

P1: Should have topic: static_map topic: static_set type: bug
Is this a duplicate?
Type of Bug

Silent Failure

Describe the bug

I've been seeing repeated keys when I retrieve all the keys and values from cuco::staic_map. This is the explanation that I've found for it.

Assume that k1 and k2 map to the same position on the map and cause a collision. if we insert at k1, then insert at k2, remove k1 and then insert at k2 again, with the current probing schemes, there will be 2 instances of k2 at the map. That's because when we remove k1, an erased key sentinel will be left at it's position and when we want to insert k2 again, the insert function sees the erased key sentinel first and doesn't check any further to see if k2 is placed anywhere else. as a result, there will be 2 k2s at our map.

How to Reproduce
  1. Construct a map
  2. find 2 keys k1 and k2 that collide with each other
  3. insert something at k1
  4. insert something at k2
  5. remove k1
  6. insert something at k2
  7. retrieve all the keys at the map

Result: There will be 2 instances of k2 when we retrieve all the elements from the map.

Expected behavior

At any time there should be only one instance of k2 in the map.

Reproduction link

No response

Operating System

Ubuntu 22.04.4 LTS

nvidia-smi output

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.100 Driver Version: 550.100 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 Off | 00000000:01:00.0 Off | Off |
| 0% 49C P8 19W / 500W | 31MiB / 24564MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

NVCC version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:02:13_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0

Ngôn ngữ chính
Cuda
Star
671
Fork
122
Merge trung bình
4 ngày 19 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuCollections

Tất cả issue của NVIDIA/cuCollections

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.