[Pidgin] #15493: fetching URLs freezes pidgin

Pidgin trac at pidgin.im
Sat Apr 20 01:48:28 EDT 2013


#15493: fetching URLs freezes pidgin
----------------------------+---------------------------
 Reporter:  FernandoMiguel  |       Owner:  rekkanoryo
     Type:  defect          |      Status:  new
Milestone:                  |   Component:  unclassified
  Version:  2.10.7          |  Resolution:
 Keywords:                  |
----------------------------+---------------------------

Comment (by suokko):

 I patches my pidgin 2.10 with linked commit and so far no freezes
 hapening. My theory what happens in pidgin is follow:

 Some point before step 3. SIGCHLD from different child process is received
 and handled by pidgin registered signal handler that writes to the pipe to
 wakeup mainloop

 1. g_spawn starts the gsettings subprocess
 2. pidgin reads the stdoutput
 3. glib sets its own signal handler using sigaction
 4. glib calls waitpid to check that gsettings is still running
 5. glib event thread is scheduled to handle the signal generated glib
 event (not in pidgin main thread)
 6. the event handling code is executed that calls signal() to restore the
 pidgin SIGCHLD handler over glib handler
 7. SIGCHLD arrives when gsettings process exits but glib never sees that

 But I still don't understand why glib event thread would sometimes handle
 the SIGCHLD signal and manage to cause the race. But I could see that
 happening once when I did run pidgin in strace.

 But if my guess what kind of race condition this is the linked patch is
 easy fix for the random hang and this bug can be considered fixed for
 pidgin 3.0.

-- 
Ticket URL: <https://developer.pidgin.im/ticket/15493#comment:27>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list