Closed vanitasvitae closed 6 years ago
I observed, that bundles only arrive, after another iq was sent to the server. So I send the first iq (id 1) and wait for the response, nothing happens. If I send another iq (id 2) to the server, a response for the first iq (id 1) arrives. This is also true, if I send iq 1 to ejabberd, iq 2 to prosody and again iq 3 to ejabberd. After sending iq 3 to ejabberd, response 1 arrives. So this is highly likely to be an ejabberd bug.
I created a ejabberd bug report: https://github.com/processone/ejabberd/issues/1710
May it worth considering to send another small iq to the server with every bundle iq as a workaround? Ask @Flowdalic about this...
I tried to reproduce the issue by fetching the bundle from ejabberd using conversations on home.zom.im. It took a long time (~80 seconds), but the bundles did arrive. This might be because of other iq requests being sent though...
May it worth considering to send another small iq to the server with every bundle iq as a workaround?
I'd usually have a policy to not implement workarounds for broken XMPP implementations in Smack. They usually cause more trouble (more code to maintain) and decrease the pressure that those broken implementations get fixed.
That is, if we are really talking about a non-Smack issue here.
Yeah, I guess its just my server installation.
I remembered where I say this behavior and what is likely causing this too: Whenever you perform a blocking operation in a synchronous IQ handler. Then the connections incoming processing chain will also be blocked, until the operation times out, which will also cause the dammed incoming stanzas to get processed again (which will make them appear in Smack's debugger).
Let's see if we can find that piece of code that is responsible for this.
Where are those bundles fetched?
@Flowdalic The Bundles are fetched in OmemoService.fetchBundle(). I cannot see anything, which might block :/
this was fixed a while ago.
When my account is on prosody and their account is on ejabberd 16.09, I cannot fetch their device bundle, because the iq result only arrives 1 sec after the timeout. This is true with timeout 10 secs as well as 50 or 60 secs. Strangely enough fetching device lists works (same procedure, only difference I spotted is missing "max_items=1" in the query. Fetching bundles from prosody <-> prosody works (tested on one server).
I'm not sure, if this is an upstream issue of smack, prosody or ejabberd or just a faulty configuration. Maybe @Flowdalic has heard of something like this/has an idea how to debug this?