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

unable to reconnect after re-rising network #1743

Closed
viachaslavic opened this issue Aug 2, 2022 · 10 comments
Closed

unable to reconnect after re-rising network #1743

viachaslavic opened this issue Aug 2, 2022 · 10 comments

Comments

@viachaslavic
Copy link
Contributor

viachaslavic commented Aug 2, 2022

After getting SSL_ERROR_SYSCALL(5) with errno=110 or errno104 I can no longer connect to both with default account or with other accounts to other XMPP server. Only with a new profanity instance is possible to connect again.
I'm not sure, but it seems that I began to notice this behavior after switching from libmesode to libstrophe.
In the debugger, I see that the libstrophe does not call a SSL_shutdown at this moment as recommended in the docs. But i still get described there bug.

Expected Behavior

Successful recconect

Current Behavior

profanity.log

Steps to Reproduce (for bugs)

  1. successfully connect to XMPP server
  2. disconnect (or block connection) the network for a few minutes
  3. get "Lost connection" message after re-rising network or earlier
  4. wait for a recconect automatically or forced connect manually

Context

Environment

Profanity, version 0.12.1
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2021 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.17.1)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.10.5)
GTK icons/clipboard: Disabled
  • Operating System/Distribution : ArchLinux
  • glib2 version 2.72.3
  • libstrophe version 0.12.1
  • OpenSSL 1.1.1q 5 Jul 2022
  • Linux 5.18.6-zen1-1-zen x86_64 GNU/Linux
@jubalh jubalh added the bug label Aug 3, 2022
@jubalh jubalh added this to the 0.13.0 milestone Aug 3, 2022
@jubalh
Copy link
Member

jubalh commented Aug 3, 2022

In case you are familiar with git: does it work if you revert 3a03496 ?

@viachaslavic
Copy link
Contributor Author

viachaslavic commented Aug 3, 2022

@jubalh , yes, revert 3a03496 solve this issue.

@sjaeckel
Copy link
Member

sjaeckel commented Aug 3, 2022

@jubalh , yes, revert to 3a03496 solve this issue.

do you mean 'revert of'?

Just asking to be sure whether you reverted said commit or maybe reset to this commit :)

@viachaslavic
Copy link
Contributor Author

viachaslavic commented Aug 3, 2022

@sjaeckel yes, revert of 3a03496 (revert only this commit). Thanks for correcting!

@sjaeckel
Copy link
Member

sjaeckel commented Aug 6, 2022

I only now realized that you're hitting strophe/libstrophe#211 ... reverting 3a03496 simply tears down the complete connection object which isn't necessary, but also solves this problem!

Can you try to build&use libstrophe from master? Otherwise you'll have to wait whether the Arch maintainers will include the necessary patch. I've just sent them an E-Mail and asked them to do so.

@jubalh
Copy link
Member

jubalh commented Aug 6, 2022

openSUSE has the mentioned PR added as a patch to the package. But I doubt all distros will know about this. Maybe there should be a new point release for libstrophe?

@sjaeckel
Copy link
Member

sjaeckel commented Aug 6, 2022

I'll do a 0.12.2 as soon as strophe/libstrophe#214 is confirmed and merged

@viachaslavic
Copy link
Contributor Author

I only now realized that you're hitting strophe/libstrophe#211 ... reverting 3a03496 simply tears down the complete connection object which isn't necessary, but also solves this problem!

Can you try to build&use libstrophe from master? Otherwise you'll have to wait whether the Arch maintainers will include the necessary patch. I've just sent them an E-Mail and asked them to do so.

I'm sorry, I didn't pay attention to this PR before reporting.
Now, with strophe/libstrophe#master profanity working as expected. Thanks!

@jubalh
Copy link
Member

jubalh commented Aug 8, 2022

I'll close this now here since one could argue that it's more a libstrophe issue.
Hopefully users who encounter this can find the bug and either then get the new libstrophe release (or distros patching it).

@jubalh
Copy link
Member

jubalh commented Aug 8, 2022

libstrophe 0.12.2 got released: https://github.com/strophe/libstrophe/releases/tag/0.12.2

jubalh added a commit that referenced this issue Aug 8, 2022
0.12.2 has some important fixes.
Let's require it so users don't stumble upon bugs like #1743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants