Bug 7147 - (int-146026) After playing video and canceling a couple of applications crashes and N900 slows down
(int-146026)
: After playing video and canceling a couple of applications crashes and N900 s...
Status: RESOLVED FIXED
Product: Multimedia
gstreamer
: 5.0/(1.2009.42-11)
: N900 Maemo
: Medium normal with 10 votes (vote)
: 5.0/(10.2010.19-1)
Assigned To: unassigned
: gstreamer-bugs
:
: crash
:
:
  Show dependency tree
 
Reported: 2009-12-20 04:15 UTC by egoshin
Modified: 2010-03-23 15:37 UTC (History)
3 users (show)

See Also:


Attachments
syslog after N900 freezes for a minute or so (1.10 MB, text/plain)
2009-12-20 04:17 UTC, egoshin
Details
output of ps after N900 "unfreezes" (8.50 KB, text/plain)
2009-12-20 04:18 UTC, egoshin
Details
/proc/slabinfo after N900 "unfreezes" (5.32 KB, text/plain)
2009-12-20 04:19 UTC, egoshin
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description egoshin (reporter) 2009-12-20 04:15:07 UTC
SOFTWARE VERSION:
(Settings > General > About product)

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Play video (available on request - around 6-9MB file) around 3min
2. cancel Media player via stop and pressing "return arrow"
3. start some application (in my case - python editor)

EXPECTED OUTCOME:

Application starts, anything works

ACTUAL OUTCOME:

Application takes tenths seconds to start, anything like device "freezes".
After some delay application starts and it is possible to work with X-Term.
Syslog show crashes of gst-video-thumb, hildon-thumbnail due to lack of memory.

REPRODUCIBILITY:
(always, less than 1/10, 5/10, 9/10)

Less than 5/10 but each time after playng a video on media player or KMPlayer.
And there is an impression that it happens mostly with videos which was placed
into N900 a first time, I was not able to repeat it in replay. 

EXTRA SOFTWARE INSTALLED:

KMPlayer, Decoders Support

OTHER COMMENTS:

I feel there is an issue in kernel memory allocation during video processing. I
have some video which media player doesn't want to play but KMPlayer tries and
whole system crashes after couple of seconds.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.14)
Gecko/2009090216 Ubuntu/8.04 (hardy) Firefox/3.0.14
Comment 1 egoshin (reporter) 2009-12-20 04:17:29 UTC
Created an attachment (id=1805) [details]
syslog after N900 freezes for a minute or so

Look into "gst-video-thumb invoked oom-killer:" and after.
Comment 2 egoshin (reporter) 2009-12-20 04:18:53 UTC
Created an attachment (id=1806) [details]
output of ps after N900 "unfreezes"
Comment 3 egoshin (reporter) 2009-12-20 04:19:33 UTC
Created an attachment (id=1807) [details]
/proc/slabinfo after N900 "unfreezes"
Comment 4 Andre Klapper maemo.org 2009-12-21 19:33:34 UTC
Thanks for reporting this.

Does this only happen with this specific video you have mentioned, or also with
other videos?
Can you forward it to me by private email, if possible?

Also, what are your settings for:
  Settings > Display > Backlight time-out
  Settings > Display > Lock screen automatically
?
Comment 5 egoshin (reporter) 2009-12-21 22:15:51 UTC
(In reply to comment #4)
> Thanks for reporting this.
> 
> Does this only happen with this specific video you have mentioned, or also with
> other videos?

I have a system reboot with some another videos (always!) but I was not able to
catch anything in log. You probably still may find some useful info in
/dev/mtd2 - see 7017.

But with this specific video it was a first time then I see something in log
immediately after this specific video, and system doesn't crash and
"unfreezes".

> Can you forward it to me by private email, if possible?

Sure.

> 
> Also, what are your settings for:
>   Settings > Display > Backlight time-out

30 sec

>   Settings > Display > Lock screen automatically

"Yes" checkmark. I didn't see screen blackened but I don't remember - use I pen
to cancel "screensaver" or not.
Comment 6 egoshin (reporter) 2009-12-22 00:07:28 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Can you forward it to me by private email, if possible?
> 
> Sure.

Mail delivery failed due to big attachment size (9MB) in your mail provider.
I downloaded it to my home server and sent link to you via mail.
Comment 7 Andre Klapper maemo.org 2009-12-29 18:11:17 UTC
Running internal version 52-5 here the video does not play at all:

~/MyDocs $ gst-launch playbin2 uri=file:///home/user/MyDocs/mbug7147.wmv 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

****************LCML ERROR : DSP ************************
Error: Create the Node : Err Num = 8000803d
****************LCML ERROR : DSP ************************
ERROR: from element
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstOmxWmvDec:omxwmvdec0:
GStreamer encountered a general stream error.
Additional debug info:
gstomx_base_filter.c(744): pad_chain ():
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstOmxWmvDec:omxwmvdec0:
Error from OpenMAX component
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
~/MyDocs $
Comment 8 Andre Klapper maemo.org 2009-12-29 18:23:35 UTC
Heh, great, after rebooting it works of course.

Video in Media Player starts very quickly (after 2 seconds)

(In reply to comment #0)
> 1. Play video (available on request - around 6-9MB file) around 3min
> 2. cancel Media player via stop and pressing "return arrow"
I stopped at 2:27.
> 3. start some application (in my case - python editor)
Notes here, which starts quickly.

As said, could not reproduce this time...

I *think* that this has the same underlying weird reason as bug 7211.
Comment 9 egoshin (reporter) 2009-12-29 21:54:01 UTC
(In reply to comment #8)
> I *think* that this has the same underlying weird reason as bug 7211.
> 

Something wrong with tracker... I suspect so because there IS some timing
issues in both bugs and the problems in this bug is only with freshly retrieved
videos. 

However, it is possible an another reason - streamer decoder race condition
with available memory. I have an another video (see bug 7017), it has an
interesting things - if I play it with KMPlayer from internal 32GB flush it
crashes a system immedtiately w/out showing a single frame. But if I play it
from 8GB Kingston microSD class 4 it playes around 10-20secs before it crashes
a system. And it is pure dependent from timing - I can move a position slider
far to right fast and still see 10-20secs. (I write it here just to explain a
second possible reason)

Taking into account your experience with gstreamer failure that also can be
related with available memory + tracker logic.

(all of it is a very rough guess)
Comment 10 Andre Klapper maemo.org 2010-01-23 18:59:36 UTC
Is this still the same problem in version 2.2009.51-1?
Comment 11 egoshin (reporter) 2010-01-24 21:13:45 UTC
I was able to reproduce it partially. That means - I didn't see a crashes but I
was forced to kill gst-video-thumbnailerd each time before test start because
of bug 8165 which prevents me starting playing my video again. 

But I see uncontrollable growth in memory mafw-gst-renderer - sometime beyond
100MB. If I add 122MB memory of gst-video-thumbnailerd it is a clear sign of
trouble. And I see the consequences - after I exit system media player there is
a 10-20sec lag until any application can react on screen press beyond may be
press of left-top double squares.

BTW, even after I exit media player and kill gst-video-thumbnailerd the
application mafw-gst-renderer is still in memory and it has a big size -
80-100MB. mafw-gst-renderer usualy has around 40MB.

I think, the memory consumption of video applications is a problem and it has
sense to restrict both daemons in memory OR just restart it after media player
exit. If I kill it after exit media player anything immediately goes to normal.

NOTE: I still have some unplayable video files in mSD (full HD) and I had no
time to restrict tracker on processing it. It may be a source of bug 8165
problem with gst-video-thumbnailerd but it shouldn't be a cause of memory
growth of mafw-gst-renderer (it processes video only on media player demand,
right?) and I avoid playing this files in media player.
Comment 12 Gabriel 2010-02-13 05:03:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 13 Andre Klapper maemo.org 2010-02-15 12:42:17 UTC
Can you please install Crash Reporter from the SDK Tools repository in order to
send coredumps directly to Nokia? See
http://wiki.maemo.org/Extras-testing#Tools_for_testers for a how-to.

If you are offered to add a comment for sending the coredump file, please
mention this bug number (like "see bugs.maemo.org bug number xxxx").
Also, a filename will be displayed after uploading the coredump. Please add the
name of that file here in the bug report.
Comment 14 egoshin (reporter) 2010-02-15 20:56:25 UTC
It doesn't crash anymore (at least for me) but it slows down because
uncontrollable memory growth of mafw-gst-renderer and gst-video-thumbnailerd.
Comment 15 Eero Tamminen nokia 2010-03-23 15:37:13 UTC
(In reply to comment #0)
> Application takes tenths seconds to start, anything like device "freezes".
> After some delay application starts and it is possible to work with X-Term.
> Syslog show crashes of gst-video-thumb, hildon-thumbnail due to lack of
> memory.

(In reply to comment #14)
> It doesn't crash anymore (at least for me) but it slows down because
> uncontrollable memory growth of mafw-gst-renderer and gst-video-thumbnailerd.

Memory usage issues in Gstreamer should be fixed in PR1.2.