The problem is ultimately caused by gstreamer.

We use a separate process to create video thumbnails because gstreamer
instability. Each process is given an fd to the open video file, uses
gstreamer to extract a thumbnail, and then exists.

Every now and then, gstreamer hangs. To deal with that, we have a
10-second timer that fires if the process doesn't terminate. When the
timer fires, we send a SIGKILL.

The problem is that the process doesn't not terminate in response to
SIGKILL or, rather, waitpid() doesn't complete after sending the signal.

I used timestamps on the relevant calls. When the timer fires, we send
SIGKILL (via kill(2)) and then immediately call waitpid(). The kill()
call returns immediately, but waitpid() hangs for between 30 and 40
seconds. Then waitpid completes. In the mean time, the gstreamer process
is shown as a zombie in the proc table.

** Also affects: gstreamer (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: gstreamer (Ubuntu)
   Importance: Undecided => High

** Changed in: thumbnailer
   Importance: Medium => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1462219

Title:
  Race condition on exit

To manage notifications about this bug go to:
https://bugs.launchpad.net/thumbnailer/+bug/1462219/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to