Bug 919

Summary: rygel doesn't restart, segfaults
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Darren Hart <dvhart>
Component: dlnaAssignee: Dongxiao Xu <dongxiao.xu>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: Medium CC: dexuan.cui, dongxiao.xu, jessica.zhang, josh, ke.yu, kevin.tian, lei.mei, meta.layer.watcher, meta.watcher, sgw, shane.wang
Version: unspecified   
Target Milestone: 1.1   
Hardware: Blacksand   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
gupnp-av-cp strace none

Description Darren Hart 2011-03-21 15:40:19 UTC
meta-demo: bbbba2bb74846db9b2505089522b60d97ea0ea70

OE Build Configuration:
BB_VERSION        = "1.11.0"
METADATA_BRANCH   = "bernard"
METADATA_REVISION = "82af8b9fb6d6d1439943fd15b8a75c0e663e4a45"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "n450"
DISTRO            = "poky"
DISTRO_VERSION    = "0.9+snapshot-20110321"
TARGET_FPU        = ""

image: poky-image-rygel-live

# /etc/init.d/rygel restart
stopping rygel: 

dmesg also shows the following:

rygel[2337]: segfault at 4 ip 46970b37 sp bfd1bbac error 4 in libglib-2.0.so.0.2600.1[4695d000+d2000]
Comment 1 Joshua Lock - Disabled 2011-03-23 10:50:24 UTC
I fear this is a similar root to the matchbox segfault, I could repro this issue on atom-pc on my Acer Netbook (atom N270) so I added the following line to tune-atom.inc

+FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -O2 -ggdb -feliminate-unused-debug-types"

and rebuilt, now I can run rygel without it crashing.
Comment 2 Joshua Lock - Disabled 2011-03-23 10:53:26 UTC
Wait, that's not right - rygel segfaults when I run as root on a system with rootless X.

Also, rygel segfaults on beagleboard...
Comment 3 Kevin Tian 2011-03-25 00:16:29 UTC
rygel also segfaults on my atom-pc netbook, if I run it as the root user.

when running it with 'xuser', rygel doesn't segfault, but it rejects to play with below error (.ogg):

** (rygel:613): WARNING **: rygel-playbin-player.vala:183: Error from Gstreamer elemenet playbin20: gstplaysink.c(1876): gen_audio_chain(): /GstPlayBin2:playbin20/GstPlaySink:playsink0

Dongxiao reminded me that it's possibly because the default mode is to have mediaserver decode and thus only plain audio is played by rygel. However .wav seems not supported (even with gaku).

there's rygel-preference which can control which side to do decode, however rygel-preference utility is not built out (only icon there)

I'm now trying 0.8.3 stable version
Comment 4 Kevin Tian 2011-03-25 01:35:45 UTC
I fall back to 0.8.3 which is the latest stable version, and it works! Both audio(.ogg, .mp3, .wav) and video (.ogg) can be played with av controller. Now I run rygel in same netbook as gupnp av controller, so I can't play mp4 video yet. But the result does be promising now...
Comment 5 Joshua Lock - Disabled 2011-03-25 01:43:40 UTC
Excellent. I can't directly recall why I had picked the 0.9.x series. Perhaps as it's what already had a recipe in OE.

I will try and get video working with 0.8.3 today. Do you have a set of changes for your work thus far?

Thanks Kevin!
Comment 6 Kevin Tian 2011-03-25 01:47:43 UTC
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=tk/demo

it's just rebased to latest meta-demo/master, but my test was only done on an old changeset before the rebase.

