EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
624 stars 88 forks source link

Random crashes with SIGPIPE #595

Closed ohhai closed 6 years ago

ohhai commented 6 years ago

Not sure it's related specifically to libskypeweb, but it would be better to put it here anyway.

Thread 1 "pidgin" received signal SIGPIPE, Broken pipe.
0x00007ffff21b1c7a in send () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00007ffff21b1c7a in send () at /lib64/libpthread.so.0
#1  0x00007fffdc634038 in pt_Send () at /lib64/libnspr4.so
#2  0x00007fffdd3f2b4a in ssl_DefSend () at /lib64/libssl3.so
#3  0x00007fffdd3e39ce in ssl3_SendRecord () at /lib64/libssl3.so
#4  0x00007fffdd3e3ec6 in SSL3_SendAlert () at /lib64/libssl3.so
#5  0x00007fffdd3f8301 in ssl_SecureClose () at /lib64/libssl3.so
#6  0x00007fffdd627340 in ssl_nss_close () at /usr/lib64/purple-2/ssl-nss.so
#7  0x00007ffff4df8e71 in purple_ssl_close () at /lib64/libpurple.so.0
#8  0x00007fffdafd9cc0 in purple_socket_cancel () at /usr/lib64/purple-2/libskypeweb.so
#9  0x00007fffdafda5f5 in purple_socket_destroy () at /usr/lib64/purple-2/libskypeweb.so
#10 0x00007fffdafd4ee5 in purple_http_socket_close_free.part () at /usr/lib64/purple-2/libskypeweb.so
#11 0x00007fffdafd5308 in _purple_http_disconnect () at /usr/lib64/purple-2/libskypeweb.so
#12 0x00007fffdafd8335 in purple_http_conn_retry.part () at /usr/lib64/purple-2/libskypeweb.so
#13 0x00007fffdafd957d in _purple_http_send () at /usr/lib64/purple-2/libskypeweb.so
#14 0x00005555555c5c3e in pidgin_io_invoke ()
#15 0x00007ffff3000b77 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#16 0x00007ffff3000f20 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#17 0x00007ffff3001232 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#18 0x00007ffff6b16827 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#19 0x000055555558c115 in main ()

Steps to reproduce: unknown (random) Reproducible: often

Fedora x64 pidgin-2.12.0-3.fc27.x86_64 libpurple-2.12.0-3.fc27.x86_64 purple-skypeweb-1.4-8.20180215git9db6c43.fc27.x86_64

dequis commented 6 years ago

SIGPIPE isn't a crash, it's just a signal gdb likes to catch. Do this in gdb to ignore them:

handle SIGPIPE nostop noprint pass
ohhai commented 6 years ago

As far as I see in "man 7 signal", default action for this signal is app terminate. Did your command in gdb, checking ...

dequis commented 6 years ago

The default is like that so that stdin/stdout pipelines (stuff like find | grep | sed) terminate the program when the pipe breaks. Most programs that are more complex than that (particularly, anything with sockets) ignore the signal.

You can also type c to continue in gdb.

ohhai commented 6 years ago

Have something different, I think:

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
0x00007fffdabae9b0 in purple_http_connection_set_add () from /usr/lib64/purple-2/libskypeweb.so
(gdb) bt
#0  0x00007fffdabae9b0 in purple_http_connection_set_add () at /usr/lib64/purple-2/libskypeweb.so
#1  0x00007fffdaba3421 in skypeweb_post_or_get () at /usr/lib64/purple-2/libskypeweb.so
#2  0x00007fffdaba9677 in skypeweb_poll () at /usr/lib64/purple-2/libskypeweb.so
#3  0x00007fffdaba9689 in skypeweb_timeout () at /usr/lib64/purple-2/libskypeweb.so
#4  0x00007ffff30045dd in g_timeout_dispatch () at /lib64/libglib-2.0.so.0
#5  0x00007ffff3003b77 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#6  0x00007ffff3003f20 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#7  0x00007ffff3004232 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#8  0x00007ffff6b19827 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#9  0x000055555558c115 in main ()
(gdb) x/10i $pc-10
   0x7fffdabae9a6 <purple_http_connection_set_new+38>:  mov    %ebx,%eax
   0x7fffdabae9a8 <purple_http_connection_set_new+40>:  pop    %rbx
   0x7fffdabae9a9 <purple_http_connection_set_new+41>:  retq   
   0x7fffdabae9aa:      nopw   0x0(%rax,%rax,1)
=> 0x7fffdabae9b0 <purple_http_connection_set_add>:     mov    (%rdi),%eax
   0x7fffdabae9b2 <purple_http_connection_set_add+2>:   test   %eax,%eax
   0x7fffdabae9b4 <purple_http_connection_set_add+4>:   jne    0x7fffdabaea00 <purple_http_connection_set_add+80>
   0x7fffdabae9b6 <purple_http_connection_set_add+6>:   push   %r12
   0x7fffdabae9b8 <purple_http_connection_set_add+8>:   push   %rbp
   0x7fffdabae9b9 <purple_http_connection_set_add+9>:   push   %rbx