FS#78674 - [mcabber] no longer works

Attached to Project: Community Packages
Opened by Sam Whited (SamWhited) - Thursday, 01 June 2023, 12:27 GMT
Last edited by Christian Heusel (gromit) - Monday, 24 July 2023, 21:28 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

When launching mcabber(1) it has been crashing for a while with the following message:

malloc(): unaligned tcache chunk detected
Aborted (core dumped)


Additional info:
* package version(s): mcabber 1.1.2-2, ncurses 6.4-1, glib2 2.76.3-1, loudmouth 1.5.4-1, linux 6.3.4-arch2-1
* config and/or log files etc.: n/a, probably a linker thing, happens with default config as well as any customizations
* link to upstream bug report, if any: could not find one

Steps to reproduce:

Run mcabber
This task depends upon

Closed by  Christian Heusel (gromit)
Monday, 24 July 2023, 21:28 GMT
Reason for closing:  Upstream
Additional comments about closing:  Workaround described in https://bugs.archlinux.org/task/78674#co mment219432
Comment by Toolybird (Toolybird) - Thursday, 01 June 2023, 22:40 GMT
Launches fine in a fresh VM i.e. cannot repro.

> Aborted (core dumped)

Please provide a backtrace with debug symbols [1]. It's usually as simple as:

$ coredumpctl gdb (then answer y when it asks "Enable debuginfod for this session?")
(gdb) set logging enabled
(gdb) bt (or bt full)

Then post gdb.txt

[1] https://wiki.archlinux.org/title/Debugging/Getting_traces
Comment by Sam Whited (SamWhited) - Saturday, 03 June 2023, 11:41 GMT
If I run "coredumpctl gdb" it spits out:

PID: 2402 (mcabber)
UID: 1000 (sam)
GID: 1000 (sam)
Signal: 6 (ABRT)
Timestamp: Sat 2023-06-03 07:39:49 EDT (1min 17s ago)
Command Line: mcabber
Executable: /usr/bin/mcabber
Control Group: /user.slice/user-1000.slice/session-2.scope
Unit: session-2.scope
Slice: user-1000.slice
Session: 2
Owner UID: 1000 (sam)
Boot ID: ab9475dbf54c4f5095e5fa02348410fa
Machine ID: 7f5c20f74c464479ad7b0a2b92734041
Hostname: lyrata
Storage: /var/lib/systemd/coredump/core.mcabber.1000.ab9475dbf54c4f5095e5fa02348410fa.2402.1685792389000000.zst (present)
Size on Disk: 326.5K
Message: Process 2402 (mcabber) of user 1000 dumped core.

Stack trace of thread 2402:
#0 0x00007ff28e6d626c n/a (libc.so.6 + 0x8926c)
#1 0x00007ff28e686a08 raise (libc.so.6 + 0x39a08)
#2 0x00007ff28e66f538 abort (libc.so.6 + 0x22538)
#3 0x00007ff28e6702db n/a (libc.so.6 + 0x232db)
#4 0x00007ff28e6e01b7 n/a (libc.so.6 + 0x931b7)
#5 0x00007ff28e6e498c malloc (libc.so.6 + 0x9798c)
#6 0x00007ff28ea5c073 g_realloc (libglib-2.0.so.0 + 0x64073)
#7 0x00007ff28ea76f73 n/a (libglib-2.0.so.0 + 0x7ef73)
#8 0x00007ff28ea76fe1 g_string_sized_new (libglib-2.0.so.0 + 0x7efe1)
#9 0x00007ff28ea5d1f5 g_markup_escape_text (libglib-2.0.so.0 + 0x651f5)
#10 0x00007ff28eb4d180 lm_message_node_to_string (libloudmouth-1.so.0 + 0xb180)
#11 0x00007ff28eb49eae lm_connection_send (libloudmouth-1.so.0 + 0x7eae)
#12 0x00007ff28eb4b120 n/a (libloudmouth-1.so.0 + 0x9120)
#13 0x00007ff28eb5344f n/a (libloudmouth-1.so.0 + 0x1144f)
#14 0x00007ff28ea52981 g_main_context_dispatch (libglib-2.0.so.0 + 0x5a981)
#15 0x00007ff28eaafb39 n/a (libglib-2.0.so.0 + 0xb7b39)
#16 0x00007ff28ea50032 g_main_context_iteration (libglib-2.0.so.0 + 0x58032)
#17 0x00005581e21e45ed main (mcabber + 0xe5ed)
#18 0x00007ff28e670850 n/a (libc.so.6 + 0x23850)
#19 0x00007ff28e67090a __libc_start_main (libc.so.6 + 0x2390a)
#20 0x00005581e21e4a85 _start (mcabber + 0xea85)
ELF object binary architecture: AMD x86-64

