Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocol errors for QoS1 and Qos2 in a congested environment #9

Closed
ralight opened this issue Mar 15, 2016 · 2 comments
Closed

protocol errors for QoS1 and Qos2 in a congested environment #9

ralight opened this issue Mar 15, 2016 · 2 comments
Labels
Component: mosquitto-broker Status: Blocked Another issue needs to be resolved first Type: Bug

Comments

@ralight
Copy link
Contributor

ralight commented Mar 15, 2016

migrated from Bugzilla #486891
status UNCONFIRMED severity major in component Mosquitto for 1.4
Reported in version 1.4 on platform All
Assigned to: Roger Light

On 2016-01-30 11:05:07 -0500, Christoph Krey wrote:

Broker 1.4.4
Client libmosquitto 1.4.7

Congestion situation arises because initial SUBSCRIBE triggers the transmission
of about 1000 retained messages, each about 1500 bytes long.

Broker publishes Qos1 and Qos2 messages...
Client repeats PUBRECs although PUBREL was send by broker and PUBCOMP received, leading to connection close

connection re-established is closed repeatedly because of unexpected PUBREL received by broker

This situation repeats until broker decides to answer the PUBRECs with PUBRELs instead of closing the connection.

After reconnection, broker re-sends (dup=1) Qos1 messages, but sends some of them 2 or 3 times.

After reconnection, broker sends (dup=0) multiple Qos1 messages with the same messageId
without receiving PUBACK in between.

Log will be sent directly to roger

On 2016-02-11 16:55:19 -0500, Roger Light wrote:

*** Bug 486892 has been marked as a duplicate of this bug. ***

@PierreF
Copy link
Contributor

PierreF commented Dec 28, 2017

Can't reproduce this issue. Tried the following steps (using 1.4.4 for broker and 1.4.7 for mosquitto_sub):

  • Start broker with the following config
cat > /tmp/mosquitto.conf << EOF
max_queued_messages 0
listener 1884
EOF
mosquitto -c /tmp/mosquitto.conf
  • Prepare a 1500 bytes message:
head -c 1500 src/mosquitto.c | tr '\n' '-' > msg
  • Create 6000 retained message with between 0 and 2 (random, so ~2000 msg of each type)
for i in `seq 0 6000`; do ./client/mosquitto_pub -q $(($RANDOM % 3)) -p 1884 -r -t topic/$i -f msg;done
  • Subscribe on all topics and see that all 6000 retained messages were received:
time ./client/mosquitto_sub -v -p 1884 -t topic/# -C 6000 -q 2|wc -l
=> complete in 192 ms
  • Make sure bad network don't break this:
sudo tc qdisc add dev lo root netem delay 600ms loss random 15%
time ./client/mosquitto_sub -v -p 1884 -t topic/# -C 6000 -q 2|wc -l
=> complete in 25min, but receive the 6000 messages

sudo tc qdisc del dev lo root  # go back to sane network config :)

More information is needed to reproduce this issue.

@PierreF PierreF added the Status: Blocked Another issue needs to be resolved first label Dec 28, 2017
@ralight
Copy link
Contributor Author

ralight commented Apr 11, 2018

It seems unlikely we will get more information about this, so I'm closing it.

@ralight ralight closed this as completed Apr 11, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Status: Blocked Another issue needs to be resolved first Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants