touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #86174
[Bug 1466273] Re: gstreamer fails intermittently
In an attempt to diagnose this more, I ran the vs-thumb sub-processes
with strace and still managed to reproduce the problem.
Here is the code snippet that runs when we don't hear back from a sub-
process within ten seconds. (Please forgive the filthy code; this is the
result of endless hacking around trying to narrow down the problem.)
qDebug() << "timeout, state =" << process_.state();
if (process_.state() != QProcess::NotRunning)
{
qDebug() << "killing process" << process_.pid();
int rc = kill(process_.processId(), SIGKILL);
assert(rc == 0);
//process_.kill();
}
int status;
qDebug() << "calling waitpid for process" << process_.pid();
int rc = waitpid(process_.pid(), &status, 0);
qDebug() << "waitpid for process" << process_.pid() << "returned";
qDebug() << "waitpid() returned" << rc;
error_ = exe_path_.toStdString() + " (pid " + to_string(process_.pid()) + ") did not return after " +
to_string(timeout_ms_) + " milliseconds";
So, we call kill(), immediately followed by waitpid(). Here is the trace
I see when the problem happens:
thumbnailer-service: [02:28:39.385] timeout, state = 2
thumbnailer-service: [02:28:39.385] killing process 16965
thumbnailer-service: [02:28:39.386] calling waitpid for process 16965
Changing to state PAUSED
Changing to state PAUSED
thumbnailer-service: [02:29:09.395] waitpid for process 16965 returned
thumbnailer-service: [02:29:09.396] waitpid() returned 16965
(Ignore the two "Changing state" messages; these are from other vs-thumb
processes that are still running.)
Note the time stamps: we sent the kill at 28:39, but waitpid doesn't
return until 30 seconds later.
While things are hanging like this, the process sits as a zombie in the
process table.
I've attached the strace log. The last line shows that the process was
killed (also 30 seconds late), at the time waitpid() returned.
** Attachment added: "vs-thumb.strace.16965"
https://bugs.launchpad.net/ubuntu/+source/gstreamer1.0/+bug/1466273/+attachment/4420215/+files/vs-thumb.strace.16965
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gstreamer1.0 in Ubuntu.
https://bugs.launchpad.net/bugs/1466273
Title:
gstreamer fails intermittently
Status in Thumbnail generator for all kinds of files:
New
Status in gstreamer package in Ubuntu:
New
Status in gstreamer1.0 package in Ubuntu:
New
Bug description:
gstreamer occasionally fails to extract a thumbnail from a video file.
It's clearly a race condition because, almost all of the time, it
succeeds. To reproduce:
Check out the thumbnailer/devel branch at r217 and build it. Then:
cd build/src/vs-thumb
./vs-thumb fd://0 ./x.jpg <../../../tests/media/testvideo.ogg
Point a browser at the generated x.jpg file and check that the image
was extracted correctly.
Now run
while ./vs-thumb fd://0 ./x.jpg <../../../tests/media/testvideo.ogg ;
do :; done
Within maybe a hundred iterations or so, I get:
Error creating thumbnail: ThumbnailExtractor: change_state(): reading
async messages: GStreamer error: negotiation problem.
To manage notifications about this bug go to:
https://bugs.launchpad.net/thumbnailer/+bug/1466273/+subscriptions