profanity-im / profanity

Ncurses based XMPP client
https://profanity-im.github.io/
Other
1.33k stars 187 forks source link

Crash with SIGABRT with libstrophe-0.13.0 #1954

Closed lynix closed 9 months ago

lynix commented 9 months ago

Profanity crashes with SIGABRT after seemingly successfully connecting to the server.

Expected Behavior

No crash.

Current Behavior

Crash with SIGABRT.

Environment

Up-to-date Arch Linux, profanity and libstrophe built from current Git master branch.

$ profanity -v
Profanity, version 0.14.0dev.makepkg.569e37f0
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2024 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.23.2)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.11.6)
GTK icons/clipboard: Enabled
GDK Pixbuf: Enabled

The last system update has upgraded a large number of packages so I unfortunately haven't found the time to bisect via separate downgrades. Amoung those upgrades there was libstrophe: 1:0.12.3-1 -> 1:0.13.0-2, I will try to downgrade this one first.

lynix commented 9 months ago

Full backtrace: profanity-backtrace.txt

lynix commented 9 months ago

I can confirm that downgrading libstrophe from 0.13.0 to 0.12.3 fixes the issue.

So shall I create a bug report over at strophe/libstrophe then?

sjaeckel commented 9 months ago

So shall I create a bug report over at strophe/libstrophe then?

Sure, you could do that.

I'm also running profanity with current libstrophe and I haven't seen that yet.

Since it's crashing inside profanity, I'd still start investigating here.

Are you in the profanity MUC and can you maybe provide logs?

To create useful logs:

  1. start profanity with profanity -l DEBUG
  2. inside running profanity increase the strophe loglevel via /strophe 3 (and /save the setting to survive over restarts if you want to)
  3. /connect <account>

Where the log is located is printed right after the banner when starting up profanity.

sjaeckel commented 9 months ago

The issue happens here

https://github.com/profanity-im/profanity/blob/569e37f018564bde82f1655246208c0ad95dc4c6/src/xmpp/roster_list.c#L90-L92

and I already have an idea what goes wrong, but I still need to be able to reproduce.

sjaeckel commented 9 months ago

I've been able to reproduce and will provide a patch for libstrophe soon'ish (don't expect it before next week).

lynix commented 9 months ago

Thanks for your efforts, sounds good so far. Do you still want me to provide debug logs or do you already have everything you need?

Stormy greetings to FR from KA :)

sjaeckel commented 9 months ago

Thanks for your efforts, sounds good so far. Do you still want me to provide debug logs or do you already have everything you need?

I think I have everything I need. I'll get back to you once I have a patch ready to try it out.

Stormy greetings to FR from KA :)

Cheers back :)

sjaeckel commented 9 months ago

Fixed via https://github.com/strophe/libstrophe/releases/tag/0.13.1

Please open an issue in the libstrophe repo if the new release didn't fix it for you.