tieto / sipe

A third-party Pidgin plugin for Microsoft Lync/OCS - clone of upstream http://repo.or.cz/w/siplcs.git
GNU General Public License v2.0
129 stars 24 forks source link

mutex race condition when exiting conference call #46

Closed gy-lehel closed 8 years ago

gy-lehel commented 8 years ago
ii  pidgin                                                1:3.0.0~collab-0.20620+20160415 amd64                           graphical multi-protocol instant messaging client for X
ii  pidgin-data                                           1:3.0.0~collab-0.20620+20160415 all                             multi-protocol instant messaging client - data files
ii  pidgin-dbg                                            1:3.0.0~collab-0.20620+20160415 amd64                           Debugging symbols for Pidgin
un  pidgin-facebookchat                                   <none>                          <none>                          (no description available)
ii  pidgin-gnome-keyring                                  2.0~trusty-1                    amd64                           integrates pidgin (and libpurple) with the system keyring
ii  pidgin-otr                                            4.0.0-2                         amd64                           Off-the-Record Messaging plugin for Pidgin
rc  pidgin-ppa                                            0.0.9                           all                             Pidgin PPA
ii  pidgin-sipe                                           1.20.1+collab-201604140748+3197 amd64                           Pidgin plugin for MS Office Communicator and MS Lync
ii  pidgin-sipe-dbg                                       1.20.1+collab-201604140748+3197 amd64                           Pidgin plugin for MS Office Communicator and MS Lync (debug symbols)
(gdb) where
#0  0x00007ff1b0c1561d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ff1b0c159a9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff1b0bd3680 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff1b0bd3f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff1b0bd430a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff1ace16e25 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007ff1b0f5b0e5 in pidgin_start (argc=1, argv=0x7ffcf576b168) at libpidgin.c:850
#7  0x00007ff1b05c9ec5 in __libc_start_main (main=0x5590e34f2960 <main>, argc=1, argv=0x7ffcf576b168, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcf576b158) at libc-start.c:287
#8  0x00005590e34f29de in _start ()
gy-lehel commented 8 years ago

After holding thread for 3 minutes with gdb, and de-attaching debugger, pidgin continued to function properly.

xhaakon commented 8 years ago

If you have a suspicion for a race condition, please always include full stack traces from all threads:

thread apply all bt full

I find unlikely this hang is caused by a race involving mutex in GTK+, mostly given to the fact your backtrace shows gmutexunlock(). A thread would hang waiting in g_mutex_lock() if this were a race. Most probably the thread was not stuck and it just so happened that it was executing g_mutex_unlock() when you stopped the application in the debugger.

This rather seems to me like a duplicate of #49 and the unresponsive Pidgin UI (which I presume is how the bug manifests itself though you didn't explicitly mention it in the ticket description) is probably caused by unhandled end-of-file on RDP input channel from Remmina, which is causing that the channel's read IO function is called from the main message loop over and over in quick succession, doing basically nothing.

Closing this issue; discussion may continue in #49.