Failed to invoke gdb: No such file or directory
Comment by Toolybird (Toolybird) - Saturday, 03 June 2023, 21:38 GMT
> Failed to invoke gdb: No such file or directory

Thanks, but it should be fairly self-evident from the above that you need to have gdb installed. Please try again.
Comment by Sam Whited (SamWhited) - Sunday, 04 June 2023, 04:06 GMT
> it should be fairly self-evident

It is not. However, I think I've gotten it working this time, let me know if any of this looks wrong. Thanks.

PID: 2402 (mcabber)
UID: 1000 (sam)
GID: 1000 (sam)
Signal: 6 (ABRT)
Timestamp: Sat 2023-06-03 07:39:49 EDT (1min 17s ago)
Command Line: mcabber
Executable: /usr/bin/mcabber
Control Group: /user.slice/user-1000.slice/session-2.scope
Unit: session-2.scope
Slice: user-1000.slice
Session: 2
Owner UID: 1000 (sam)
Boot ID: ab9475dbf54c4f5095e5fa02348410fa
Machine ID: 7f5c20f74c464479ad7b0a2b92734041
Hostname: lyrata
Storage: /var/lib/systemd/coredump/core.mcabber.1000.ab9475dbf54c4f5095e5fa02348410fa.2402.1685792389000000.zst (present)
Size on Disk: 326.5K
Message: Process 2402 (mcabber) of user 1000 dumped core.

Stack trace of thread 2402:
#0 0x00007ff28e6d626c n/a (libc.so.6 + 0x8926c)
#1 0x00007ff28e686a08 raise (libc.so.6 + 0x39a08)
#2 0x00007ff28e66f538 abort (libc.so.6 + 0x22538)
#3 0x00007ff28e6702db n/a (libc.so.6 + 0x232db)
#4 0x00007ff28e6e01b7 n/a (libc.so.6 + 0x931b7)
#5 0x00007ff28e6e498c malloc (libc.so.6 + 0x9798c)
#6 0x00007ff28ea5c073 g_realloc (libglib-2.0.so.0 + 0x64073)
#7 0x00007ff28ea76f73 n/a (libglib-2.0.so.0 + 0x7ef73)
#8 0x00007ff28ea76fe1 g_string_sized_new (libglib-2.0.so.0 + 0x7efe1)
#9 0x00007ff28ea5d1f5 g_markup_escape_text (libglib-2.0.so.0 + 0x651f5)
#10 0x00007ff28eb4d180 lm_message_node_to_string (libloudmouth-1.so.0 + 0xb180)
#11 0x00007ff28eb49eae lm_connection_send (libloudmouth-1.so.0 + 0x7eae)
#12 0x00007ff28eb4b120 n/a (libloudmouth-1.so.0 + 0x9120)
#13 0x00007ff28eb5344f n/a (libloudmouth-1.so.0 + 0x1144f)
#14 0x00007ff28ea52981 g_main_context_dispatch (libglib-2.0.so.0 + 0x5a981)
#15 0x00007ff28eaafb39 n/a (libglib-2.0.so.0 + 0xb7b39)
#16 0x00007ff28ea50032 g_main_context_iteration (libglib-2.0.so.0 + 0x58032)
#17 0x00005581e21e45ed main (mcabber + 0xe5ed)
#18 0x00007ff28e670850 n/a (libc.so.6 + 0x23850)
#19 0x00007ff28e67090a __libc_start_main (libc.so.6 + 0x2390a)
#20 0x00005581e21e4a85 _start (mcabber + 0xea85)
ELF object binary architecture: AMD x86-64

#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {7232821632}}
ret = <optimized out>
#1 0x00007f6fb4dde2d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007f6fb4d8ea08 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007f6fb4d77538 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {140117763590704, 140117763590704, 0, 140117763590704, 140117755329944, 94158199176304, 1787, 94158196863104, 0, 2147483649, 140117754219033, 140117763590704, 94158196863088, 0, 94158195192688, 94158199176304}}, sa_flags = -1257589090, sa_restorer = 0x0}
#4 0x00007f6fb4d782db in __libc_message (fmt=fmt@entry=0x7f6fb4ef2515 "%s\n") at ../sysdeps/posix/libc_fatal.c:150
ap = {{gp_offset = 16, fp_offset = 21922, overflow_arg_area = 0x7fffaf1c1ac0, reg_save_area = 0x7fffaf1c1a50}}
fd = 2
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
#5 0x00007f6fb4de81b7 in malloc_printerr (str=str@entry=0x7f6fb4ef5308 "free(): invalid next size (fast)") at malloc.c:5651
#6 0x00007f6fb4dea0e0 in _int_free (av=0x7f6fb4f30ba0 <main_arena>, p=0x55a2e9e39510, have_lock=have_lock@entry=0) at malloc.c:4508
fail = <optimized out>
idx = <optimized out>
old = <optimized out>
old2 = <optimized out>
size = 96
fb = <optimized out>
nextchunk = <optimized out>
nextsize = <optimized out>
nextinuse = <optimized out>
prevsize = <optimized out>
bck = <optimized out>
fwd = <optimized out>
__PRETTY_FUNCTION__ = "_int_free"
#7 0x00007f6fb4deccb3 in __GI___libc_free (mem=<optimized out>) at malloc.c:3367
ar_ptr = <optimized out>
p = <optimized out>
Quit
Comment by Toolybird (Toolybird) - Sunday, 04 June 2023, 21:19 GMT
Looks like some kind of memory allocation error. It might be worth trying to recompile the pkg on your machine to see if that fixes it. Otherwise you will have to report it upstream. Please let us know what you find out.
Comment by Sergej Pupykin (sergej) - Saturday, 08 July 2023, 19:46 GMT
Cannot reproduce, it connects to my jabber server and fetches roster at least. Problem maybe already disappeared somehow or problem is specific to your machine.
Comment by Sam Whited (SamWhited) - Saturday, 08 July 2023, 19:48 GMT
Still happening for me every time with multiple config files and accounts. I'm not sure how I can be of assistance debugging though or what could be different about this machine now.
Comment by Sergej Pupykin (sergej) - Sunday, 09 July 2023, 00:15 GMT
I would check that
- system is up to date
- no 3rd party libraries that can affect (pacman -Qm, $LD_LIBRARY_PATH, /etc/ld.so.preload, /usr/local/lib, etc.)
and maybe try with minimal config with one xmpp account.

`ldd /usr/bin/mcabber` can show which exact libraries are used
Comment by Sam Whited (SamWhited) - Sunday, 09 July 2023, 00:26 GMT
The system is up to date, but I'm not sure what your second bullet point means. The problem does still happen immediately with a minimal config. The output of ldd is below:

$ ldd /usr/bin/mcabber
linux-vdso.so.1 (0x00007fff5b162000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f648b4d0000)
libloudmouth-1.so.0 => /usr/lib/libloudmouth-1.so.0 (0x00007f648b4b1000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f648b366000)
libgpgme.so.11 => /usr/lib/libgpgme.so.11 (0x00007f648b310000)
libotr.so.5 => /usr/lib/libotr.so.5 (0x00007f648b2f5000)
libidn.so.12 => /usr/lib/libidn.so.12 (0x00007f648b2c0000)
libpanelw.so.6 => /usr/lib/libpanelw.so.6 (0x00007f648b2b7000)
libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f648b240000)
libaspell.so.15 => /usr/lib/libaspell.so.15 (0x00007f648b1a2000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f648afb8000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f648af56000)
libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f648af44000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f648aeee000)
libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f648acf0000)
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f648ac55000)
libassuan.so.0 => /usr/lib/libassuan.so.0 (0x00007f648ac40000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f648ac1a000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f648b562000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f648aad2000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f648a800000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f648a713000)
libffi.so.8 => /usr/lib/libffi.so.8 (0x00007f648aac5000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f648a63b000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f648aa97000)
libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f648aa8f000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f648aa81000)
libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007f648a634000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f648a61a000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f648a484000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f648a3e0000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f648a3d2000)
libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f648a2ff000)
libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f648a2dd000)
libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f648a123000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f648a10c000)
libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f648a0b4000)
libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f648a06b000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f6489fc8000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6489fa3000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f6489f80000)
Comment by Toolybird (Toolybird) - Monday, 10 July 2023, 21:56 GMT
Dupe  FS#79046 
Comment by Sergej Pupykin (sergej) - Monday, 10 July 2023, 22:29 GMT
I was able to reproduce and work it around by adding server explicitly:

set server = xmpp.example.com

Maybe it is some bug in getting SRV records from DNS
Comment by ugubok (ugubok) - Tuesday, 11 July 2023, 06:14 GMT
I added easier way to reproduce in my dupe task  FS#79046 : docker run --rm -it archlinux:latest bash -c 'pacman -Syu --noconfirm; pacman -S mcabber --noconfirm; sed -i "s/yourusername@domain/example@xmpp.jp" /usr/share/mcabber/example/mcabberrc; mcabber -f /usr/share/mcabber/example/mcabberrc'

Adding server explicitly solves the problem, thanks @sergej !

Loading...