[Bug] Pulsar client can't have static storage duration
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
- 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
- distributed-systems
Hướng nghiên cứu
Bắt đầu với bản tái hiện tĩnh tối thiểu của pulsar::Client trên Ubuntu và kiểm tra pulsar::Client::~Client trong /usr/include/pulsar/Client.h, sau đó sử dụng gdb backtrace được cung cấp để theo dõi quá trình shutdown và hủy shared-pointer. Xác nhận rằng lỗi xảy ra khi quá trình hủy tĩnh chạy mà không có client.close(); hoàn thành khi chương trình thoát một cách bình thường mà không yêu cầu close rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I searched in the issues and found nothing similar.
Version
- pulsar client 2.9.0
- ubuntu linux
Minimal reproduce step
int main(int argc, char** argv)
{
static ::pulsar::Client client{"pulsar://0.0.0.0:6650"};
// don't call client.close();
return 0;
}
What did you expect to see?
The program should terminate gracefully, instead it seg faults. If I call client.close(), there is no issue.
What did you see instead?
The program seg faults with the following trace:
In gdb:
Program received signal SIGSEGV, Segmentation fault.
0x000000000000001e in ?? ()
(gdb) bt
#0 0x000000000000001e in ?? ()
#1 0x00007fb5adff4bef in ?? () from /lib/libpulsar.so.2.9.2.13
#2 0x00007fb5adff76e4 in ?? () from /lib/libpulsar.so.2.9.2.13
#3 0x00000000002e0873 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0xb1e400) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:155
#4 0x00000000002e082a in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x51b370 <main::_client+8>) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:730
#5 0x00000000002e0f29 in std::__shared_ptr<pulsar::ClientImpl, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x51b368 <main::_client>) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1169
#6 0x00000000002e0f05 in std::shared_ptr<pulsar::ClientImpl>::~shared_ptr (this=0x51b368 <main::_client>) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr.h:103
#7 0x00000000002dfde5 in pulsar::Client::~Client (this=0x51b368 <main::_client>) at /usr/include/pulsar/Client.h:46
#8 0x00007fb5ad93f8a7 in __run_exit_handlers (status=0, listp=0x7fb5adae5718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#9 0x00007fb5ad93fa60 in __GI_exit (status=<optimized out>) at exit.c:139
#10 0x00007fb5ad91d08a in __libc_start_main (main=0x2df330 <main(int, char**)>, argc=3, argv=0x7ffd9fae0c18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd9fae0c08) at ../csu/libc-start.c:342
#11 0x00000000002df26e in _start ()
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Ngôn ngữ chính
- C++
- Star
- 72
- Fork
- 93
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 apache/pulsar-client-cpp
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
apache/pulsar-client-cpp#623 ·
-
[Bug] MessageTest fails to build with GCC 15.3.0 and 16.2.1 (-Werror=stringop-truncation)Có thể đã có người làm @davlgd đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
apache/pulsar-client-cpp#621 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
apache/pulsar-client-cpp#620 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
apache/pulsar-client-cpp#619 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
apache/pulsar-client-cpp#618 ·
Tất cả issue của apache/pulsar-client-cpp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
meshcore-dev/MeshCore#3760 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
deepseek-ai/DeepGEMM-Ascend#29 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
EchoTools/nevr-runtime#2042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Download size and speed show scientific notation between 1000 and 1023 unitsCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
kiwix/kiwix-desktop#1570 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Device Request
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
dresden-elektronik/deconz-rest-plugin#8686 ·
Maintainer thường phản hồi trong vòng 1 ngày