You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mrmomr40 (via GitHub)" <gi...@apache.org> on 2023/09/18 07:41:21 UTC

[GitHub] [pulsar] mrmomr40 opened a new issue, #21199: [Bug] Subscription consumption stuck on

mrmomr40 opened a new issue, #21199:
URL: https://github.com/apache/pulsar/issues/21199

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   Pulsar broker: 2.8.4
   Java Pulsar client: 2.8.4
   
   ### Minimal reproduce step
   
   Non-partitioned topic. Batching is disabled on both producer and consumer. 5 subscriptions, each has 12 consumers.
   
   One consumer of one subscription fails to process a message and doesn't ack it.
   On a fail, I give the consumer a minute more to try to process other messages and ack them, if they are processed successfully. After a minute, I recreate the consumer and try to reprocess the messages, which would help if the error was transient.
   
   ### What did you expect to see?
   
   I expected to see the subscription backlog consumed further by the consumer with 1 failed message and by the other 11 consumers.
   
   ### What did you see instead?
   
   If a consumer fails to process one message, processing of all other messages with other keys is also stalled.
   Including the other 11 consumers of the subscription.
   All the other subscriptions and their consumers of the topic continue processing as expected.
   
   As a symptom, I see the stuck subscription has _"waitingReadOp" : false_ and _"subscriptionHavePendingRead" : false_, while the other subscription has these fields at _true_.
   
   [stats.txt](https://github.com/apache/pulsar/files/12645485/stats.txt)
   [stats-internal.txt](https://github.com/apache/pulsar/files/12645486/stats-internal.txt)
   
   
   ### Anything else?
   
   The message rate is about 50 messages per second. The same scenario with a few (1-2-5) messages per minute works as expected. So, I believe there might be some race condition.
   
   ### Are you willing to submit a PR?
   
   - [ ] 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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on [pulsar]

Posted by "ivans0773 (via GitHub)" <gi...@apache.org>.
ivans0773 commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1767833373

   In-depth description of this issue.
   https://apache-pulsar.slack.com/archives/C5Z4T36F7/p1697029481847159


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] mrmomr40 commented on issue #21199: [Bug] Subscription consumption stuck on

Posted by "mrmomr40 (via GitHub)" <gi...@apache.org>.
mrmomr40 commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1725106976

   The name of the field says it's "numberOfEntriesSinceFirstNotAckedMessage" (apparently, _readPosition_-_markDeletePosition_). It sounds like it includes the number of both successfully processed and not processed messgages since the first error.
   Also, if you look at _stats_, it shows _subscriptions.stuckSub.unackedMessages: 2_, which is not many, I believe.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on consumer reconnect [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-2335103456

   It seems that this issue might be addressed together with PIP-282 changes #21953 and other PRs #23226 (merged) and #23231 (in-progress). 
   A remaining challenge is the lost acknowledgements issue that I'll follow-up later, that is reported as #22709, but it doesn't yet contain much analysis. #23261 is related. Lost acknowledgements will also cause problems and that issue needs to be resolved as well.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on consumer reconnect [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-2301576123

   @equanz @codelipenghui Do you think that PIP-282 changes in #21406 21953 address this issue?
   
   @ghost do you have a reproducer for this problem? would you have a chance to share the reproducer or test with a Pulsar version built from the master branch to see if PIP-282 changes address the problem?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- commented on issue #21199: [Bug] Subscription consumption stuck on

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1724811050

   ![image](https://github.com/apache/pulsar/assets/6297296/86568657-5b04-421a-92eb-44f22110806d)
   I see there have many unack msg, and the owner broker dump file is also needed


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on consumer reconnect [pulsar]

Posted by "equanz (via GitHub)" <gi...@apache.org>.
equanz commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-2302663517

   > Do you think that PIP-282 changes in #21953 address this issue?
   
   I think not.
   
   In https://github.com/apache/pulsar/issues/21199#issuecomment-1767833373 case:
   After reconnecting, the consumer will be put in the recentlyJoinedConsumers with the lastSentPosition (maybe `message 2`). So the consumer can receive messages `<= message 2`.
   https://github.com/apache/pulsar/pull/21953
   https://github.com/apache/pulsar/blob/66e1a06b247cd032872e5ab454ff8c8c6cd98550/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java#L484-L499
   
   I cannot conclude that this behavior is incorrect(Isn't this one of feature to preserve ordering?).


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on [pulsar]

Posted by "ethqunzhong (via GitHub)" <gi...@apache.org>.
ethqunzhong commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1772387172

   Can normal consumption be restored after unload or restart owner broker ?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] mrmomr40 commented on issue #21199: [Bug] Subscription consumption stuck on

Posted by "mrmomr40 (via GitHub)" <gi...@apache.org>.
mrmomr40 commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1723261753

   Based on my testing, the bug reproduces only when there are a few consumers for the subscription. When there's one consumer everything works as expected.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Subscription consumption stuck on consumer reconnect [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-2351010520

   I've created [PIP-379: Key_Shared Draining Hashes for Improved Message Ordering](https://github.com/apache/pulsar/pull/23309) as a proposal to address such issues.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] mrmomr40 commented on issue #21199: [Bug] Subscription consumption stuck on

Posted by "mrmomr40 (via GitHub)" <gi...@apache.org>.
mrmomr40 commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1725107520

   @Technoboy- , what do you mean by "the owner broker dump file"? _broker.conf_?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] mrmomr40 commented on issue #21199: [Bug] Subscription consumption stuck on

Posted by "mrmomr40 (via GitHub)" <gi...@apache.org>.
mrmomr40 commented on issue #21199:
URL: https://github.com/apache/pulsar/issues/21199#issuecomment-1725386561

   I've just tested _unblockStuckSubscriptionEnabled=true_ flag and it doesn't help.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org