erobot opened a new issue, #479: URL: https://github.com/apache/pulsar-client-cpp/issues/479
### Search before asking - [x] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar. ### Version OS: linux 4.14 Pulsar: 3.0.7 ### Minimal reproduce step 1. Brokers become unstable like lookup timeout, topic fenced, etc. for a while. 2. After brokers recover, some clients can not recover and keep reconnecting producer with timeout. ### What did you expect to see? Clients can auto recover after brokers recover. ### What did you see instead? After brokers recover, some clients can not recover and keep reconnecting producer with timeout. ### Anything else? After debugging the problematic producer, I discovered the underlying connection is in an unusable state. The client sends ping and other commands to broker, but only receives ping command (not pong command) from broker. The current keepalive logic is too lenient – merely receiving ping commands can keep the connection alive. Debugging logs below show the connection only receives ping command (BaseCommand_Type_PING = 18) from the broker every 30 seconds: ``` (gdb) c Continuing. Tue Apr 8 20:41:36 CST 2025 Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing this=this@entry=0x7f8ff72fa000, incomingCmd=...) at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921 921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc 1: incomingCmd.type_ = 18 (gdb) Continuing. Tue Apr 8 20:42:05 CST 2025 Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing this=this@entry=0x7f8ff72fa000, incomingCmd=...) at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921 921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc 1: incomingCmd.type_ = 18 (gdb) c Continuing. Tue Apr 8 20:42:35 CST 2025 Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing this=this@entry=0x7f8ff72fa000, incomingCmd=...) at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921 921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc 1: incomingCmd.type_ = 18 (gdb) Continuing. Tue Apr 8 20:43:05 CST 2025 Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing this=this@entry=0x7f8ff72fa000, incomingCmd=...) at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921 921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc 1: incomingCmd.type_ = 18 (gdb) Continuing. Tue Apr 8 20:43:35 CST 2025 Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing this=this@entry=0x7f8ff72fa000, incomingCmd=...) at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921 921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc 1: incomingCmd.type_ = 18 (gdb) ``` ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
