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

mcabber fails after password query, when glib2 ~= 2.80 #47

Open
JudgeGregg opened this issue Mar 29, 2024 · 0 comments
Open

mcabber fails after password query, when glib2 ~= 2.80 #47

JudgeGregg opened this issue Mar 29, 2024 · 0 comments

Comments

@JudgeGregg
Copy link

JudgeGregg commented Mar 29, 2024

Hello, and thank you for your work on Mcabber and Loudmouth.

Mcabber fails every time on an up to date Archlinux, right after asking for the jid password. Malloc fails with:

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

Through gdb I managed to get the following trace:

Thread 1 (Thread 0x7ffff6a80980 (LWP 898299) "mcabber"):
#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 = {140737488342504}}
        ret = <optimized out>
#1  0x00007ffff7b4e393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff7afd6c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
        ret = <optimized out>
#3  0x00007ffff7ae54b8 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {2883190728961350, 140737488342624, 140737352872275, 140737488343088, 140737353560069, 0, 18446744069414584322, 0, 140737352847635, 256, 1531873955904267008, 140737353560069, 93824993676384, 0, 140737352516757, 1}}, sa_flags = 1431858192, sa_restorer = 0x0}

#4  0x00007ffff7ae6395 in __libc_message_impl (fmt=fmt@entry=0x7ffff7c5e2ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
        ap = {{gp_offset = 16, fp_offset = 32767, overflow_arg_area = 0x7fffffffcfe0, reg_save_area = 0x7fffffffcf70}}
        fd = 2
        iov = {{iov_base = 0x7ffff7c61988, iov_len = 41}, {iov_base = 0x7ffff7c5e2ec, iov_len = 1}, {iov_base = 0x0, iov_len = 18446744069414584322}, {iov_base = 0x0, iov_len = 140737352847635}, {iov_base = 0x100, iov_len = 1531873955904267008}, {iov_base = 0x7ffff7f73005, iov_len = 93824993676384}, {iov_base = 0x0, iov_len = 140737352516757}}
        iovcnt = <optimized out>
        total = <optimized out>
        cp = <optimized out>
#5  0x00007ffff7b582a7 in malloc_printerr (str=str@entry=0x7ffff7c61988 "malloc(): unaligned tcache chunk detected") at malloc.c:5772
#6  0x00007ffff7b5ca4c in tcache_get_n (ep=<optimized out>, tc_idx=<optimized out>) at malloc.c:3183
        e = <optimized out>
        e = <optimized out>
#7  tcache_get (tc_idx=<optimized out>) at malloc.c:3199
#8  __GI___libc_malloc (bytes=128) at malloc.c:3320
        ar_ptr = <optimized out>
        victim = <optimized out>
        tbytes = <optimized out>
        tc_idx = <optimized out>
        __PRETTY_FUNCTION__ = "__libc_malloc"
#9  0x00007ffff7e763d3 in g_realloc () at /usr/lib/libglib-2.0.so.0
#10 0x00007ffff7e91303 in ??? () at /usr/lib/libglib-2.0.so.0
#11 0x00007ffff7e91371 in g_string_sized_new () at /usr/lib/libglib-2.0.so.0
#12 0x00007ffff7e77555 in g_markup_escape_text () at /usr/lib/libglib-2.0.so.0
#13 0x00007ffff7f69180 in lm_message_node_to_string () at /usr/lib/libloudmouth-1.so.0
#14 0x00007ffff7f65eae in lm_connection_send () at /usr/lib/libloudmouth-1.so.0
#15 0x00007ffff7f67120 in ??? () at /usr/lib/libloudmouth-1.so.0
#16 0x00007ffff7f6f44f in ??? () at /usr/lib/libloudmouth-1.so.0
#17 0x00007ffff7e6bf69 in ??? () at /usr/lib/libglib-2.0.so.0
#18 0x00007ffff7eca3a7 in ??? () at /usr/lib/libglib-2.0.so.0
#19 0x00007ffff7e6a162 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#20 0x00005555555626ca in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/mcabber/mcabber-1.1.2/mcabber/main.c:558
        mc_source = 0x5555556b8330
        mc_pollfd = 0x5555556b8390
        configFile = <optimized out>
        optstring = <optimized out>
        optval = <optimized out>
        optval2 = <optimized out>
        ret = <optimized out>
Not confirmed.

Versions:
Name : mcabber
Version : 1.1.2-2

Name : loudmouth
Version : 1.5.4-1

Name : glib2
Version : 2.80.0-2

It works perfectly fine on an Ubuntu, with an older version of the glib2: Version: 2.64.6-1~ubuntu20.04.6

It can be reproduced on a fresh Arch install, via docker or podman for example.

Edit:
Apparently the last glib2 version working is:
glib2-2.74.6-1-x86_64.pkg.tar.zst

Switching to glib2-2.76.5-2-x86_64.pkg.tar.zst makes mcabber crashes right after the password query.
https://archive.archlinux.org/packages/g/glib2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant