Closed Juliaria08 closed 2 months ago
Thank you for the report.
There has been a number of reports of this plug-in not working on Pidgin/libpurple 2.14.13. Can you downgrade to 2.14.12 to check if it is working with that version? I am already conversing with grim (the main maintainer of Pidgin) to gain some insights.
Which distribution do you use? Are you building from source or are you using the provided nightly build?
Note to self: This is not the libssh-gcrypt
crash which also happens on termination, but looks like this:
#0 0x00007f5078420e80 in ()
#1 0x00007f509fe44520 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f509818b570 in ()
#3 0x00007f509f111dac in () at /lib/x86_64-linux-gnu/libgcrypt.so.20
#4 0x00007f509f113154 in gcry_mpi_release () at /lib/x86_64-linux-gnu/libgcrypt.so.20
#5 0x00007f4fc58bcfa5 in () at /lib/x86_64-linux-gnu/libssh-gcrypt.so.4
#6 0x00007f4fc58ae8d7 in () at /lib/x86_64-linux-gnu/libssh-gcrypt.so.4
#7 0x00007f50a10f224e in _dl_fini () at ./elf/dl-fini.c:142
#8 0x00007f509fe47495 in __run_exit_handlers (status=0, listp=0x7f50a001c838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#9 0x00007f509fe47610 in __GI_exit (status=<optimised out>) at ./stdlib/exit.c:143
#10 0x00007f509fe2bd97 in __libc_start_call_main (main=main@entry=0x55e850516930 <main>, argc=argc@entry=1, argv=argv@entry=0x7ffc466ff678) at ../sysdeps/nptl/libc_start_call_main.h:74
#11 0x00007f509fe2be40 in __libc_start_main_impl (main=0x55e850516930 <main>, argc=1, argv=0x7ffc466ff678, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7ffc466ff668) at ../csu/libc-start.c:392
#12 0x000055e8505178c5 in _start ()
I've confirmed that this is also
Thank you for the report.
There has been a number of reports of this plug-in not working on Pidgin/libpurple 2.14.13. Can you downgrade to 2.14.12 to check if it is working with that version? I am already conversing with grim (the main maintainer of Pidgin) to gain some insights.
Which distribution do you use? Are you building from source or are you using the provided nightly build?
I'm using ArchLinux's repos. I am using a build from source version of purple-gowhatsapp with commit ID e1bb3afd0036516eb61f04ac1fc80b6aaeaa2d71), I've tested both versions a bit ago today (first with a older pidgin only and later with an older libpurple too), but I forgot to publish the comment where the logs appeared, and the error was still the same, pidgin segfaulted.
Today, I was unable to reproduce the issue on my Arch system (now with Pidgin 2.14.13). Of course, this test environment is pretty much empty. Can you check if the crash happens with a clean purple config directory (pidgin -d -c /temp/config
or something)?
Message ID: @.> On Mon, 08 Apr 2024 13:35:57 -0700 Hermann Höhne @.> wrote: Today, I was unable to reproduce the issue on my Arch system (now with Pidgin 2.14.13). Of course, this test environment is pretty much empty. Can you check if the crash happens with a clean purple config directory (
pidgin -d -c /temp/config
or something)? Seems like yes, even without configuring the account, just by doing ^C on the command line I reproduced it, and created another core dump file.
#0 __pthread_kill_implementation (threadid=<optimized out>, ***@***.***=6, ***@***.***=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {125397078227632}}
ret = <optimized out>
#1 0x0000720c47231393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x0000720c471e06c8 in __GI_raise ***@***.***=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x0000720c471c84b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {125397078229288, 96358532419584, 0, 0, 125397078224936, 39, 96358524923072, 140730300168744, 125397073768560, 0, 96358532400176, 125397078227464, 125397078017578, 22, 140730300168743, 140730300168752}}, sa_flags = 1212839137, sa_restorer = 0x7ffe538cf9d0}
#4 0x0000720c471c9395 in __libc_message_impl ***@***.***=0x720c473412ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 2818473244, overflow_arg_area = 0x7ffe538cfa00, reg_save_area = 0x7ffe538cf990}}
fd = 2
iov = {{iov_base = 0x720c4733f06b, iov_len = 23}, {iov_base = 0x720c473412ec, iov_len = 1}, {iov_base = 0x410, iov_len = 96358525184656}, {iov_base = 0x200, iov_len = 0}, {iov_base = 0x410, iov_len = 96358525184640}, {iov_base = 0x210, iov_len = 125397058716070}, {iov_base = 0x57a3381e20a0, iov_len = 125397060012736}}
iovcnt = <optimized out>
total = <optimized out>
cp = <optimized out>
#5 0x0000720c4723b2a7 in malloc_printerr ***@***.***=0x720c4733f06b "free(): invalid pointer") at malloc.c:5772
#6 0x0000720c4723d5b4 in _int_free (av=<optimized out>, p=<optimized out>, ***@***.***=0) at malloc.c:4507
size = <optimized out>
fb = <optimized out>
#7 0x0000720c4723fe93 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
ar_ptr = <optimized out>
p = <optimized out>
err = 0
#8 0x0000720c47768b91 in g_slice_free_chain_with_offset (mem_size=24, mem_chain=<optimized out>, next_offset=8) at ../glib/glib/gslice.c:315
current = <optimized out>
slice = 0x0
#9 0x0000720c474e49da in purple_plugin_destroy () at /usr/lib/libpurple.so.0
#10 0x0000720c474e5451 in purple_plugins_destroy_all () at /usr/lib/libpurple.so.0
#11 0x0000720c474bfc11 in purple_core_quit () at /usr/lib/libpurple.so.0
#12 0x000057a337378dcc in ??? ()
#13 0x0000720c47747279 in g_main_dispatch (context=0x57a3379fb9b0) at ../glib/glib/gmain.c:3344
dispatch = 0x720c477a4da0 <g_io_unix_dispatch>
prev_source = 0x0
begin_time_nsec = 30792301164019
was_in_call = 0
user_data = 0x0
callback = 0x57a337378cd0
cb_funcs = 0x720c47838380 <g_source_callback_funcs>
cb_data = 0x57a3379fb940
need_destroy = <optimized out>
source = 0x57a3379fb8c0
current = 0x57a338184430
i = 0
__func__ = "g_main_dispatch"
#14 0x0000720c477a64ff in g_main_context_dispatch_unlocked (context=0x57a3379fb9b0) at ../glib/glib/gmain.c:4152
#15 g_main_context_iterate_unlocked.isra.0 (context=0x57a3379fb9b0, ***@***.***=1, ***@***.***=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
max_priority = 2147483647
timeout = 699
some_ready = 1
nfds = 7
allocated_nfds = 7
fds = 0x57a3381843d0
begin_time_nsec = 30792301118393
#16 0x0000720c47747ea7 in g_main_loop_run (loop=0x57a338184350) at ../glib/glib/gmain.c:4419
self = <optimized out>
__func__ = "g_main_loop_run"
#17 0x0000720c47d38473 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#18 0x000057a33732796e in main ()
I have noticed this time the unloading this plugin message doesn't appear and happens before:
(HH:MM:SS) main: Unloading all plugins
free(): invalid pointer
As opposed to something like:
(HH:MM:SS) main: Unloading whatsmeow (I don't remember the format right now)
free(): invalid pointer
I am afraid – since I am unable to reproduce this issue on my machine – we will not find the cause for this issue. Ideally, we would have a debug build of libpurple on your machine. Then we can see where exactly in purple_plugin_destroy(…)
the invalid pointer is accessed. Maybe it is indeed left-over data, maybe it is some weird issue only happening when a certain combination of plug-ins are loaded.
I am afraid – since I am unable to reproduce this issue on my machine – we will not find the cause for this issue. Ideally, we would have a debug build of libpurple on your machine. Then we can see where exactly in
purple_plugin_destroy(…)
the invalid pointer is accessed. Maybe it is indeed left-over data, maybe it is some weird issue only happening when a certain combination of plug-ins are loaded.
Should I try to build my own libpurple and preload it, so that the one from the system (pacman) doesn't get loaded?
Good idea. As far as I can tell, you should be able to add --enable-debug
to the list of flags to ./configure
in the official https://gitlab.archlinux.org/archlinux/packaging/packages/pidgin/-/blob/main/PKGBUILD. Maybe add some debug output to purple_plugin_destroy(…)
in libpurple/plugin.c
for even more insights.
Good idea. As far as I can tell, you should be able to add
--enable-debug
to the list of flags to./configure
in the official https://gitlab.archlinux.org/archlinux/packaging/packages/pidgin/-/blob/main/PKGBUILD. Maybe add some debug output topurple_plugin_destroy(…)
inlibpurple/plugin.c
for even more insights.
(10:18:32) plugins: Unloading plugin WhatsApp (whatsmeow)
free(): invalid pointer
Thread 1 "pidgin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt full
#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 = {140737354128048}}
ret = <optimized out>
#1 0x00007ffff6d76393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff6d256c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007ffff6d0d4b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {140737354129704, 93825001969920, 0, 0, 140737354125352, 140737488329344, 93824993900288, 140737488329608, 140737332138096, 140737488330224, 140737339734160, 140737354127880, 140737353917994, 115, 140737488329607, 140737488329616}}, sa_flags = -134441759, sa_restorer = 0x7fffffff9b30}
#4 0x00007ffff6d0e395 in __libc_message_impl (fmt=fmt@entry=0x7ffff6e862ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 2348827019, overflow_arg_area = 0x7fffffff9b60, reg_save_area = 0x7fffffff9af0}}
fd = 2
iov = {{iov_base = 0x7ffff6e8406b, iov_len = 23}, {iov_base = 0x7ffff6e862ec, iov_len = 1}, {iov_base = 0x5555556d4bd0, iov_len = 93824993709088}, {iov_base = 0x7fffffff9ad0, iov_len = 0}, {iov_base = 0x5555556d4bd0, iov_len = 93824993700368}, {iov_base = 0x5555556d4bd0, iov_len = 93824993700256}, {iov_base = 0x7fffffff9b00, iov_len = 140737337517476}}
iovcnt = <optimized out>
total = <optimized out>
cp = <optimized out>
#5 0x00007ffff6d802a7 in malloc_printerr (str=str@entry=0x7ffff6e8406b "free(): invalid pointer") at malloc.c:5772
#6 0x00007ffff6d825b4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4507
size = <optimized out>
fb = <optimized out>
#7 0x00007ffff6d84e93 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
ar_ptr = <optimized out>
p = <optimized out>
err = 0
#8 0x00007ffff7309b91 in g_slice_free_chain_with_offset (mem_size=24, mem_chain=<optimized out>, next_offset=8) at ../glib/glib/gslice.c:315
current = <optimized out>
slice = 0x0
#9 0x00007ffff702af3a in purple_plugin_destroy () at /usr/lib/libpurple.so.0
#10 0x00007ffff702b9d1 in purple_plugins_destroy_all () at /usr/lib/libpurple.so.0
#11 0x00007ffff7005122 in purple_core_quit () at /usr/lib/libpurple.so.0
#12 0x00007ffff723e740 in g_closure_invoke (closure=0x555555cb2520, return_value=0x0, n_param_values=1, param_values=0x7fffffff9ea0, invocation_hint=0x7fffffff9df0)
at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7243890 <g_cclosure_marshal_VOID__VOID>
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555cb2500
__func__ = "g_closure_invoke"
#13 0x00007ffff726d756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffff9f70, detail=detail@entry=0, instance=instance@entry=0x555555cb1f90, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffff9ea0) at ../glib/gobject/gsignal.c:3888
tmp = <optimized out>
handler = 0x555555cce860
accumulator = <optimized out>
emission = {next = 0x7fffffffa2e0, instance = 0x555555cb1f90, ihint = {signal_id = 165, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x555555cce860
return_accu = <optimized out>
accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#14 0x00007ffff725e612 in signal_emit_valist_unlocked
(instance=instance@entry=0x555555cb1f90, signal_id=signal_id@entry=165, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffa0d0)
at ../glib/gobject/gsignal.c:3520
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = Python Exception <class 'gdb.error'>: value has been optimized out
{signal_id = 165, itype = , name = 0x7ffff7b8c53e "activate", destroyed = 0, flags = 33, n_params = 0, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x0, return_type = 0x4, class_closure_bsa = 0x5555559b2510, accumulator = 0x0, c_marshaller = 0x7ffff7243890 <g_cclosure_marshal_VOID__VOID>, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x5555559b2c20}
__func__ = "signal_emit_valist_unlocked"
#15 0x00007ffff725e847 in g_signal_emit_valist (instance=0x555555cb1f90, signal_id=165, detail=0, var_args=var_args@entry=0x7fffffffa0d0) at ../glib/gobject/gsignal.c:3263
#16 0x00007ffff725e904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffa1b0, reg_save_area = 0x7fffffffa0f0}}
#17 0x00007ffff7a69321 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007ffff723e740 in g_closure_invoke
(closure=0x555555cb2570, return_value=0x7fffffffa310, n_param_values=4, param_values=0x7fffffffa3a0, invocation_hint=0x7fffffffa2f0) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7a692e0
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555cb2550
__func__ = "g_closure_invoke"
#19 0x00007ffff726d756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffa4c0, detail=detail@entry=3394, instance=instance@entry=0x555555c479b0, emission_return=emission_return@entry=0x7fffffffa540, instance_and_params=instance_and_params@entry=0x7fffffffa3a0) at ../glib/gobject/gsignal.c:3888
tmp = <optimized out>
handler = 0x555555cb2850
accumulator = <optimized out>
emission = {next = 0x7fffffffa920, instance = 0x555555c479b0, ihint = {signal_id = 163, detail = 3394, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x555555cbf940
return_accu = <optimized out>
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#20 0x00007ffff725df05 in signal_emit_valist_unlocked
(instance=instance@entry=0x555555c479b0, signal_id=signal_id@entry=163, detail=detail@entry=3394, var_args=var_args@entry=0x7fffffffa620)
at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype = <optimized out>
static_scope = <optimized out>
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = Python Exception <class 'gdb.error'>: value has been optimized out
{signal_id = 163, itype = , name = 0x7ffff7af62a2 "accel-activate", destroyed = 0, flags = 16, n_params = 3, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x555555bb8f00, return_type = 0x14, class_closure_bsa = 0x0, accumulator = 0x555555af1760, c_marshaller = 0x7ffff7939320, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x1}
__func__ = "signal_emit_valist_unlocked"
#21 0x00007ffff725e847 in g_signal_emit_valist (instance=0x555555c479b0, signal_id=163, detail=3394, var_args=var_args@entry=0x7fffffffa620)
at ../glib/gobject/gsignal.c:3263
#22 0x00007ffff725e904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffffffa700, reg_save_area = 0x7fffffffa640}}
#23 0x00007ffff7867ecf in gtk_accel_group_activate () at /usr/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff7868e09 in gtk_accel_groups_activate () at /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007ffff7a7f3fd in gtk_window_activate_key () at /usr/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff7a7f455 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#27 0x00007ffff7938f08 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#28 0x00007ffff723e740 in g_closure_invoke
(closure=0x555555ab4d90, return_value=0x7fffffffa950, n_param_values=2, param_values=0x7fffffffa9e0, invocation_hint=0x7fffffffa930) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7243820 <g_type_class_meta_marshal>
marshal_data = 0x190
in_marshal = 0
real_closure = 0x555555ab4d70
__func__ = "g_closure_invoke"
#29 0x00007ffff726de0a in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffaad0, detail=detail@entry=0, instance=instance@entry=0x55555574c080, emission_return=emission_return@entry=0x7fffffffab50, instance_and_params=instance_and_params@entry=0x7fffffffa9e0) at ../glib/gobject/gsignal.c:3928
accumulator = <optimized out>
emission = Python Exception <class 'gdb.error'>: value has been optimized out
{next = 0x0, instance = 0x55555574c080, ihint = {signal_id = 80, detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN, chain_type = }
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x555555c777f0
return_accu = <optimized out>
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#30 0x00007ffff725df05 in signal_emit_valist_unlocked
(instance=instance@entry=0x55555574c080, signal_id=signal_id@entry=80, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffac30) at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype = <optimized out>
static_scope = <optimized out>
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = Python Exception <class 'gdb.error'>: value has been optimized out
{signal_id = 80, itype = , name = 0x7ffff7afe1da "key-press-event", destroyed = 0, flags = 2, n_params = 1, single_va_closure_is_valid = 1, single_va_closure_is_after = 1, param_types = 0x555555ab4dc0, return_type = 0x14, class_closure_bsa = 0x555555ab4e70, accumulator = 0x555555ab4e50, c_marshaller = 0x7ffff7938ea0, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x555555ab4d90}
__func__ = "signal_emit_valist_unlocked"
#31 0x00007ffff725e847 in g_signal_emit_valist (instance=0x55555574c080, signal_id=80, detail=0, var_args=var_args@entry=0x7fffffffac30) at ../glib/gobject/gsignal.c:3263
#32 0x00007ffff725e904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffad10, reg_save_area = 0x7fffffffac50}}
#33 0x00007ffff7a6d88d in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#34 0x00007ffff793d747 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#35 0x00007ffff793ed73 in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#36 0x00007ffff77a4dbc in ??? () at /usr/lib/libgdk-x11-2.0.so.0
#37 0x00007ffff72e8279 in g_main_dispatch (context=0x555555672f80) at ../glib/glib/gmain.c:3344
dispatch = 0x7ffff77a4d20
prev_source = 0x0
begin_time_nsec = 673371649952317
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = 0x0
cb_data = 0x0
need_destroy = <optimized out>
source = 0x5555556ab240
current = 0x555555e35d60
i = 0
__func__ = "g_main_dispatch"
#38 0x00007ffff73474ff in g_main_context_dispatch_unlocked (context=0x555555672f80) at ../glib/glib/gmain.c:4152
#39 g_main_context_iterate_unlocked.isra.0 (context=0x555555672f80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
max_priority = 2147483647
timeout = 1351
some_ready = 1
nfds = 7
allocated_nfds = 7
fds = 0x555555e90da0
begin_time_nsec = 673371649911191
#40 0x00007ffff72e8ea7 in g_main_loop_run (loop=0x555555e35e00) at ../glib/glib/gmain.c:4419
self = <optimized out>
__func__ = "g_main_loop_run"
#41 0x00007ffff7938473 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#42 0x000055555557f915 in main ()
Confirmed. I have no idea what is going on, though. On my system, this crash is shadowed by a segfault in gstreamer. I need to work around it. Even then, is happens only when gdb is attached and a break-point is set. I suspect an error in memory management exposing a nasty race-condition somewhere.
This is a variant of the build()
step in the official PKGBUILD.
CFLAGS="-g -ggdb -O0"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--disable-schemas-install \
--disable-gevolution \
--disable-meanwhile \
--disable-gnutls \
--enable-cyrus-sasl \
--disable-doxygen \
--enable-nm \
--disable-gstreamer --disable-vv \
--with-system-ssl-certs=/etc/ssl/certs
Can you build libpurple with this configuration?
With the optimization disabled completely, we might find out where exactly in #9 purple_plugin_destroy ()
things go awry.
I am currently launching pidgin like this (working directory is the directory where the PKGBUILD is located):
LD_LIBRARY_PATH=./src/pidgin-2.14.13/libpurple/.libs/ gdb ./src/pidgin-2.14.13/pidgin/.libs/pidgin
Confirmed. I have no idea what is going on, though. On my system, this crash is shadowed by a segfault in gstreamer. I need to work around it. Even then, is happens only when gdb is attached and a break-point is set. I suspect an error in memory management exposing a nasty race-condition somewhere.
This is a variant of the
build()
step in the official PKGBUILD.CFLAGS="-g -ggdb -O0" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --disable-schemas-install \ --disable-gevolution \ --disable-meanwhile \ --disable-gnutls \ --enable-cyrus-sasl \ --disable-doxygen \ --enable-nm \ --disable-gstreamer --disable-vv \ --with-system-ssl-certs=/etc/ssl/certs
Can you build libpurple with this configuration?
With the optimization disabled completely, we might find out where exactly in
#9 purple_plugin_destroy ()
things go awry.I am currently launching pidgin like this (working directory is the directory where the PKGBUILD is located):
LD_LIBRARY_PATH=./src/pidgin-2.14.13/libpurple/.libs/ gdb ./src/pidgin-2.14.13/pidgin/.libs/pidgin
No --enable-debug
?
(Also, thanks for the other way of loading pidgin that doesn't require me installing pidgin nor libpurple on the system, but I guess will still require me to close the other instance (which I've been doing these times))
And also, with this PKGCONFIG I should be able to more clearly reproduce other crashes I might sometimes find for pidgin/libpurple's issue tracker, right?
I just noticed that when I launch pidgin when there's another pidgin running, it has the other pidgin's window marked specially (like when I first start it up), but it seems to try to start and then stops, and then when unloading whatsapp crashes the same way, but I haven't debugged that one, I'll probably try to debug with the config you gave me when I'm able to. (I've also noticed that libpixbufloader-webp.so
and /usr/lib/purple-2/libjabber.so
don't have the purple_init_plugin
symbol, which might move things in memory arround?)
No --enable-debug?
It seems to enable additional output, but does not enrich the stack trace. You may leave it in. The CFLAGS
seem to more important for investigating this issue. You need to run gdb
from the same folder, too. If run from somewhere else, it won't find the libpurple.so from the relative path. Without gdb
loading the debug symbols, we will not be any wiser.
with this PKGCONFIG I should be able to more clearly reproduce other crashes
I hope so. I do not have much experience with Arch to be sure.
I just noticed that when I launch pidgin when there's another pidgin running
Pidgin tries to detect other instances to avoid configuration directory corruption. If you want multiple instances, pass the --multiple
flag. Do not forget to set --config
or your local data might be damaged. While debugging, I usually turn off all running instances. I want to check with a secondary instance just to see how it affects reproducing the issue.
Update: I spent four more hours investigating this issue. Eventually I read the libpurple source (again) and noticed it uses g_module_close
to unload the plug-in. Allegedly, on Linux, g_module_close
uses dlclose
under the hood. However, using dlclose
on a Go shared library is not supported.
https://github.com/golang/go/issues/12582#issuecomment-139556789
Calling dlclose on a Go shared library is just flat out not going to work.
https://github.com/golang/go/issues/11100#issuecomment-1336041839
there is nothing that the C developer can do to fix the problem.
The more interesting (and uncomfortable) question is: If it is not supported and by design does not work… why did it work so well up to now? It is quite possible that the issue I investigated is not the same as the one reported by you.
Update: After thinking about this some more, I came to the conclusion that my aforementioned findings are not relevant to your issue. It is necessary to try a new approach. It looks like with my debug local build, I cannot actually reproduce your exact back-trace. However, I noticed that g_slice_free_chain_with_offset
is used in purple_account_option_destroy
. It is likely that I messed something up while constructing the options. The options are loaded even if no account is set-up, so that figures.
If you could open up libpurple/accountopt.c
, go to purple_account_option_destroy(…)
and add something like purple_debug_info("accountopt", "purple_account_option_destroy called for option „%s“.\n", option->pref_name);
(before option->pref_name
is released of course), that would probably help immensely.
I've got this:
(HH:MM:SS) plugins: Unloading plugin WhatsApp (whatsmeow)
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „database-address“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „send-receipt“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „echo-sent-messages“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „message-expiration“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „message-cache-size“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „qrcode-size“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „embed-max-file-size“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „attachment-message“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „trusted-url-regex“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „handle-images“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „inline-stickers“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „discard-old-messages“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „group-is-file-origin“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „fake-online“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „fetch-contacts“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „get-icons“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „fetch-history“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „autojoin-chats“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „ignore-status-broadcast“.
(HH:MM:SS) accountopt: purple_account_option_destroy called for option „bridge-compatibility“.
free(): invalid pointer
And the crash information from gdb
Thread 1 "pidgin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
Which I think means that, bridge-compatibility
is the option that's causing the double free, but I'm not sure.
#0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid =
ret = 0
pd =
old_mask = {__val = {140737354128048}}
ret =
#1 0x00007ffff708a393 in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78
#2 0x00007ffff70396c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret =
#3 0x00007ffff70214b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {140737354129704, 93824999368704, 0, 0, 140737354125352, 93824994025824, 93824994105616, 140737488329304, 140737335296112, 140737488329952, 140737341831312, 140737354127880, 140737353917994, 140733193388036, 140737488329303, 140737488329312}}, sa_flags = -134441759, sa_restorer = 0x7fffffff9a00}
#4 0x00007ffff7022395 in __libc_message_impl (fmt=fmt@entry=0x7ffff719a2ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 1731472250, overflow_arg_area = 0x7fffffff9a30, reg_save_area = 0x7fffffff99c0}}
fd = 2
iov = {{iov_base = 0x7ffff719806b, iov_len = 23}, {iov_base = 0x7ffff719a2ec, iov_len = 1}, {iov_base = 0x7fffffff99a0, iov_len = 140737340802237}, {iov_base = 0x555555707130, iov_len = 0}, {iov_base = 0x3000000018, iov_len = 0}, {iov_base = 0x0, iov_len = 635641395339407104}, {iov_base = 0x7fffffff99e0, iov_len = 140737340802237}}
iovcnt =
total =
cp =
#5 0x00007ffff70942a7 in malloc_printerr (str=str@entry=0x7ffff719806b "free(): invalid pointer") at malloc.c:5772
#6 0x00007ffff70965b4 in _int_free (av=, p=, have_lock=have_lock@entry=0) at malloc.c:4507
size =
fb =
#7 0x00007ffff7098e93 in __GI___libc_free (mem=) at malloc.c:3398
ar_ptr =
p =
err = 0
#8 0x00007ffff7509b91 in g_slice_free_chain_with_offset (mem_size=24, mem_chain=, next_offset=8) at ../glib/glib/gslice.c:315
current =
slice = 0x0
#9 0x00007ffff733f978 in purple_plugin_destroy (plugin=0x55555571e330) at plugin.c:828
__func__ = "purple_plugin_destroy"
#10 0x00007ffff7340b8d in purple_plugins_destroy_all () at plugin.c:1269
#11 0x00007ffff732325b in purple_core_quit () at core.c:250
ops = 0x555555978960
core = 0x5555556df410
__func__ = "purple_core_quit"
#12 0x00007ffff743e740 in g_closure_invoke (closure=0x555555978960, return_value=0x0, n_param_values=1, param_values=0x7fffffff9d90, invocation_hint=0x7fffffff9ce0)
at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7443890
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555978940
__func__ = "g_closure_invoke"
#13 0x00007ffff746d756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffff9e60, detail=detail@entry=0, instance=instance@entry=0x5555559783d0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffff9d90) at ../glib/gobject/gsignal.c:3888
tmp =
handler = 0x555555977c80
accumulator =
emission = {next = 0x7fffffffa1d0, instance = 0x5555559783d0, ihint = {signal_id = 135, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure =
hlist =
handler_list = 0x555555977c80
return_accu =
accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id =
max_sequential_handler_number =
return_value_altered =
n_params =
EMIT_RESTART =
__func__ = { }
#14 0x00007ffff745e612 in signal_emit_valist_unlocked
(instance=instance@entry=0x5555559783d0, signal_id=signal_id@entry=135, detail=detail@entry=0, var_args=var_args@entry=0x7fffffff9fc0) at ../glib/gobject/gsignal.c:3520
instance_and_params =
param_values =
node =
i =
node_copy = Python Exception : value has been optimized out
{signal_id = 135, itype = , name = 0x7ffff7d8c53e "activate", destroyed = 0, flags = 33, n_params = 0, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x0, return_type = 0x4, class_closure_bsa = 0x555555870d00, accumulator = 0x0, c_marshaller = 0x7ffff7443890 , va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x5555558b33b0}
__func__ = "signal_emit_valist_unlocked"
#15 0x00007ffff745e847 in g_signal_emit_valist (instance=0x5555559783d0, signal_id=135, detail=0, var_args=var_args@entry=0x7fffffff9fc0) at ../glib/gobject/gsignal.c:3263
#16 0x00007ffff745e904 in g_signal_emit (instance=, signal_id=, detail=) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffa0a0, reg_save_area = 0x7fffffff9fe0}}
#17 0x00007ffff7c69321 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007ffff743e740 in g_closure_invoke
(closure=0x5555559789b0, return_value=0x7fffffffa200, n_param_values=4, param_values=0x7fffffffa290, invocation_hint=0x7fffffffa1e0) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7c692e0
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555978990
__func__ = "g_closure_invoke"
#19 0x00007ffff746d756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffa3b0, detail=detail@entry=950, instance=instance@entry=0x55555597a300, emission_return=emission_return@entry=0x7fffffffa430, instance_and_params=instance_and_params@entry=0x7fffffffa290) at ../glib/gobject/gsignal.c:3888
tmp =
handler = 0x5555559bbd40
accumulator =
emission = {next = 0x7fffffffa810, instance = 0x55555597a300, ihint = {signal_id = 133, detail = 950, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure =
hlist =
handler_list = 0x5555559adba0
return_accu =
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id =
max_sequential_handler_number =
return_value_altered =
n_params =
EMIT_RESTART =
__func__ = { }
#20 0x00007ffff745df05 in signal_emit_valist_unlocked
(instance=instance@entry=0x55555597a300, signal_id=signal_id@entry=133, detail=detail@entry=950, var_args=var_args@entry=0x7fffffffa510)
at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype =
static_scope =
instance_and_params =
param_values =
node =
i =
node_copy = Python Exception : value has been optimized out
{signal_id = 133, itype = , name = 0x7ffff7cf62a2 "accel-activate", destroyed = 0, flags = 16, n_params = 3, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x5555558b1050, return_type = 0x14, class_closure_bsa = 0x0, accumulator = 0x5555557ebae0, c_marshaller = 0x7ffff7b39320, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x1}
__func__ = "signal_emit_valist_unlocked"
#21 0x00007ffff745e847 in g_signal_emit_valist (instance=0x55555597a300, signal_id=133, detail=950, var_args=var_args@entry=0x7fffffffa510) at ../glib/gobject/gsignal.c:3263
#22 0x00007ffff745e904 in g_signal_emit (instance=, signal_id=, detail=) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffffffa5f0, reg_save_area = 0x7fffffffa530}}
#23 0x00007ffff7a67ecf in gtk_accel_group_activate () at /usr/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff7a68e09 in gtk_accel_groups_activate () at /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007ffff7c7f3fd in gtk_window_activate_key () at /usr/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff7c7f455 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#27 0x00007ffff7b38f08 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#28 0x00007ffff743e740 in g_closure_invoke
(closure=0x5555557a7920, return_value=0x7fffffffa840, n_param_values=2, param_values=0x7fffffffa8d0, invocation_hint=0x7fffffffa820) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7443820
marshal_data = 0x190
in_marshal = 0
real_closure = 0x5555557a7900
__func__ = "g_closure_invoke"
#29 0x00007ffff746de0a in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffa9c0, detail=detail@entry=0, instance=instance@entry=0x5555559e09e0, emission_return=emission_return@entry=0x7fffffffaa40, instance_and_params=instance_and_params@entry=0x7fffffffa8d0) at ../glib/gobject/gsignal.c:3928
accumulator =
emission = Python Exception : value has been optimized out
{next = 0x0, instance = 0x5555559e09e0, ihint = {signal_id = 50, detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN, chain_type = }
class_closure =
hlist =
handler_list = 0x555555975480
return_accu =
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id =
max_sequential_handler_number =
return_value_altered =
n_params =
EMIT_RESTART =
__func__ = { }
#30 0x00007ffff745df05 in signal_emit_valist_unlocked
(instance=instance@entry=0x5555559e09e0, signal_id=signal_id@entry=50, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffab20) at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype =
static_scope =
instance_and_params =
param_values =
node =
i =
node_copy = Python Exception : value has been optimized out
{signal_id = 50, itype = , name = 0x7ffff7cfe1da "key-press-event", destroyed = 0, flags = 2, n_params = 1, single_va_closure_is_valid = 1, single_va_closure_is_after = 1, param_types = 0x5555557a7950, return_type = 0x14, class_closure_bsa = 0x5555557a7a00, accumulator = 0x5555557a79e0, c_marshaller = 0x7ffff7b38ea0, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x5555557a7920}
__func__ = "signal_emit_valist_unlocked"
#31 0x00007ffff745e847 in g_signal_emit_valist (instance=0x5555559e09e0, signal_id=50, detail=0, var_args=var_args@entry=0x7fffffffab20) at ../glib/gobject/gsignal.c:3263
#32 0x00007ffff745e904 in g_signal_emit (instance=, signal_id=, detail=) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffac00, reg_save_area = 0x7fffffffab40}}
#33 0x00007ffff7c6d88d in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#34 0x00007ffff7b3d747 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#35 0x00007ffff7b3ed73 in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#36 0x00007ffff79a4dbc in ??? () at /usr/lib/libgdk-x11-2.0.so.0
#37 0x00007ffff74e8279 in g_main_dispatch (context=0x5555556a59b0) at ../glib/glib/gmain.c:3344
dispatch = 0x7ffff79a4d20
prev_source = 0x0
begin_time_nsec = 801904023279414
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = 0x0
cb_data = 0x0
need_destroy =
source = 0x5555556dda40
current = 0x555555b738d0
i = 0
__func__ = "g_main_dispatch"
#38 0x00007ffff75474ff in g_main_context_dispatch_unlocked (context=0x5555556a59b0) at ../glib/glib/gmain.c:4152
#39 g_main_context_iterate_unlocked.isra.0 (context=0x5555556a59b0, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/glib/gmain.c:4217
max_priority = 2147483647
timeout = 26978
some_ready = 1
nfds = 6
allocated_nfds = 6
fds = 0x555555b8d260
begin_time_nsec = 801904022770649
#40 0x00007ffff74e8ea7 in g_main_loop_run (loop=0x555555b73970) at ../glib/glib/gmain.c:4419
self =
__func__ = "g_main_loop_run"
#41 0x00007ffff7b38473 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#42 0x00005555555fe166 in main (argc=2, argv=0x7fffffffd348) at gtkmain.c:947
opt_force_online = 0
opt_help = 0
opt_login = 0
opt_nologin = 0
opt_version = 0
opt_si = 1
opt_config_dir_arg = 0x0
opt_login_arg = 0x0
opt_session_arg = 0x0
search_path = 0x5555556cd330 "\001"
accounts = 0x0
sig_indx = 1
sigset = {__val = {82950, 0 }}
errmsg = '\000' ...
signal_channel = 0x5555556a5820
signal_status = G_IO_STATUS_NORMAL
signal_channel_watcher = 1
segfault_message_tmp = 0x5555556a52f0 "\300|tUUU"
error = 0x0
opt = -1
gui_check = 1
debug_enabled = 1
migration_failed = 0
active_accounts = Python Exception : Cannot access memory at address 0x21
(has the message been displayed fine with the manual insertion of the code and pre html tags?, I think, from the preview, yes)
Thank you very much for your help in this matter.
Which I think means that, bridge-compatibility is the option that's causing the double free, but I'm not sure.
I am not sure, either. That option is a boolean. If a true/false value was the source of the problem, then I would be surprised.
purple_plugin_destroy (plugin=0x55555571e330) at plugin.c:828
points to this line:
g_list_free(plugin->info->dependencies);
This strikes me as odd since the info of purple-gowhatsapp does not even touch the dependencies
field. Can you add some debug output to that part so it looks like this?:
if (plugin->info != NULL) {
purple_debug_info("plugins", "plugin->info points to %p.\n", plugin->info);
purple_debug_info("plugins", "Plugin %s has dependencies at %p.\n", plugin->info->name, plugin->info->dependencies);
g_list_free(plugin->info->dependencies);
purple_debug_info("plugins", "g_list_free(plugin->info->dependencies) has succeeded without error.\n");
}
Do not forget to add the braces.
has the message been displayed fine with the manual insertion of the code and pre html tags?
It is looking good. :)
(18:02:43) plugins: Unloading plugin WhatsApp (whatsmeow)
(18:02:43) accountopt: purple_account_option_destroy called for option „database-address“.
(18:02:43) accountopt: purple_account_option_destroy called for option „send-receipt“.
(18:02:43) accountopt: purple_account_option_destroy called for option „echo-sent-messages“.
(18:02:43) accountopt: purple_account_option_destroy called for option „message-expiration“.
(18:02:43) accountopt: purple_account_option_destroy called for option „message-cache-size“.
(18:02:43) accountopt: purple_account_option_destroy called for option „qrcode-size“.
(18:02:43) accountopt: purple_account_option_destroy called for option „embed-max-file-size“.
(18:02:43) accountopt: purple_account_option_destroy called for option „attachment-message“.
(18:02:43) accountopt: purple_account_option_destroy called for option „trusted-url-regex“.
(18:02:43) accountopt: purple_account_option_destroy called for option „handle-images“.
(18:02:43) accountopt: purple_account_option_destroy called for option „inline-stickers“.
(18:02:43) accountopt: purple_account_option_destroy called for option „discard-old-messages“.
(18:02:43) accountopt: purple_account_option_destroy called for option „group-is-file-origin“.
(18:02:43) accountopt: purple_account_option_destroy called for option „fake-online“.
(18:02:43) accountopt: purple_account_option_destroy called for option „fetch-contacts“.
(18:02:43) accountopt: purple_account_option_destroy called for option „get-icons“.
(18:02:43) accountopt: purple_account_option_destroy called for option „fetch-history“.
(18:02:43) accountopt: purple_account_option_destroy called for option „autojoin-chats“.
(18:02:43) accountopt: purple_account_option_destroy called for option „ignore-status-broadcast“.
(18:02:43) accountopt: purple_account_option_destroy called for option „bridge-compatibility“.
(18:02:43) plugins: plugin->info points to 0x7ffff348e1c0.
(18:02:43) plugins: Plugin WhatsApp (whatsmeow) has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3cb9060.
(18:02:43) plugins: Plugin Mouse Gestures has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c40020.
(18:02:43) plugins: Plugin XMPP Service Discovery has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3cb2060.
(18:02:43) plugins: Plugin Message Timestamp Formats has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c36020.
(18:02:43) plugins: Plugin Send Button has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c31060.
(18:02:43) plugins: Plugin GNU Talk Filters has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c2b020.
(18:02:43) plugins: Plugin Release Notification has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c26020.
(18:02:43) plugins: Plugin History has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c20060.
(18:02:43) plugins: Plugin ExtPlacement has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c1b060.
(18:02:43) plugins: Plugin Timestamp has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff35bf060.
(18:02:43) plugins: Plugin Pidgin GTK+ Theme Control has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3c15060.
(18:02:43) plugins: Plugin Conversation Colors has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff35b7060.
(18:02:43) plugins: Plugin Off-the-Record Messaging has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff3597020.
(18:02:43) plugins: Plugin XMPP Console has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff275f020.
(18:02:43) plugins: Plugin Iconify on Away has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff275a180.
(18:02:43) plugins: Plugin LaTeX has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff2753060.
(18:02:43) plugins: Plugin Text replacement has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff2743060.
(18:02:43) plugins: Plugin Music Messaging has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff273c020.
(18:02:43) plugins: Plugin Buddy Notes has dependencies at 0x5555556e33d0.
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff2737060.
(18:02:43) plugins: Plugin Message Notification has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff2730060.
(18:02:43) plugins: Plugin Transparency has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff2729060.
(18:02:43) plugins: Plugin Markerline has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff20be020.
(18:02:43) plugins: Plugin Buddy Ticker has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff20b6020.
(18:02:43) plugins: Plugin Pidgin Theme Editor has dependencies at (nil).
(18:02:43) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:02:43) plugins: plugin->info points to 0x7ffff20af020.
(18:02:43) plugins: Plugin XMPP Receipts has dependencies at 0x7ffff20af0e0.
free(): invalid pointer
Thread 1 "pidgin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) x/a
Argument required (starting display address).
(gdb) bt full
#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 = {77}}
ret = <optimized out>
#1 0x00007ffff6b97393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff6b466c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007ffff6b2e4b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {93824993344560, 0, 140737334097344, 140737334087760, 140737332643028, 18446744073709551488, 0, 93824993215232, 140737332797075, 93824993392128, 10830821194775749120, 93824994484080, 93824994484080, 93824994484080, 140737338504208, 206158430240}}, sa_flags = -21120, sa_restorer = 0x7fffffffacb0}
#4 0x00007ffff6b2f395 in __libc_message_impl (fmt=fmt@entry=0x7ffff6ca72ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 0, overflow_arg_area = 0x7fffffffadf0, reg_save_area = 0x7fffffffad80}}
fd = 2
iov = {{iov_base = 0x7ffff6ca506b, iov_len = 23}, {iov_base = 0x7ffff6ca72ec, iov_len = 1}, {iov_base = 0x8, iov_len = 140737335742424}, {iov_base = 0xffffffffffffff80, iov_len = 0}, {iov_base = 0x555555644300 <ops>, iov_len = 10830821194775749120}, {iov_base = 0x2, iov_len = 93824994215808}, {iov_base = 0x555555644300 <ops>, iov_len = 140737336072369}}
iovcnt = <optimized out>
total = <optimized out>
cp = <optimized out>
#5 0x00007ffff6ba12a7 in malloc_printerr (str=str@entry=0x7ffff6ca506b "free(): invalid pointer") at malloc.c:5772
#6 0x00007ffff6ba35b4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4507
size = <optimized out>
fb = <optimized out>
#7 0x00007ffff6ba5e93 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
ar_ptr = <optimized out>
p = <optimized out>
err = 0
#8 0x00007ffff712eb91 in g_slice_free_chain_with_offset (mem_size=24, mem_chain=<optimized out>, next_offset=8) at ../glib/glib/gslice.c:315
current = <optimized out>
slice = 0x0
#9 0x00007ffff6e52b62 in purple_plugin_destroy (plugin=0x5555556e7df0) at plugin.c:830
__func__ = "purple_plugin_destroy"
#10 0x00007ffff6e53588 in purple_plugins_destroy_all () at plugin.c:1273
#11 0x00007ffff6e3e100 in purple_core_quit () at core.c:250
ops = <optimized out>
core = 0x5555556a9450
__func__ = "purple_core_quit"
#12 0x000055555558d3a6 in main (argc=<optimized out>, argv=<optimized out>) at gtkmain.c:847
conn = 0x5555556b0aa0
message = 0x5555557b0aa0
tr = 1
opt_force_online = <optimized out>
opt_help = <optimized out>
opt_login = <optimized out>
opt_nologin = <optimized out>
opt_version = <optimized out>
opt_si = <optimized out>
opt_config_dir_arg = 0x0
opt_login_arg = 0x0
opt_session_arg = 0x0
search_path = <optimized out>
accounts = <optimized out>
sig_indx = 1
sigset = {__val = {82950, 0 <repeats 15 times>}}
errmsg = '\000' <repeats 1080 times>...
signal_channel = <optimized out>
signal_status = <optimized out>
signal_channel_watcher = 1
segfault_message_tmp = <optimized out>
error = 0x0
opt = <optimized out>
gui_check = <optimized out>
debug_enabled = <optimized out>
migration_failed = <optimized out>
active_accounts = <optimized out>
long_options = {{name = 0x555555613a2f "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55555560cf31 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5555556135cb "force-online", has_arg = 0, flag = 0x0, val = 102}, {name = 0x55555560e552 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x555555613477 "login", has_arg = 2, flag = 0x0, val = 108}, {name = 0x5555556135d8 "multiple", has_arg = 0, flag = 0x0, val = 109}, {name = 0x5555556135e1 "nologin", has_arg = 0, flag = 0x0, val = 110}, {name = 0x555555614e2c "session", has_arg = 1, flag = 0x0, val = 115}, {name = 0x55555560ec9d "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5555556135e9 "display", has_arg = 1, flag = 0x0, val = 68}, {name = 0x555555613662 "sync", has_arg = 0, flag = 0x0, val = 83}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
(gdb)
Do note that I left the other instance up, but that shouldn't change the behaviour, I might later do it again without running the other instance
Without any other instances:
(18:17:25) plugins: Unloading plugin WhatsApp (whatsmeow)
(18:17:25) accountopt: purple_account_option_destroy called for option „database-address“.
(18:17:25) accountopt: purple_account_option_destroy called for option „send-receipt“.
(18:17:25) accountopt: purple_account_option_destroy called for option „echo-sent-messages“.
(18:17:25) accountopt: purple_account_option_destroy called for option „message-expiration“.
(18:17:25) accountopt: purple_account_option_destroy called for option „message-cache-size“.
(18:17:25) accountopt: purple_account_option_destroy called for option „qrcode-size“.
(18:17:25) accountopt: purple_account_option_destroy called for option „embed-max-file-size“.
(18:17:25) accountopt: purple_account_option_destroy called for option „attachment-message“.
(18:17:25) accountopt: purple_account_option_destroy called for option „trusted-url-regex“.
(18:17:25) accountopt: purple_account_option_destroy called for option „handle-images“.
(18:17:25) accountopt: purple_account_option_destroy called for option „inline-stickers“.
(18:17:25) accountopt: purple_account_option_destroy called for option „discard-old-messages“.
(18:17:25) accountopt: purple_account_option_destroy called for option „group-is-file-origin“.
(18:17:25) accountopt: purple_account_option_destroy called for option „fake-online“.
(18:17:25) accountopt: purple_account_option_destroy called for option „fetch-contacts“.
(18:17:25) accountopt: purple_account_option_destroy called for option „get-icons“.
(18:17:25) accountopt: purple_account_option_destroy called for option „fetch-history“.
(18:17:25) accountopt: purple_account_option_destroy called for option „autojoin-chats“.
(18:17:25) accountopt: purple_account_option_destroy called for option „ignore-status-broadcast“.
(18:17:25) accountopt: purple_account_option_destroy called for option „bridge-compatibility“.
(18:17:25) plugins: plugin->info points to 0x7ffff348e1c0.
(18:17:25) plugins: Plugin WhatsApp (whatsmeow) has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3cd9060.
(18:17:25) plugins: Plugin Mouse Gestures has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c40020.
(18:17:25) plugins: Plugin XMPP Service Discovery has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3cb1060.
(18:17:25) plugins: Plugin Message Timestamp Formats has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c36020.
(18:17:25) plugins: Plugin Send Button has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c31060.
(18:17:25) plugins: Plugin GNU Talk Filters has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c2b020.
(18:17:25) plugins: Plugin Release Notification has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c26020.
(18:17:25) plugins: Plugin History has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c20060.
(18:17:25) plugins: Plugin ExtPlacement has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c1b060.
(18:17:25) plugins: Plugin Timestamp has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff35bf060.
(18:17:25) plugins: Plugin Pidgin GTK+ Theme Control has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3c15060.
(18:17:25) plugins: Plugin Conversation Colors has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff35b7060.
(18:17:25) plugins: Plugin Off-the-Record Messaging has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff3597020.
(18:17:25) plugins: Plugin XMPP Console has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff279f020.
(18:17:25) plugins: Plugin Iconify on Away has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff279a180.
(18:17:25) plugins: Plugin LaTeX has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff2793060.
(18:17:25) plugins: Plugin Text replacement has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff2783060.
(18:17:25) plugins: Plugin Music Messaging has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff277c020.
(18:17:25) plugins: Plugin Buddy Notes has dependencies at 0x5555556e38f0.
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff2777060.
(18:17:25) plugins: Plugin Message Notification has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff272f060.
(18:17:25) plugins: Plugin Transparency has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff2728060.
(18:17:25) plugins: Plugin Markerline has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff20ff020.
(18:17:25) plugins: Plugin Buddy Ticker has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff20f7020.
(18:17:25) plugins: Plugin Pidgin Theme Editor has dependencies at (nil).
(18:17:25) plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
(18:17:25) plugins: plugin->info points to 0x7ffff20f0020.
(18:17:25) plugins: Plugin XMPP Receipts has dependencies at 0x7ffff20f00e0.
free(): invalid pointer
Thread 1 "pidgin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt full
#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 = {77}}
ret = <optimized out>
#1 0x00007ffff6b97393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff6b466c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007ffff6b2e4b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {93825005258960, 140737337788560, 140737334097344, 140737334087760, 140737332643028, 18446744073709551488, 0, 93824993215232, 140737332797075, 93824993392128, 7067652454724457984, 93825008741920, 93825008741920, 93825008741920, 140737338504208, 206158430240}}, sa_flags = -26080, sa_restorer = 0x7fffffff9950}
#4 0x00007ffff6b2f395 in __libc_message_impl (fmt=fmt@entry=0x7ffff6ca72ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 0, overflow_arg_area = 0x7fffffff9a90, reg_save_area = 0x7fffffff9a20}}
fd = 2
iov = {{iov_base = 0x7ffff6ca506b, iov_len = 23}, {iov_base = 0x7ffff6ca72ec, iov_len = 1}, {iov_base = 0x8, iov_len = 140737335742424}, {iov_base = 0xffffffffffffff80, iov_len = 0}, {iov_base = 0x555555644300 <ops>, iov_len = 7067652454724457984}, {iov_base = 0x2, iov_len = 93824994217120}, {iov_base = 0x555555644300 <ops>, iov_len = 140737336072369}}
iovcnt = <optimized out>
total = <optimized out>
cp = <optimized out>
#5 0x00007ffff6ba12a7 in malloc_printerr (str=str@entry=0x7ffff6ca506b "free(): invalid pointer") at malloc.c:5772
#6 0x00007ffff6ba35b4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4507
size = <optimized out>
fb = <optimized out>
#7 0x00007ffff6ba5e93 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
ar_ptr = <optimized out>
p = <optimized out>
err = 0
#8 0x00007ffff712eb91 in g_slice_free_chain_with_offset (mem_size=24, mem_chain=<optimized out>, next_offset=8) at ../glib/glib/gslice.c:315
current = <optimized out>
slice = 0x0
#9 0x00007ffff6e52b62 in purple_plugin_destroy (plugin=0x5555556e8310) at plugin.c:830
__func__ = "purple_plugin_destroy"
#10 0x00007ffff6e53588 in purple_plugins_destroy_all () at plugin.c:1273
#11 0x00007ffff6e3e100 in purple_core_quit () at core.c:250
ops = <optimized out>
core = 0x5555556a9410
__func__ = "purple_core_quit"
#12 0x00007ffff7063740 in g_closure_invoke (closure=0x555555984ac0, return_value=0x0, n_param_values=1, param_values=0x7fffffff9dc0, invocation_hint=0x7fffffff9d10)
at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7068890 <g_cclosure_marshal_VOID__VOID>
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555984aa0
__func__ = "g_closure_invoke"
#13 0x00007ffff7092756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffff9e90, detail=detail@entry=0, instance=instance@entry=0x5555558e72b0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffff9dc0) at ../glib/gobject/gsignal.c:3888
tmp = <optimized out>
handler = 0x555555989100
accumulator = <optimized out>
emission = {next = 0x7fffffffa200, instance = 0x5555558e72b0, ihint = {signal_id = 135, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x555555989100
return_accu = <optimized out>
accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#14 0x00007ffff7083612 in signal_emit_valist_unlocked
(instance=instance@entry=0x5555558e72b0, signal_id=signal_id@entry=135, detail=detail@entry=0, var_args=var_args@entry=0x7fffffff9ff0) at ../glib/gobject/gsignal.c:3520
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = {signal_id = 135, itype = 0x5555557980e0 [GtkMenuItem/GtkItem/GtkBin/GtkContainer/GtkWidget/GtkObject/GInitiallyUnowned], name = 0x7ffff7b8c53e "activate", destroyed = 0, flags = 33, n_params = 0, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x0, return_type = 0x4, class_closure_bsa = 0x55555583fe70, accumulator = 0x0, c_marshaller = 0x7ffff7068890 <g_cclosure_marshal_VOID__VOID>, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x55555587c470}
__func__ = "signal_emit_valist_unlocked"
#15 0x00007ffff7083847 in g_signal_emit_valist (instance=0x5555558e72b0, signal_id=135, detail=0, var_args=var_args@entry=0x7fffffff9ff0) at ../glib/gobject/gsignal.c:3263
#16 0x00007ffff7083904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffa0d0, reg_save_area = 0x7fffffffa010}}
#17 0x00007ffff7a69321 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007ffff7063740 in g_closure_invoke
(closure=0x555555984b10, return_value=0x7fffffffa230, n_param_values=4, param_values=0x7fffffffa2c0, invocation_hint=0x7fffffffa210) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7a692e0
marshal_data = 0x0
in_marshal = 0
real_closure = 0x555555984af0
__func__ = "g_closure_invoke"
#19 0x00007ffff7092756 in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffa3e0, detail=detail@entry=948, instance=instance@entry=0x5555559bb1f0, emission_return=emission_return@entry=0x7fffffffa460, instance_and_params=instance_and_params@entry=0x7fffffffa2c0) at ../glib/gobject/gsignal.c:3888
tmp = <optimized out>
handler = 0x555555984df0
accumulator = <optimized out>
emission = {next = 0x7fffffffa840, instance = 0x5555559bb1f0, ihint = {signal_id = 133, detail = 948, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = 0x4}
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x555555893870
return_accu = <optimized out>
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#20 0x00007ffff7082f05 in signal_emit_valist_unlocked
(instance=instance@entry=0x5555559bb1f0, signal_id=signal_id@entry=133, detail=detail@entry=948, var_args=var_args@entry=0x7fffffffa540)
at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype = <optimized out>
static_scope = <optimized out>
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = {signal_id = 133, itype = 0x555555876180 [GtkAccelGroup], name = 0x7ffff7af62a2 "accel-activate", destroyed = 0, flags = 16, n_params = 3, single_va_closure_is_valid = 1, single_va_closure_is_after = 0, param_types = 0x55555587a210, return_type = 0x14, class_closure_bsa = 0x0, accumulator = 0x5555557b5bd0, c_marshaller = 0x7ffff7939320, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x1}
__func__ = "signal_emit_valist_unlocked"
#21 0x00007ffff7083847 in g_signal_emit_valist (instance=0x5555559bb1f0, signal_id=133, detail=948, var_args=var_args@entry=0x7fffffffa540) at ../glib/gobject/gsignal.c:3263
#22 0x00007ffff7083904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffffffa620, reg_save_area = 0x7fffffffa560}}
#23 0x00007ffff7867ecf in gtk_accel_group_activate () at /usr/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff7868e09 in gtk_accel_groups_activate () at /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007ffff7a7f3fd in gtk_window_activate_key () at /usr/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff7a7f455 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#27 0x00007ffff7938f08 in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#28 0x00007ffff7063740 in g_closure_invoke
(closure=0x555555771a00, return_value=0x7fffffffa870, n_param_values=2, param_values=0x7fffffffa900, invocation_hint=0x7fffffffa850) at ../glib/gobject/gclosure.c:834
marshal = 0x7ffff7068820 <g_type_class_meta_marshal>
marshal_data = 0x190
in_marshal = 0
real_closure = 0x5555557719e0
__func__ = "g_closure_invoke"
#29 0x00007ffff7092e0a in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7fffffffa9f0, detail=detail@entry=0, instance=instance@entry=0x55555576fdd0, emission_return=emission_return@entry=0x7fffffffaa70, instance_and_params=instance_and_params@entry=0x7fffffffa900) at ../glib/gobject/gsignal.c:3928
accumulator = <optimized out>
emission = {next = 0x0, instance = 0x55555576fdd0, ihint = {signal_id = 50, detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN, chain_type = 0x55555576c0a0 [GtkWindow/GtkBin/GtkContainer/GtkWidget/GtkObject/GInitiallyUnowned]}
class_closure = <optimized out>
hlist = <optimized out>
handler_list = 0x55555597a240
return_accu = <optimized out>
accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = <optimized out>
max_sequential_handler_number = <optimized out>
return_value_altered = <optimized out>
n_params = <optimized out>
EMIT_RESTART = <optimized out>
__func__ = {<optimized out> <repeats 23 times>}
#30 0x00007ffff7082f05 in signal_emit_valist_unlocked
(instance=instance@entry=0x55555576fdd0, signal_id=signal_id@entry=50, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffab50) at ../glib/gobject/gsignal.c:3533
return_value = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
error = 0x0
rtype = <optimized out>
static_scope = <optimized out>
instance_and_params = <optimized out>
param_values = <optimized out>
node = <optimized out>
i = <optimized out>
node_copy = {signal_id = 50, itype = 0x55555576ba00 [GtkWidget/GtkObject/GInitiallyUnowned], name = 0x7ffff7afe1da "key-press-event", destroyed = 0, flags = 2, n_params = 1, single_va_closure_is_valid = 1, single_va_closure_is_after = 1, param_types = 0x555555771a30, return_type = 0x14, class_closure_bsa = 0x555555771ae0, accumulator = 0x555555771ac0, c_marshaller = 0x7ffff7938ea0, va_marshaller = 0x0, emission_hooks = 0x0, single_va_closure = 0x555555771a00}
__func__ = "signal_emit_valist_unlocked"
#31 0x00007ffff7083847 in g_signal_emit_valist (instance=0x55555576fdd0, signal_id=50, detail=0, var_args=var_args@entry=0x7fffffffab50) at ../glib/gobject/gsignal.c:3263
#32 0x00007ffff7083904 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3583
var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffac30, reg_save_area = 0x7fffffffab70}}
#33 0x00007ffff7a6d88d in ??? () at /usr/lib/libgtk-x11-2.0.so.0
#34 0x00007ffff793d747 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#35 0x00007ffff793ed73 in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#36 0x00007ffff7d03dbc in ??? () at /usr/lib/libgdk-x11-2.0.so.0
#37 0x00007ffff710d279 in g_main_dispatch (context=0x55555566f9b0) at ../glib/glib/gmain.c:3344
dispatch = 0x7ffff7d03d20
prev_source = 0x0
begin_time_nsec = 874904847492842
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = 0x0
cb_data = 0x0
need_destroy = <optimized out>
source = 0x5555556a7a40
current = 0x555555b3e540
i = 0
__func__ = "g_main_dispatch"
#38 0x00007ffff716c4ff in g_main_context_dispatch_unlocked (context=0x55555566f9b0) at ../glib/glib/gmain.c:4152
#39 g_main_context_iterate_unlocked.isra.0 (context=0x55555566f9b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
max_priority = 2147483647
timeout = 28153
some_ready = 1
nfds = 6
allocated_nfds = 6
fds = 0x555555b57cc0
begin_time_nsec = 874904847214689
#40 0x00007ffff710dea7 in g_main_loop_run (loop=0x555555b3e590) at ../glib/glib/gmain.c:4419
self = <optimized out>
__func__ = "g_main_loop_run"
#41 0x00007ffff7938473 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#42 0x000055555558cf3d in main (argc=<optimized out>, argv=<optimized out>) at gtkmain.c:947
opt_force_online = <optimized out>
opt_help = <optimized out>
opt_login = <optimized out>
opt_nologin = <optimized out>
opt_version = <optimized out>
opt_si = <optimized out>
opt_config_dir_arg = <optimized out>
opt_login_arg = <optimized out>
opt_session_arg = <optimized out>
search_path = <optimized out>
accounts = <optimized out>
sig_indx = 1
sigset = {__val = {82950, 0 <repeats 15 times>}}
errmsg = '\000' <repeats 1080 times>...
signal_channel = <optimized out>
signal_status = <optimized out>
signal_channel_watcher = 1
segfault_message_tmp = <optimized out>
error = 0x0
opt = <optimized out>
gui_check = <optimized out>
debug_enabled = <optimized out>
migration_failed = <optimized out>
active_accounts = <optimized out>
long_options = {{name = 0x555555613a2f "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55555560cf31 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5555556135cb "force-online", has_arg = 0, flag = 0x0, val = 102}, {name = 0x55555560e552 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x555555613477 "login", has_arg = 2, flag = 0x0, val = 108}, {name = 0x5555556135d8 "multiple", has_arg = 0, flag = 0x0, val = 109}, {name = 0x5555556135e1 "nologin", has_arg = 0, flag = 0x0, val = 110}, {name = 0x555555614e2c "session", has_arg = 1, flag = 0x0, val = 115}, {name = 0x55555560ec9d "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5555556135e9 "display", has_arg = 1, flag = 0x0, val = 68}, {name = 0x555555613662 "sync", has_arg = 0, flag = 0x0, val = 83}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
(gdb)
Thank you for the extensive research. In both traces, whatsmeow is looking fine:
plugins: Plugin WhatsApp (whatsmeow) has dependencies at (nil).
plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
However, later on, there is another plug-in which actually makes use of dependencies:
plugins: plugin->info points to 0x….
plugins: Plugin XMPP Receipts has dependencies at 0x….
And releasing those fails. Maybe the log messages were printed slightly out of order. Can you temporarily remove the XMPP Receipts plug-in just to make sure? Not just disable the XMPP Receipts plug-in, but actually remove the .so file from the plugins directory.
Thank you for the extensive research. In both traces, whatsmeow is looking fine:
plugins: Plugin WhatsApp (whatsmeow) has dependencies at (nil). plugins: g_list_free(plugin->info->dependencies) has succeeded without error.
However, later on, there is another plug-in which actually makes use of dependencies:
plugins: plugin->info points to 0x…. plugins: Plugin XMPP Receipts has dependencies at 0x….
And releasing those fails. Maybe the log messages were printed slightly out of order. Can you temporarily remove the XMPP Receipts plug-in just to make sure? Not just disable the XMPP Receipts plug-in, but actually remove the .so file from the plugins directory.
Yes, it seems to be related to that plugin, and as I'm not using XMPP in pidgin, I've uninstalled it, and it no longer happens.
I don't think it was a issue with the logs, I think it's more likely that the other plugin didn't make a message to the log. As doing grep 'Receipts'
to the list of backtrace files I collected gives me this:
pidgin-backtrace-1713383657.log:(21:57:43) whatsmeow: [Handler] Event type not handled: &events.OfflineSyncPreview{Total:2, AppDataChanges:0, Messages:0, Notifications:0, Receipts:2}
pidgin-backtrace-1713455873.log:(18:02:43) plugins: Plugin XMPP Receipts has dependencies at 0x7ffff20af0e0.
pidgin-backtrace-1713455873.log:(18:17:25) plugins: Plugin XMPP Receipts has dependencies at 0x7ffff20f00e0.
I don't think it's required to implement events.OfflineSyncPreview
and that'd be offtopic for this issue anyways, which leads me to think the plugin still loads even when it's configured to not load, and it still unloads and fails.
I should probably make a issue in their repo but having a last updated time of 2014-05-03 doesn't inspire me confidence that it will be fixed.
Thank you for your cooperation and staying on this with me until the end. 🙂
There is also a copy over here. I have no idea which is the more relevant and/or maintained one.
The purple documentation says in regard to the dependencies member:
This is a GList of plugin dependencies. (…) If your plugin has dependencies, set them at run-time in the plugin_init function.
The XMPP Receipts plugin uses a pointer to a struct allocated in static memory. So that definitely is an error in their implementation.
Attached below is a
bt full
from pidgin (Pidgin 2.14.13 (libpurple 2.14.13)) crashing after a double free, as told by grim on IRC. I can reproduce this reliably every time I close pidgin, and if guided on how to, (given the exact gdb commands) I can try to get more information by viewing the generated core files or by inspecting a attached process in this state. I will need to be reminded to set the proper debuginfod variable, but that's easy, as I might remind myself.The problem is the following: every time I close pidgin via the keyboard shortcut (Ctrl-Q), I get a core file because of a double free, I could disable generating core files but I know that's more evil than good.