Transitioning from a `nvexec::stream_context` to another seg faults
Chưa có ai nhận issue này.
Đá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
- 42/100
Hướng nghiên cứu
Bắt đầu với reproducer được cung cấp và kiểm tra các đường đi nvexec::_strm::_continues_on và continuation_task_t được nêu trong cuda-gdb backtrace. Chạy bài kiểm thử với CUDA 12.8 bằng cuda-gdb, sau đó xác minh rằng việc chuyển đổi giữa các đối tượng stream_context khác nhau hoàn tất mà không xảy ra segfault và tạo ra kết quả 2.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm using c9d272a37754dc585cd40dbbf149e4aab4d3fe15.
I'm trying to transition from one nvexec::stream_context to another, but it seg faults.
Here is the reproducer:
TEST(try, reproducer)
{
::nvexec::stream_context stream_ctx_0{};
::nvexec::stream_context stream_ctx_1{};
auto snd = ::stdexec::schedule(stream_ctx_0.get_scheduler())
| ::stdexec::then([=] () -> int {
if (::nvexec::is_on_gpu())
return 1;
else
return 0;
})
| ::stdexec::continues_on(stream_ctx_1.get_scheduler())
| ::stdexec::then([=](const int val) -> int {
if (::nvexec::is_on_gpu() && val == 1)
return 2;
else
return 0;
});
const auto [result] = ::stdexec::sync_wait(std::move(snd)).value();
ASSERT_EQ(result, 2);
}
Note that if I change to ::stdexec::continues_on(stream_ctx_0.get_scheduler()) (i.e. transitioning from stream_ctx_0 to itself), it works fine.
Here is the backtrace I get from cuda-gdb:
[----------] 1 test from try
[ RUN ] try.reproducer
[New Thread 0x7fff995fe000 (LWP 33576)]
[New Thread 0x7fff98dfd000 (LWP 33577)]
[New Thread 0x7fff79fff000 (LWP 33578)]
[Thread 0x7fff98dfd000 (LWP 33577) exited]
Thread 21 "tests_nvexec_ad" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff995fe000 (LWP 33576)]
0x00007ffff274276b in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
(cuda-gdb) bt
#0 0x00007ffff274276b in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
#1 0x00007ffff284214e in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
#2 0x00007ffff27f97c9 in ?? () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
#3 0x00007ffff27df6f0 in cuMemFreeAsync () from /usr/lib/x86_64-linux-gnu/libcuda.so.1
#4 0x00007ffff2016540 in ?? () from /usr/local/cuda/lib64/libcudart.so.12
#5 0x00007ffff207e05f in cudaFreeAsync () from /usr/local/cuda/lib64/libcudart.so.12
#6 0x000055555556ecb1 in nvexec::_strm::continuation_task_t<nvexec::_strm::_continues_on::operation_state_t<nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}>, nvexec::_strm::_sched_from::receiver_t<nvexec::_strm::continues_on_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}> >, nvexec::_strm::_then::receiver_t<4ul, nvexec::_strm::propagate_receiver_t<nvexec::_strm::_sync_wait::receiver_t<nvexec::_strm::then_sender_t<nvexec::_strm::schedule_from_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::continues_on_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}> > >, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda(int)#1}> > >, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda(int)#1}> > >::__t::receiver_t, nvexec::variant_t<cuda::std::__4::tuple<nvexec::_strm::set_noop>, cuda::std::__4::tuple<stdexec::__rcvrs::set_value_t, int>, cuda::std::__4::tuple<stdexec::__rcvrs::set_error_t, cudaError>, cuda::std::__4::tuple<stdexec::__rcvrs::set_error_t, std::__exception_ptr::exception_ptr> > >::continuation_task_t(nvexec::_strm::_continues_on::operation_state_t<nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}>, nvexec::_strm::_sched_from::receiver_t<nvexec::_strm::continues_on_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}> >, nvexec::_strm::_then::receiver_t<4ul, nvexec::_strm::propagate_receiver_t<nvexec::_strm::_sync_wait::receiver_t<nvexec::_strm::then_sender_t<nvexec::_strm::schedule_from_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::continues_on_sender_t<nvexec::_strm::stream_scheduler, nvexec::_strm::then_sender_t<nvexec::_strm::stream_scheduler::sender_t, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda()#1}> > >, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda(int)#1}> > >, tests::nvexec::adaptors::try_reproducer_Test::TestBody()::{lambda(int)#1}> > >::__t::receiver_t, nvexec::variant_t<cuda::std::__4::tuple<nvexec::_strm::set_noop>, cuda::std::__4::tuple<stdexec::__rcvrs::set_value_t, int>, cuda::std::__4::tuple<stdexec::__rcvrs::set_error_t, cudaError>, cuda::std::__4::tuple<stdexec::__rcvrs::set_error_t, std::__exception_ptr::exception_ptr> >*, CUstream_st*, std::pmr::memory_resource*)::{lambda(nvexec::_strm::queue::task_base_t*)#2}::__invoke(nvexec::_strm::queue::task_base_t*) ()
I am on a AMPERE86 GPU with Cuda 12.8, compiling with:
Ubuntu clang version 20.1.2 (++20250331083337+bc65196c0919-1
exp120250331203353.96)
Any idea ? I am assuming that my code is legit, but I might be wrong as well. Thanks!
- Ngôn ngữ chính
- C++
- Star
- 2.4k
- Fork
- 270
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 43
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/stdexec
-
inline_scheduler's namespace-scope static_assert fails under nvcc (private nested __sender access) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
Tất cả issue của NVIDIA/stdexec
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
google/libultrahdr#485 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
godotengine/godot#123776 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ros2/common_interfaces#344 ·