Now I'm rebuilding all the images, and trying to see whether it works well in final setup (mediaserver, control point, render as separate box) :-)
Comment 7 Kevin Tian 2011-03-25 02:01:08 UTC
forgot to mention one manual step (for my test with rygel in same box as av controller). The default rygel launched automatically can only play audio. No response when playing video. I have to manually kill and then relaunch it, and then video playback works. I'll soon see whether this is same case when rygel runs in a separate machine
Comment 8 Joshua Lock - Disabled 2011-03-25 02:02:41 UTC
(In reply to comment #6)
> http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=tk/demo

Cool, thanks.
 
> it's just rebased to latest meta-demo/master, but my test was only done on an
> old changeset before the rebase.

I wonder if the lack of h264 video is because your old changeset didn't include the patch to add gst-plugins-good-qtdemux to the image?
Comment 9 Kevin Tian 2011-03-25 02:45:56 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=tk/demo
> Cool, thanks.
> > it's just rebased to latest meta-demo/master, but my test was only done on an
> > old changeset before the rebase.
> I wonder if the lack of h264 video is because your old changeset didn't include
> the patch to add gst-plugins-good-qtdemux to the image?

Possibly. Wait my new build to finish now...
Comment 10 Kevin Tian 2011-03-25 03:31:47 UTC
well, rygel on sugarbay also runs well. The only problem is that sugarbay is not found by atom-pc av controller point. If I launch av controller point on sugarbay itself, it only shows its own rygel too w/o connection to atom-pc. that'd be the next thing to figure out, but generally segfault issue should be fixed by the stable version
Comment 11 Kevin Tian 2011-03-30 01:07:33 UTC
now rygel on sugarbay can be found by the atom-pc a/v control point successfully. ogg can be played successfully on sugarbay, however mp4 doesn't. 

there's an error from gstreamer:

qtdemux(497): gst_qtdemux_post_no_playable_stream_error (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstQTDemux:qtdemux0: no known streams found

same mp4 file can be played successfully by poky video player locally on sugarbay. local "gst-launch playin uri=...." also succeeds. 

Anybody may have a thought what's going on here? I disable transcode from rygel-preference which doesn't help too (expected, as there's no mp4 related transcode option)
Comment 12 Darren Hart 2011-03-31 15:43:29 UTC
Created attachment 129 [details]
gupnp-av-cp strace

strace attached indicating icon paths searched (Scary waste of resources!)

read(6, "gtk-icon-theme-name = \"Sato\"\n", 4000) = 29

So the theme appears to be Sato, I never see it parse the index.theme

The gnome directory never appears to be checked.
Comment 13 Darren Hart 2011-03-31 15:44:23 UTC
(In reply to comment #12)
> Created attachment 129 [details]
> gupnp-av-cp strace
> 
> strace attached indicating icon paths searched (Scary waste of resources!)
> 
> read(6, "gtk-icon-theme-name = \"Sato\"\n", 4000) = 29
> 
> So the theme appears to be Sato, I never see it parse the index.theme
> 
> The gnome directory never appears to be checked.

Ugh... caught by bugzilla's obnoxious reload to another bug after commit... sigh. Ignore this.
Comment 14 Darren Hart 2011-04-27 16:13:00 UTC
I need to ask someone else to pick this up. Josh, are you game?
Comment 15 Joshua Lock - Disabled 2011-04-27 16:58:34 UTC
I thought this defect had been narrowed down to libsoup missing? Or possibly that we'd worked around it by switching to an older version of Rygel?

I don't think I have access to any sugarbay hardware so if this is sugarbay specific I don't know that I'm the right assignee.

Before we do any more with this can we verify:
a) if the bug is still valid with the latest meta-demo
b) if a is true whether this is sugarbay specific
Comment 16 Mei Lei 2011-08-17 18:49:54 UTC
1) The upstream 0.9.x series are unstable versions. The stable 0.10.x series is for GNOME 3.0. So we'd better keep the stable 0.8.3 version.
2) The issue about mp4 can't played on sugarbay has been fixed by Dongxiao:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5983fe176dae4cfdae3d43bd3a965fed15abb8e4

So I think we can close this bug.
Comment 17 Darren Hart 2011-08-18 14:43:04 UTC
If the stable version restarts as it should, then lets revert to that version and close this out.
Comment 18 Mei Lei 2011-08-18 18:36:30 UTC
(In reply to comment #17)
> If the stable version restarts as it should, then lets revert to that version
> and close this out.

The stable version restarts without any problem, and Kevin has sent out a patch to fallback rygel to 0.8.3:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-demo/commit/?id=f6de1e5a29b53407122675bea4c925cd03d0d6f7
Comment 19 Saul Wold 2011-08-24 15:39:32 UTC
This patch already appears to be applied to meta-demo/master, this has been in meta-demo since 3/25/11

http://git.yoctoproject.org/cgit.cgi/meta-demo/commit/?id=f6de1e5a29b53407122675bea4c925cd03d0d6f7

Can someone please build and verify that this is fixed.
Comment 20 Saul Wold 2011-08-24 18:21:24 UTC
This change is already merged.