majn / telegram-purple

Adds support for Telegram to Pidgin, Adium, Finch and other Libpurple based messengers.
GNU General Public License v2.0
735 stars 81 forks source link

Crash in pending_reads_add #580

Open bodqhrohro opened 2 years ago

bodqhrohro commented 2 years ago
(05:21:56) log: Failed to open log file "/home/bodqhrohro/.purple/logs/Ծ‸ Ծ垂死病中惊坐起,谈笑风生又一年。 春江水暖蛙先知,抬头念了两句诗。.log" for reading: Нет такого файла или каталога
(05:21:56) LaTeX: Writing Message: 烏克蘭局勢:公司老闆自願上戰場:「已準備好反擊」- BBC News 中文
https://www.youtube.com/watch?v=G74gjq8Ns2M
(05:21:56) log: Could not create log file /home/bodqhrohro/.purple/logs/telegram/%2b380·········/%d4%be%e2%80%b8%20%d4%be%e5%9e%82%e6%ad%bb%e7%97%85%e4%b8%ad%e6%83%8a%e5%9d%90%e8%b5%b7%ef%bc%8c%e8%b0%88%e7%ac%91%e9%a3%8e%e7%94%9f%e5%8f%88%e4%b8%80%e5%b9%b4%e3%80%82%20%e6%98%a5%e6%b1%9f%e6%b0%b4%e6%9a%96%e8%9b%99%e5%85%88%e7%9f%a5%ef%bc%8c%e6%8a%ac%e5%a4%b4%e5%bf%b5%e4%ba%86%e4%b8%a4%e5%8f%a5%e8%af%97%e3%80%82/2022-01-27.052120+0200EET.html
(05:21:56) LaTeX: Writing Message: Не удалось выполнить ведение журнала этой беседы.
(05:21:56) g_log: purple_connection_get_state: assertion 'gc != NULL' failed
(05:21:56) g_log: purple_connection_get_state: assertion 'gc != NULL' failed
(05:21:56) g_log: pidgin_conv_write_conv: assertion 'gc != NULL || !(flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV))' failed
@--Type <RET> for more, q to quit, c to continue without paging--dns[3193153]: nobody needs me... =(
dns[3193166]: nobody needs me... =(
Quit
@(gdb) cont
Continuing.
Pidgin 2.14.8 были с ошибками сегментации и попытались просмотреть файл ядра.
Это глюк в программе и вы тут не виноваты.

Если вы можете повторить возникновение ошибки, пожалуйста уведомите
разработчиков, создав отчёт об ошибке на:
https://pidgin.im/development/простая карточка/

Пожалуйста, будьте готовы описать как всё произошло в тот момент
и представить вывод командной строки файла ядра.  Если вы не знаете
как его вывести, пожалуйста, прочитайте инструкцию на
https://pidgin.im/development/wiki/GetABacktrace

Thread 1 "pidgin" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49  ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
@(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007ffff6d0d536 in __GI_abort () at abort.c:79
#2  0x00005555555e84cc in sighandler (sig=<optimized out>) at ././pidgin/gtkmain.c:183
#3  0x00007ffff6ec3200 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007fffdb3a081b in pending_reads_add (TLS=TLS@entry=0x555558d99400, M=M@entry=0x55555904d6a0) at tgp-structs.c:58
#5  0x00007fffdb3a4913 in tgp_msg_process_in_ready (TLS=0x555558d99400) at tgp-msg.c:912
#6  0x00007fffdb3d3b91 in tglu_work_update (DS_U=0x55555923c740, check_only=0, TLS=0x555558d99400) at updates.c:521
#7  tglu_work_update (TLS=0x555558d99400, check_only=0, DS_U=0x55555923c740) at updates.c:136
#8  0x00007fffdb3d49bc in tglu_work_updates (DS_U=0x5555592fd7f0, check_only=0, TLS=0x555558d99400) at updates.c:597
#9  tglu_work_updates (TLS=0x555558d99400, check_only=0, DS_U=0x5555592fd7f0) at updates.c:576
#10 0x00007fffdb3d5044 in tglu_work_any_updates_buf (TLS=TLS@entry=0x555558d99400) at updates.c:794
#11 0x00007fffdb3ac110 in rpc_execute_answer (TLS=TLS@entry=0x555558d99400, c=c@entry=0x555558e6cdc0, msg_id=msg_id@entry=7057719578224970753)
    at mtproto-client.c:955
#12 0x00007fffdb3ac8bc in work_packed (msg_id=7057719578224970753, c=0x555558e6cdc0, TLS=0x555558d99400) at mtproto-client.c:869
#13 rpc_execute_answer (TLS=TLS@entry=0x555558d99400, c=c@entry=0x555558e6cdc0, msg_id=7057719578224970753) at mtproto-client.c:958
#14 0x00007fffdb3ad8f0 in process_rpc_message (enc=0x7fffdc4adcc0 <Response.43>, len=<optimized out>, c=0x555558e6cdc0, TLS=0x555558d99400)
    at mtproto-client.c:1135
#15 rpc_execute (TLS=0x555558d99400, c=0x555558e6cdc0, op=<optimized out>, len=<optimized out>) at mtproto-client.c:1189
#16 0x00007fffdb39aae9 in try_rpc_read (c=0x555558e6cdc0) at tgp-net.c:431
@--Type <RET> for more, q to quit, c to continue without paging--
#17 try_read (c=<optimized out>) at tgp-net.c:476
#18 conn_try_read (arg=0x555558e6cdc0, source=<optimized out>, cond=cond@entry=PURPLE_INPUT_READ) at tgp-net.c:227
#19 0x00005555555cdfb2 in pidgin_io_invoke (source=<optimized out>, condition=<optimized out>, data=0x5555589cafa0) at ././pidgin/gtkeventloop.c:73
#20 0x00007ffff72f5be4 in g_main_dispatch (context=0x5555556c8780) at ../../../glib/gmain.c:3381
#21 g_main_context_dispatch (context=0x5555556c8780) at ../../../glib/gmain.c:4099
#22 0x00007ffff72f5f88 in g_main_context_iterate (context=0x5555556c8780, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4175
#23 0x00007ffff72f6273 in g_main_loop_run (loop=0x555557a05d10) at ../../../glib/gmain.c:4373
#24 0x00007ffff79d8b2a in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x0000555555591d70 in main (argc=<optimized out>, argv=<optimized out>) at ././pidgin/gtkmain.c:947
bodqhrohro commented 2 years ago

What's even more interesting is that this gook has renamed themself to "Delta" a long time ago, but telegram-purple still tries to save the log with the old name.

bodqhrohro commented 2 years ago

Got again, this time with a channel that did not change its name ever.

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
0x00007fffdb3a081b in pending_reads_add (TLS=TLS@entry=0x5555581f2af0, M=M@entry=0x5555590b2020) at tgp-structs.c:58
58  tgp-structs.c: Нет такого файла или каталога.
@(gdb) bt
#0  0x00007fffdb3a081b in pending_reads_add (TLS=TLS@entry=0x5555581f2af0, M=M@entry=0x5555590b2020) at tgp-structs.c:58
#1  0x00007fffdb3a4913 in tgp_msg_process_in_ready (TLS=0x5555581f2af0) at tgp-msg.c:912
#2  0x00007fffdb3b666c in download_on_error
    (TLS=0x5555581f2af0, q=0x555559369eb0, error_code=<optimized out>, error_len=<optimized out>, error=<optimized out>) at queries.c:3287
#3  0x00007fffdb3c186e in tglq_query_error (TLS=0x5555581f2af0, id=<optimized out>) at queries.c:415
#4  0x00007fffdb3ac8f3 in work_rpc_result (c=0x555557219480, msg_id=<optimized out>, TLS=0x5555581f2af0) at mtproto-client.c:846
#5  0x00007fffdb3ad8f0 in process_rpc_message (enc=0x7fffdc4adcc0 <Response.43>, len=<optimized out>, c=0x555557219480, TLS=0x5555581f2af0)
    at mtproto-client.c:1135
#6  rpc_execute (TLS=0x5555581f2af0, c=0x555557219480, op=<optimized out>, len=<optimized out>) at mtproto-client.c:1189
#7  0x00007fffdb39aae9 in try_rpc_read (c=0x555557219480) at tgp-net.c:431
#8  try_read (c=<optimized out>) at tgp-net.c:476
#9  conn_try_read (arg=0x555557219480, source=<optimized out>, cond=cond@entry=PURPLE_INPUT_READ) at tgp-net.c:227
#10 0x00005555555cdfb2 in pidgin_io_invoke (source=<optimized out>, condition=<optimized out>, data=0x5555583568d0) at ././pidgin/gtkeventloop.c:73
#11 0x00007ffff72f5be4 in g_main_dispatch (context=0x5555556c8780) at ../../../glib/gmain.c:3381
#12 g_main_context_dispatch (context=0x5555556c8780) at ../../../glib/gmain.c:4099
#13 0x00007ffff72f5f88 in g_main_context_iterate (context=0x5555556c8780, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4175
#14 0x00007ffff72f6273 in g_main_loop_run (loop=0x555557a76220) at ../../../glib/gmain.c:4373
#15 0x00007ffff79d8b2a in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
@--Type <RET> for more, q to quit, c to continue without paging--
#16 0x0000555555591d70 in main (argc=<optimized out>, argv=<optimized out>) at ././pidgin/gtkmain.c:947
bodqhrohro commented 2 years ago
(13:28:38) prpl-telegram: tgp_chat_add_all_users()
(13:28:38) g_log: file tgp-chat.c: line 167 (tgp_chat_add_all_users): should not be reached
(13:28:38) GLib: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(13:28:38) g_log: (tgp-blist.c:44):tgp_blist_lookup_purple_name: runtime check failed: (name)
(13:28:38) g_log: serv_got_chat_in: assertion 'who != NULL' failed
(13:28:38) GLib: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
@--Type <RET> for more, q to quit, c to continue without paging--dns[933896]: nobody needs me... =(
dns[933895]: nobody needs me... =(
dns[933897]: nobody needs me... =(
dns[933894]: nobody needs me... =(
bt

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
g_queue_peek_head (queue=0x206e6170733c203e) at ../../../glib/gqueue.c:885
885 ../../../glib/gqueue.c: Нет такого файла или каталога.
@(gdb) bt
#0  g_queue_peek_head (queue=0x206e6170733c203e) at ../../../glib/gqueue.c:885
#1  0x00007fffdb3a4809 in tgp_msg_process_in_ready (TLS=0x55555804e350) at tgp-msg.c:905
#2  0x00007fffdb3a0e3b in tgp_channel_load_finish (TLS=0x55555804e350, D=0x555555ea29e0, success=1) at tgp-chat.c:519
#3  0x00007fffdb3bdbb2 in channels_get_members_on_answer (TLS=0x55555804e350, q=0x5555583ddfc0, D=0x555557fb36a0) at queries.c:2898
#4  0x00007fffdb3b587e in tglq_query_result (TLS=TLS@entry=0x55555804e350, id=<optimized out>) at queries.c:479
#5  0x00007fffdb3ac5bc in work_rpc_result (c=0x5555568805a0, msg_id=<optimized out>, TLS=0x55555804e350) at mtproto-client.c:848
#6  0x00007fffdb3ac705 in work_container (msg_id=<optimized out>, c=0x5555568805a0, TLS=0x55555804e350) at mtproto-client.c:800
#7  rpc_execute_answer (TLS=TLS@entry=0x55555804e350, c=c@entry=0x5555568805a0, msg_id=<optimized out>) at mtproto-client.c:943
#8  0x00007fffdb3ad8f0 in process_rpc_message (enc=0x7fffdc4adcc0 <Response.43>, len=<optimized out>, c=0x5555568805a0, TLS=0x55555804e350)
    at mtproto-client.c:1135
#9  rpc_execute (TLS=0x55555804e350, c=0x5555568805a0, op=<optimized out>, len=<optimized out>) at mtproto-client.c:1189
#10 0x00007fffdb39aae9 in try_rpc_read (c=0x5555568805a0) at tgp-net.c:431
#11 try_read (c=<optimized out>) at tgp-net.c:476
#12 conn_try_read (arg=0x5555568805a0, source=<optimized out>, cond=cond@entry=PURPLE_INPUT_READ) at tgp-net.c:227
#13 0x00005555555cdfb2 in pidgin_io_invoke (source=<optimized out>, condition=<optimized out>, data=0x55555624bfb0) at ././pidgin/gtkeventloop.c:73
#14 0x00007ffff72f5be4 in g_main_dispatch (context=0x5555556c8b10) at ../../../glib/gmain.c:3381
#15 g_main_context_dispatch (context=0x5555556c8b10) at ../../../glib/gmain.c:4099
#16 0x00007ffff72f5f88 in g_main_context_iterate (context=0x5555556c8b10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4175
@--Type <RET> for more, q to quit, c to continue without paging--
#17 0x00007ffff72f6273 in g_main_loop_run (loop=0x5555574edde0) at ../../../glib/gmain.c:4373
#18 0x00007ffff79d8b2a in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x0000555555591d70 in main (argc=<optimized out>, argv=<optimized out>) at ././pidgin/gtkmain.c:947
bodqhrohro commented 2 years ago

Finally sacrificed some resources for the greedy Valgrind, and got this familiar crash quickly: pidgin-vg.txt.gz

(14:38:33) log: Failed to open log file "/home/bodqhrohro/.purple/logs/Delta.log" for reading: Нет такого файла или каталога
(14:38:34) LaTeX: Writing Message: Кто такой Jincheng Zhang? Вор треков на ютубе
https://www.youtube.com/watch?v=G3_Z2QLSr8Q
Pidgin 2.14.8 были с ошибками сегментации и попытались просмотреть файл ядра.

@EionRobb, could you take a look please? Seems like the libnotify+ plugin is involved, not sure if this is related to the crash though.

bodqhrohro commented 2 years ago

Hehe, looks like some corruption issue was fixed there in 7987f8427b722a2edce75678254ad27ae56297d7987f8427b722a2edce75678254ad27ae56297d, but I didn't mind and used an outdated build from a 2016 year revision xD That's why make install is evil, folks!

Would upgrade this and other plugins that were possibly installed from sources, and report if some of the corruption issues still persist. It seems like the notification object may still exist and be used when the strings making it are already freed, which doesn't seem to be fixed yet.

bodqhrohro commented 2 years ago
==2044192== 1 errors in context 1 of 11:
==2044192== Invalid read of size 8
==2044192==    at 0x11C0681B: pending_reads_add (tgp-structs.c:58)
==2044192==    by 0x11C0A912: tgp_msg_process_in_ready (tgp-msg.c:912)
==2044192==    by 0x11C24FE3: get_difference_on_answer (queries.c:3878)
==2044192==    by 0x11C1B87D: tglq_query_result (queries.c:479)
==2044192==    by 0x11C138EF: process_rpc_message (mtproto-client.c:1135)
==2044192==    by 0x11C138EF: rpc_execute (mtproto-client.c:1189)
==2044192==    by 0x11C00AE8: try_rpc_read (tgp-net.c:431)
==2044192==    by 0x11C00AE8: try_read (tgp-net.c:476)
==2044192==    by 0x11C00AE8: conn_try_read (tgp-net.c:227)
==2044192==    by 0x181FB1: pidgin_io_invoke (in /usr/bin/pidgin)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0xBA3D654: conversation_created_cb (plugin.c:91)
==2044192==  Address 0x38 is not stack'd, malloc'd or (recently) free'd
==2044192== 
==2044192== 
==2044192== 1 errors in context 2 of 11:
==2044192== Invalid read of size 8
==2044192==    at 0x11C05B00: tls_get_data (tgp-2prpl.c:40)
==2044192==    by 0x11C06817: pending_reads_add (tgp-structs.c:58)
==2044192==    by 0x11C0A912: tgp_msg_process_in_ready (tgp-msg.c:912)
==2044192==    by 0x11C24FE3: get_difference_on_answer (queries.c:3878)
==2044192==    by 0x11C1B87D: tglq_query_result (queries.c:479)
==2044192==    by 0x11C138EF: process_rpc_message (mtproto-client.c:1135)
==2044192==    by 0x11C138EF: rpc_execute (mtproto-client.c:1189)
==2044192==    by 0x11C00AE8: try_rpc_read (tgp-net.c:431)
==2044192==    by 0x11C00AE8: try_read (tgp-net.c:476)
==2044192==    by 0x11C00AE8: conn_try_read (tgp-net.c:227)
==2044192==    by 0x181FB1: pidgin_io_invoke (in /usr/bin/pidgin)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==  Address 0x91eddf0 is 16 bytes after a block of size 128 free'd
==2044192==    at 0x483F9AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x4BB2150: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x53FB9B5: object_set_property (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FDD0B: g_object_setv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FE9DA: g_object_set_property (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x4D5B847: gtk_tree_view_column_cell_set_cell_data (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x4D46CBA: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x4D48334: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x4C4B1AA: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x53F66DE: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x5408523: signal_emit_unlocked_R (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x540EABA: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==  Block was alloc'd at
==2044192==    at 0x483E6AF: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x4840DE7: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x5495EB7: g_realloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54B2B93: g_string_sized_new (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x51D8136: ??? (in /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.4800.10)
==2044192==    by 0x51DB1BF: pango_parse_markup (in /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.4800.10)
==2044192==    by 0x4BB213D: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x53FB9B5: object_set_property (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FDD0B: g_object_setv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FE9DA: g_object_set_property (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x4D5B847: gtk_tree_view_column_cell_set_cell_data (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0x4D46AAE: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192== 
==2044192== 
==2044192== 1 errors in context 3 of 11:
==2044192== Invalid read of size 16
==2044192==    at 0x11C06803: pending_reads_add (tgp-structs.c:56)
==2044192==    by 0x11C0A912: tgp_msg_process_in_ready (tgp-msg.c:912)
==2044192==    by 0x11C24FE3: get_difference_on_answer (queries.c:3878)
==2044192==    by 0x11C1B87D: tglq_query_result (queries.c:479)
==2044192==    by 0x11C138EF: process_rpc_message (mtproto-client.c:1135)
==2044192==    by 0x11C138EF: rpc_execute (mtproto-client.c:1189)
==2044192==    by 0x11C00AE8: try_rpc_read (tgp-net.c:431)
==2044192==    by 0x11C00AE8: try_read (tgp-net.c:476)
==2044192==    by 0x11C00AE8: conn_try_read (tgp-net.c:227)
==2044192==    by 0x181FB1: pidgin_io_invoke (in /usr/bin/pidgin)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0xBA3D654: conversation_created_cb (plugin.c:91)
==2044192==  Address 0xaba5af8 is 8 bytes before a block of size 96 alloc'd
==2044192==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x5495E18: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54AE110: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54AE779: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x5415A81: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FBCBC: g_object_new_internal (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FD657: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FDB88: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x5189DFF: gdk_pixbuf_new_from_data (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x518738D: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x519B28F: ??? (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x518C843: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192== 
==2044192== 
==2044192== 1 errors in context 4 of 11:
==2044192== Invalid read of size 4
==2044192==    at 0x11C067FA: pending_reads_add (tgp-structs.c:53)
==2044192==    by 0x11C0A912: tgp_msg_process_in_ready (tgp-msg.c:912)
==2044192==    by 0x11C24FE3: get_difference_on_answer (queries.c:3878)
==2044192==    by 0x11C1B87D: tglq_query_result (queries.c:479)
==2044192==    by 0x11C138EF: process_rpc_message (mtproto-client.c:1135)
==2044192==    by 0x11C138EF: rpc_execute (mtproto-client.c:1189)
==2044192==    by 0x11C00AE8: try_rpc_read (tgp-net.c:431)
==2044192==    by 0x11C00AE8: try_read (tgp-net.c:476)
==2044192==    by 0x11C00AE8: conn_try_read (tgp-net.c:227)
==2044192==    by 0x181FB1: pidgin_io_invoke (in /usr/bin/pidgin)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0xBA3D654: conversation_created_cb (plugin.c:91)
==2044192==  Address 0xaba5af8 is 8 bytes before a block of size 96 alloc'd
==2044192==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x5495E18: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54AE110: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54AE779: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x5415A81: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FBCBC: g_object_new_internal (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FD657: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x53FDB88: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2044192==    by 0x5189DFF: gdk_pixbuf_new_from_data (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x518738D: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x519B28F: ??? (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192==    by 0x518C843: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4200.6)
==2044192== 
==2044192== 
==2044192== 1 errors in context 5 of 11:
==2044192== Invalid read of size 1
==2044192==    at 0x574C1CE: serv_got_im (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x11C0A8F8: tgp_msg_display (tgp-msg.c:887)
==2044192==    by 0x11C0A8F8: tgp_msg_process_in_ready (tgp-msg.c:911)
==2044192==    by 0x11C24FE3: get_difference_on_answer (queries.c:3878)
==2044192==    by 0x11C1B87D: tglq_query_result (queries.c:479)
==2044192==    by 0x11C138EF: process_rpc_message (mtproto-client.c:1135)
==2044192==    by 0x11C138EF: rpc_execute (mtproto-client.c:1189)
==2044192==    by 0x11C00AE8: try_rpc_read (tgp-net.c:431)
==2044192==    by 0x11C00AE8: try_read (tgp-net.c:476)
==2044192==    by 0x11C00AE8: conn_try_read (tgp-net.c:227)
==2044192==    by 0x181FB1: pidgin_io_invoke (in /usr/bin/pidgin)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==    by 0xBA3D654: conversation_created_cb (plugin.c:91)
==2044192==  Address 0x1ff88a68 is 8 bytes inside a block of size 26 free'd
==2044192==    at 0x483F9AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x576A77B: xmlnode_free (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x576A764: xmlnode_free (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x576A764: xmlnode_free (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x576A764: xmlnode_free (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x576A764: xmlnode_free (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x56FF268: save_cb (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x5490743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x4C48D90: gtk_main_iteration (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2044192==  Block was alloc'd at
==2044192==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2044192==    by 0x5495E18: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x54AFE0F: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x576AA66: xmlnode_set_attrib_full (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x56FB611: setting_to_xmlnode (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x547DBAF: g_hash_table_foreach (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x56FF143: sync_accounts (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x56FF268: save_cb (in /usr/lib/libpurple.so.0.14.8)
==2044192==    by 0x5490743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FBE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x548FF87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2044192==    by 0x549003E: g_main_context_iteration (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
bodqhrohro commented 2 years ago
==2233364== 1 errors in context 1 of 9:
==2233364== Invalid read of size 8
==2233364==    at 0x11C2EB75: download_retry_alarm (queries.c:3257)
==2233364==    by 0x11C14D77: timer_alarm (tgp-timers.c:35)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
==2233364== 
==2233364== 
==2233364== 1 errors in context 2 of 9:
==2233364== Invalid read of size 8
==2233364==    at 0x11C2EB69: download_retry_alarm (queries.c:3257)
==2233364==    by 0x11C14D77: timer_alarm (tgp-timers.c:35)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364==  Address 0x19b935f8 is 1,768 bytes inside a block of size 1,884 free'd
==2233364==    at 0x483F9AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x11C1AAAF: connection_data_free (tgp-structs.c:135)
==2233364==    by 0x5725D69: _purple_connection_destroy (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x5711E6D: purple_account_disconnect (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x5724F15: purple_connection_disconnect_cb (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364==  Block was alloc'd at
==2233364==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x11C5065F: tgl_alloc_release (tools.c:204)
==2233364==    by 0x11C50E98: tgl_alloc0 (tools.c:210)
==2233364==    by 0x11C187C3: tgprpl_login (telegram-purple.c:533)
==2233364==    by 0x165968: do_signon (in /usr/bin/pidgin)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364== 
==2233364== 
==2233364== 1 errors in context 3 of 9:
==2233364== Invalid read of size 4
==2233364==    at 0x11C2EB31: download_retry_alarm (queries.c:3253)
==2233364==    by 0x11C14D77: timer_alarm (tgp-timers.c:35)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364==  Address 0x19b92f50 is 64 bytes inside a block of size 1,884 free'd
==2233364==    at 0x483F9AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x11C1AAAF: connection_data_free (tgp-structs.c:135)
==2233364==    by 0x5725D69: _purple_connection_destroy (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x5711E6D: purple_account_disconnect (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x5724F15: purple_connection_disconnect_cb (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364==  Block was alloc'd at
==2233364==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x11C5065F: tgl_alloc_release (tools.c:204)
==2233364==    by 0x11C50E98: tgl_alloc0 (tools.c:210)
==2233364==    by 0x11C187C3: tgprpl_login (telegram-purple.c:533)
==2233364==    by 0x165968: do_signon (in /usr/bin/pidgin)
==2233364==    by 0x54A4743: g_timeout_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3BE3: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A3F87: g_main_context_iterate.constprop.0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x54A4272: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7000.2)
==2233364==    by 0x4C48B29: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x145D6F: main (in /usr/bin/pidgin)
==2233364== 
==2233364== 
==2233364== 5 errors in context 4 of 9:
==2233364== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==2233364==    at 0x5967554: __libc_send (send.c:28)
==2233364==    by 0x5967554: send (send.c:23)
==2233364==    by 0xC5472B7: ??? (in /usr/lib/x86_64-linux-gnu/libnspr4.so)
==2233364==    by 0x100EE9B7: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100F3320: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D7529: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D791C: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E01E4: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E0779: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E267A: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E5664: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E5EF8: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100EBF78: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==  Address 0xe3d6e16 is 86 bytes inside a block of size 1,105 alloc'd
==2233364==    at 0x4840D7B: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0xC505481: PORT_Realloc_Util (in /usr/lib/x86_64-linux-gnu/libnssutil3.so)
==2233364==    by 0x100EEBA4: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100EED8B: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D7507: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D791C: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E01E4: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E0779: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E267A: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E5664: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100E5EF8: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100EBF78: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364== 
==2233364== 
==2233364== 116 errors in context 5 of 9:
==2233364== Conditional jump or move depends on uninitialised value(s)
==2233364==    at 0xA91F3B9: murrine_draw_expander (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so)
==2233364==    by 0xA919674: ??? (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so)
==2233364==    by 0x1643A1: pidgin_cell_renderer_expander_render (in /usr/bin/pidgin)
==2233364==    by 0x4D5C605: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x4D5CEF4: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x4D4737C: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x4D48334: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x4C4B1AA: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.33)
==2233364==    by 0x540A6DE: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2233364==    by 0x541C523: signal_emit_unlocked_R (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2233364==    by 0x5422ABA: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2233364==    by 0x54234FE: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7000.2)
==2233364== 
==2233364== 
==2233364== 268 errors in context 6 of 9:
==2233364== Conditional jump or move depends on uninitialised value(s)
==2233364==    at 0x4844E5E: __memcmp_sse4_1 (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x1A419B11: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41D1B6: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41F45A: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A3DC791: ??? (in /usr/lib/x86_64-linux-gnu/libsoftokn3.so)
==2233364==    by 0xC3D15F1: PK11_AEADRawOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0xC3D1BBF: PK11_AEADOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0x10105BFA: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D6CD0: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D711F: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D72C3: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D7447: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364== 
==2233364== 
==2233364== 297 errors in context 7 of 9:
==2233364== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==2233364==    at 0x5967554: __libc_send (send.c:28)
==2233364==    by 0x5967554: send (send.c:23)
==2233364==    by 0xC5472B7: ??? (in /usr/lib/x86_64-linux-gnu/libnspr4.so)
==2233364==    by 0x100EE9B7: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D756E: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D773C: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100F40DA: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100F8765: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x10092752: ssl_nss_write (in /usr/lib/purple-2/ssl-nss.so)
==2233364==    by 0x168AC5BA: do_jabber_send_raw (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==    by 0x168ACAEA: jabber_send_raw (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==    by 0x168ACB72: jabber_stream_init (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==    by 0x168ADD77: jabber_login_callback_ssl (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==  Address 0x19b8f1c5 is 5 bytes inside a block of size 4,096 alloc'd
==2233364==    at 0x483E77F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0xC5053FD: PORT_Alloc_Util (in /usr/lib/x86_64-linux-gnu/libnssutil3.so)
==2233364==    by 0x100EEBC7: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100F3540: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100FDAB3: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100FE450: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x10092F84: ssl_nss_connect (in /usr/lib/purple-2/ssl-nss.so)
==2233364==    by 0x576B82D: purple_ssl_connect_with_host_fd (in /usr/lib/libpurple.so.0.14.8)
==2233364==    by 0x168B0CA9: jabber_process_packet (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==    by 0x168BD8D3: jabber_parser_element_end_libxml (in /usr/lib/purple-2/libjabber.so.0.0.0)
==2233364==    by 0x6647DF5: ??? (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.12)
==2233364==    by 0x664882A: xmlParseChunk (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.12)
==2233364== 
==2233364== 
==2233364== 302 errors in context 8 of 9:
==2233364== Conditional jump or move depends on uninitialised value(s)
==2233364==    at 0x4844E5E: __memcmp_sse4_1 (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x1A4199C5: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41C914: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41D17C: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41F45A: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A3DC791: ??? (in /usr/lib/x86_64-linux-gnu/libsoftokn3.so)
==2233364==    by 0xC3D15F1: PK11_AEADRawOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0xC3D1BBF: PK11_AEADOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0x10105BFA: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D6CD0: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D711F: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D72C3: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364== 
==2233364== 
==2233364== 1093 errors in context 9 of 9:
==2233364== Conditional jump or move depends on uninitialised value(s)
==2233364==    at 0x4844E5E: __memcmp_sse4_1 (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2233364==    by 0x1A4199C5: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41D1B6: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A41F45A: ??? (in /usr/lib/x86_64-linux-gnu/libfreeblpriv3.so)
==2233364==    by 0x1A3DC791: ??? (in /usr/lib/x86_64-linux-gnu/libsoftokn3.so)
==2233364==    by 0xC3D15F1: PK11_AEADRawOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0xC3D1BBF: PK11_AEADOp (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==2233364==    by 0x10105BFA: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D6CD0: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D711F: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D72C3: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364==    by 0x100D7447: ??? (in /usr/lib/x86_64-linux-gnu/libssl3.so)
==2233364== 
==2233364== ERROR SUMMARY: 2084 errors from 9 contexts (suppressed: 0 from 0)

This confirms an old hypothesis that some prpl incorrectly frees its connection data.

But how? @EionRobb, if the same memory area was freed before, Valgrind had to catch it too, right?

I see that tgl uses its own allocator, can it be that it conflicts with malloc?

И да, @vysheng, что в коде делает 0xbedabeda? «Как вы яхту назовёте — так она и поплывёт» ничему не учит? xDDDDDDD

Oh, and despite it happened just when I was starting Pidgin, it managed to disconnect and start reconnecting already. (Did I tell already that my machine barely carries Valgrind out and it runs extremely slow, right? :P)

bodqhrohro commented 2 years ago

Oh, and right before the latest crash:

(13:57:39) nss: Handshake failed  (-5938)
(13:57:39) nss: Handshake failed  (-5938)
(13:57:39) connection: Connection error on 0x1952d190 (reason: 0 description: Не удалось подключиться к шлюзу)
(13:57:39) proxy: Connecting to 149.154.167.91:443.
(13:57:39) proxy: Connected to 149.154.167.91:443.
(13:57:39) GLib: Source ID 1277 was not found when attempting to remove it
(13:57:39) autorecon: do_signon called
(13:57:39) autorecon: calling purple_account_connect
(13:57:39) account: Connecting to account +380·········.
(13:57:39) autorecon: done calling purple_account_connect
(13:57:39) account: Disconnecting account +380········· (0x18d80570)
(13:57:39) connection: Disconnecting connection 0x17dced40
(13:57:39) prpl-telegram: tgprpl_close()
(13:57:45) gtkutils: gdk_pixbuf_new_from_file() returned nothing for file /usr/share/pixmaps/pidgin/protocols/16/tox.png: Failed to open file “/usr/share/pixmaps/pidgin/protocols/16/tox.png”: Нет такого файла или каталога
(13:57:45) jabber: jabber_actions: have pep: YES
(13:57:45) jabber: jabber_actions: have pep: YES
(13:57:46) gtkutils: gdk_pixbuf_new_from_file() returned nothing for file /usr/share/pixmaps/pidgin/protocols/16/icq.png: Failed to open file “/usr/share/pixmaps/pidgin/protocols/16/icq.png”: Нет такого файла или каталога
(13:57:46) jabber: jabber_actions: have pep: YES
(13:57:46) connection: Destroying connection 0x17dced40
(13:57:46) jabber: Recv (ssl)(332): <presence to='bodqhrohro@narayana.im' from='·····@···········/Conversations.KqBs'><c node='http://conversations.im' hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='KWQQsqlerqQGIyKLIQTBsn7Adho='/><x xmlns='vcard-temp:x:update'><photo>3c080ac625daf63a92e16da1d61be147cc9763d9</photo></x></presence><r xmlns='urn:xmpp:sm:3'/>
(13:57:46) gtk-tmatz-xmpp_muc_presence_plugin: handle_jabber_receiving_presence (null) ·····@···········/Conversations.KqBs
(13:57:46) gtk-tmatz-xmpp_muc_presence_plugin:   show (null)
(13:57:46) blist: Updating buddy status for ·····@··········· (XMPP)
(13:57:46) jabber: Sending (ssl) (bodqhrohro@narayana.im/NmLTe9Xl): <a xmlns='urn:xmpp:sm:3' h='57'/>
(13:57:46) jabber: Recv (ssl)(370): <presence to='bodqhrohro@narayana.im' from='·····@···········/Conversations.KqBs'><c node='http://conversations.im' hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='KWQQsqlerqQGIyKLIQTBsn7Adho='/><idle xmlns='urn:xmpp:idle:1' since='2022-04-15T10:53:41.443Z'/><x xmlns='vcard-temp:x:update'><photo>3c080ac625daf63a92e16da1d61be147cc9763d9</photo></x></presence>
(13:57:46) gtk-tmatz-xmpp_muc_presence_plugin: handle_jabber_receiving_presence (null) ·····@···········/Conversations.KqBs
(13:57:46) gtk-tmatz-xmpp_muc_presence_plugin:   show (null)
(13:57:46) blist: Updating buddy status for ·····@··········· (XMPP)
(13:57:47) jabber: Recv (ssl)(26): <r xmlns='urn:xmpp:sm:3'/>
(13:57:47) jabber: Sending (ssl) (bodqhrohro@narayana.im/NmLTe9Xl): <a xmlns='urn:xmpp:sm:3' h='58'/>
(13:57:47) jabber: Sending (ssl) (bodqhrohro@jabber.ru/14115402250268869963): <iq type='get' id='purple865f2f0f'><ping xmlns='urn:xmpp:ping'/></iq>
(13:57:47) jabber: Sending (ssl) (bodqhrohro@jabber.ru/14115402250268869963): <r xmlns='urn:xmpp:sm:3'/>
(13:57:47) jabber: Sending (ssl) (pinkiepork@xmpp.ru/Pidgin): <iq type='get' id='purplef7ba4cc'><ping xmlns='urn:xmpp:ping'/></iq>
(13:57:47) jabber: Sending (ssl) (pinkiepork@xmpp.ru/Pidgin): <r xmlns='urn:xmpp:sm:3'/>
EionRobb commented 2 years ago

@bodqhrohro there's definitely something weird with your setup :)

Can you try disabling all your plugins and see if it's still a problem. Did you end up updating your cairo libs?

bodqhrohro commented 2 years ago

Can you try disabling all your plugins and see if it's still a problem

Pidgin is kind of useless without ALL of plugins, how do you imagine this? xD I have had annoying crashes even with the builtin IRC plugin, and had migrated to other client for IRC (and recently from IRC at all, when Freenode was destroyed by separatists).

I may resort to some kind of binary search, but this is going to take a lot of time, as neither of the crashes is reliably reproducible, and "not crashing" is a false negative.

Did you end up updating your cairo libs?

Yup, before the latest crash.

EionRobb commented 2 years ago

I mean, it seems like you get a crash every day or two. Could you cope without any plugins (other than protocol plugins) for that long just to help rule it out?

Unfortunately none of the backtraces and valgrind dumps that you've posted to any of the prpls have been very useful this far, however they are all seemingly very similar to each other which makes me think it's something not related to each of the prpls you're posting the issues for

bodqhrohro commented 2 years ago

So, okay, I went through a journey:

And you know what? No crash has happened in the process, except for https://github.com/dm0-/window_merge/issues/35

How is that supposed to work? I warned about false negatives :P

Possibly some messages need to arrive before the memory gets corrupted, it also would explain the flakiness. I've noticed it often happens right after some message with a link, possibly other markup counts as well.

bodqhrohro commented 2 years ago

@EionRobb I've run Valgrind with --read-var-info=yes, did it get any more informative? pidgin-vg12.txt.gz At least lots of copying of freed memory is revealed, not sure yet if that is dangerous though.

EionRobb commented 2 years ago

Yeah, looks pretty bad. You should probably disable your telegram-purple accounts. It looks like the accounts are disconnecting and free'ing memory, but the libtgl engine is still trying to use that free'd memory.

bodqhrohro commented 2 years ago

I rolled tgl back to bec2e6d537c272ed185e8c41ff81b4b8521a131d, and Pidgin survived two sleeps already with no crashes. So it's definitely a bug in @himselfv's patch.

bodqhrohro commented 2 years ago

This one is still relevant though:

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d5b0f8 in _int_malloc (av=av@entry=0x7ffff6e8fba0 <main_arena>, bytes=bytes@entry=3) at malloc.c:3896
3896    malloc.c: Нет такого файла или каталога.
@(gdb) bt
#0  0x00007ffff6d5b0f8 in _int_malloc (av=av@entry=0x7ffff6e8fba0 <main_arena>, bytes=bytes@entry=3) at malloc.c:3896
#1  0x00007ffff6d5c481 in __GI___libc_malloc (bytes=bytes@entry=3) at malloc.c:3237
#2  0x00007ffff72e6e19 in g_malloc (n_bytes=n_bytes@entry=3) at ../../../glib/gmem.c:106
#3  0x00007ffff7300e10 in g_strdup (str=0x55555abef790 "97") at ../../../glib/gstrfuncs.c:364
#4  0x00007ffff7673427 in gdk_pixbuf_set_option () at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#5  0x00007ffff7688e44 in  () at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#6  0x00007ffff7679e71 in  () at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#7  0x00007ffff767a9fe in gdk_pixbuf_loader_write () at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#8  0x000055555561ba58 in pidgin_pixbuf_from_data_helper
    (buf=buf@entry=0x555556d6fdd0 "\377\330\377", <incomplete sequence \340>, count=count@entry=123823, animated=animated@entry=0)
    at ././pidgin/gtkutils.c:3030
#9  0x000055555561fc80 in pidgin_pixbuf_from_data (buf=0x555556d6fdd0 "\377\330\377", <incomplete sequence \340>, count=123823)
    at ././pidgin/gtkutils.c:3071
#10 0x000055555559ae92 in pidgin_blist_get_buddy_icon (node=node@entry=0x55555636da10, scaled=scaled@entry=1, greyed=greyed@entry=1)
    at ././pidgin/gtkblist.c:2721
#11 0x00005555555a6272 in buddy_node (buddy=0x55555636da10, iter=0x7fffffffac70, node=0x55555636d8b0) at ././pidgin/gtkblist.c:6536
#12 0x00005555555a78e6 in pidgin_blist_update_contact (list=list@entry=0x555555f52860, node=node@entry=0x55555636da10) at ././pidgin/gtkblist.c:6712
#13 0x00005555555a6742 in pidgin_blist_update_buddy (status_change=<optimized out>, node=0x55555636da10, list=0x555555f52860)
    at ././pidgin/gtkblist.c:6734
@--Type <RET> for more, q to quit, c to continue without paging--
#14 pidgin_blist_update_buddy (list=0x555555f52860, node=0x55555636da10, status_change=<optimized out>) at ././pidgin/gtkblist.c:6721
#15 0x00007ffff7050992 in purple_blist_add_account (account=account@entry=0x555555c10e00) at ././libpurple/blist.c:2696
#16 0x00007ffff705d4a3 in purple_connection_set_state (state=<optimized out>, gc=0x55555a5ccb50) at ././libpurple/connection.c:372
#17 purple_connection_set_state (gc=0x55555a5ccb50, state=<optimized out>) at ././libpurple/connection.c:323
#18 0x00007fffdb39f286 in update_on_logged_in (TLS=0x55555bad1da0) at telegram-purple.c:491
#19 0x00007fffdb3c33f2 in tgl_export_all_auth (TLS=0x55555bad1da0) at queries.c:5185
#20 0x00007fffdb39f999 in tgprpl_login (acct=0x555555c10e00) at telegram-purple.c:605
#21 0x00005555555b1969 in do_signon (data=data@entry=0x555555c10e00) at ././pidgin/gtkconn.c:131
#22 0x00005555555b1b17 in pidgin_connection_network_connected () at ././pidgin/gtkconn.c:181
#23 0x00007ffff62c99da in  () at /usr/lib/x86_64-linux-gnu/libffi.so.8
#24 0x00007ffff62c8b21 in  () at /usr/lib/x86_64-linux-gnu/libffi.so.8
#25 0x00007ffff73d5eec in g_cclosure_marshal_generic
    (closure=0x555555bca220, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../gobject/gclosure.c:1534
#26 0x00007ffff6232209 in  () at /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
#30 0x00007ffff73ee4ff in <emit signal received:org-freedesktop-NetworkManager-StateChanged on instance 0x555555b82950 [DBusGProxy]>
    (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3553
    #27 0x00007ffff73d56df in g_closure_invoke
    (closure=0x555555bca220, return_value=return_value@entry=0x0, n_param_values=3, param_values=param_values@entry=0x7fffffffb280, invocation_hint=in@--Type <RET> for more, q to quit, c to continue without paging--
vocation_hint@entry=0x7fffffffb200) at ../../../gobject/gclosure.c:830
    #28 0x00007ffff73e7b36 in signal_emit_unlocked_R
    (node=node@entry=0x55555673fd00, detail=detail@entry=3614, instance=instance@entry=0x555555b82950, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffb280) at ../../../gobject/gsignal.c:3742
    #29 0x00007ffff73edf51 in g_signal_emit_valist
    (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffb430)
    at ../../../gobject/gsignal.c:3497
#31 0x00007ffff6232b12 in  () at /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
#32 0x00007ffff7f518c5 in dbus_connection_dispatch () at /lib/x86_64-linux-gnu/libdbus-1.so.3
#33 0x00007ffff623f095 in  () at /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
#34 0x00007ffff72e0cdb in g_main_dispatch (context=0x5555556c8b10) at ../../../glib/gmain.c:3381
#35 g_main_context_dispatch (context=0x5555556c8b10) at ../../../glib/gmain.c:4099
#36 0x00007ffff72e0f88 in g_main_context_iterate (context=0x5555556c8b10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4175
#37 0x00007ffff72e1273 in g_main_loop_run (loop=0x555556a7d1f0) at ../../../glib/gmain.c:4373
#38 0x00007ffff79d7b2a in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#39 0x0000555555591d70 in main (argc=<optimized out>, argv=<optimized out>) at ././pidgin/gtkmain.c:947

What's that? Just a memory exhaustion (unlikely)? Or a conflict between allocators?