apache / apache/pulsar-client-cpp

[Bug] getPartitionsForTopic Cause Signal 11 SIGSEGV (Segmentation Fault)

Open
#454 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
71
Forks
90
Avg merge
2h 33m
Merged PRs (30d)
3

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.

### Version

CPP Client: 3.6.0
pulsar broker: 3.0.4

### Minimal reproduce step

1、create pulsar client
2、invoke client getPartitionsForTopic to get partition

### What did you expect to see?

can get partition correctlly

### What did you see instead?

Signal ID:11 Pid:920
Time:1731978465
/opt/lib/libpulsar.so(_ZN6pulsar6Client26getPartitionsForTopicAsyncERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvNS_6ResultERKSt6vectorIS6_SaIS6_EEEE+0x10)[0xffff17ac16d8]
/opt/lib/libpulsar.so(_ZN6pulsar6Client21getPartitionsForTopicERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS6_SaIS6_EE+0xd8)[0xffff17ac5df0]

### Anything else?

This issue does not occur every time; it happens only with a certain probability.

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported intermittent crash with the C++ client 3.6.0 and broker 3.0.4, using Client::getPartitionsForTopic and getPartitionsForTopicAsync as the entry points. Inspect the failure at the stack-trace locations and compare repeated calls with different topics. Done means partition lookup consistently returns the correct result without SIGSEGV.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.