| VWR-11759 | SVN-108641 Linux stopped playing streams |
| Reporter: | Iskar Ariantho |
| Assignee: | Tofu Linden |
| Votes: | 6 |
| Environment: | Second Life 1.22.0 (108641) Jan 27 2009 14:18:07 (Developer)
You are at 248001.0, 313151.1, 950.0 in Delphinium Island located at sim4589.agni.lindenlab.com (63.210.158.239:13000)
CPU: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Memory: 2026 MB
OS Version: Linux 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce Go 7700/PCI/SSE2
OpenGL Version: 2.1.2 NVIDIA 180.22
libcurl Version: libcurl/7.16.4 OpenSSL/0.9.7c zlib/1.2.3 c-ares/1.4.0
J2C Decoder Version: OpenJPEG: 1.3.0, Runtime: 1.3.0
Audio Driver Version: OpenAL, version 1.1 / OpenAL Community / OpenAL Soft: ALSA Software on default
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.21336 (Mozilla GRE version 1.8.1.18_0000000000)
Packets Lost: 75/116476 (0.1%)
|
| Status: | Resolved |
| Resolution: | Fixed |
| Created: | 2009-01-27 17:47:49-05 |
| Updated: | 2009-07-22 17:24:19-04 |
| Patch: | Patch Attached |
| Linden ID: | DEV-27056 |
| Components: | Sound
|
| Voice works perfectly, normal sounds in SL are also to be heard and enjoyed, streams stopped dead in their tracks.
Yes, i have the needed modules to play mp3s under gstreamer, infact i now listen to streams by pasting the url into totem, a gstreamer player.
Logging doesnt show a thing. even made DEBUGMSG a STDERRMSG, which now shows me it constructs the stream, and after that its just
updateMeiua:430: updating media...
updateMedia:436: dead media...
ad infinium..  |
| Comments |
Iskar Ariantho 2009-02-03 08:16:04-05 Same things now happens with the branch/viewer-1.22, svn 109348 version. (obviously, as it seem to have gotten merged from the other branch, picking up the same issue.)
|
Alexa Linden 2009-02-03 12:39:33-05 Can you please provide us with reproducible steps and an example stream URL?
|
Iskar Ariantho 2009-02-04 03:33:15-05 Its easy. go to ANY land with a stream active and press play. You will be greeted with silence. Example stream: http://scfire-dtc-aa01.stream.aol.com:80/stream/1003
BTW, i have traced the issue down to a failing call to gst_init_check(NULL,NULL,NULL) at llmediaimplgstreamer.cpp:196. No idea why it fails tho. As said, totem and even gst_launch have no issues.
I'm running on a pretty stock Centos 5.2 system, with gstreamer 0.10.9 (with an added gstreamer-ffmpeg-0.10.2 to be able to play mp3 streams)
Note. i was able to bypass the entire gstreamer issue by setting LL_BAD_OPENAL_DRIVER, making it fall back to the working fmod. This however does not constitute as a proper fix in my opinion. There still is an issue in the gstreamer setup sequence somewhere...
|
Iskar Ariantho 2009-02-04 03:49:07-05 Oh, while browsing idly on the internet, i found out its possible to set GST_DEBUG to have gstreamer be a bit more verbose over its internal workings.... This is the snipped from the screen that might be of interest:
=====================
grab_gst_syms:81: Found DSO: libgstreamer-0.10.so.0
grab_gst_syms:40: Failed to grab symbol: gst_segtrap_set_enabled
grab_gst_syms:41: Failed to grab symbol: gst_message_parse_buffering
grab_gst_syms:42: Failed to grab symbol: gst_message_parse_info
grab_gst_syms:94: Found DSO: libgstaudio-0.10.so.0
grab_gst_syms:108: Found DSO: libgstvideo-0.10.so.0
startup:191: gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart.
INFO (0xae593658 - 0:00:00.000165000) GST_INIT(10765) gst.c(510):init_pre: Initializing GStreamer Core Library version 0.10.9
INFO (0xae593658 - 0:00:00.000240000) GST_INIT(10765) gst.c(511):init_pre: Using library installed in /usr/lib
INFO (0xae593658 - 0:00:00.000329000) GST_INIT(10765) gstquery.c(101):_gst_query_initialize: init queries
INFO (0xae593658 - 0:00:00.001543000) GST_INIT(10765) gstmessage.c(72):_gst_message_initialize: init messages
INFO (0xae593658 - 0:00:00.002851000) GST_PLUGIN_LOADING(10765) gstplugin.c(182):_gst_plugin_register_static: loaded static plugin "staticelements"
INFO (0xae593658 - 0:00:00.096187000) GST_REGISTRY(10794) gstregistryxml.c(572):gst_registry_xml_read_cache: loaded /root/.gstreamer-0.10/registry.i686.xml in 0.083507 seconds
ERROR (0xae593658 - 0:00:00.108149000) GST_INIT(10765) gst.c(689):ensure_current_registry_forking: error during waitpid: No child processes
startup:198: GST init failed for unspecified reason.
=====================
It seems forking is somehow prohibited? Maybe gst_registry_fork_set_enabled() might help here, but by the looks of it, that isnt supported in my older 10.9 version of gstreamer. Yuck.
|
Iskar Ariantho 2009-02-04 04:51:12-05 Ok, got it nailed. The attached patch fixes the issue. It turned out there is a race condition where gst_init_check forks and waitpids on the result, but the in llcommon/llapp.cpp installed signal handler picks off the result first.
Fixed the issue by looking for a recent gst function gst_registry_fork_set_enabled() to disable forking, or if that function isnt available, muck with the SIGCHLD signal handler during the gst_init_check call.
(Please note, the codepath when gst_registry_fork_set_enabled is available is NOT tested due to lack of a gstreamer > 0.10.10. The other part i can vouch for )
frowns ok, just noticed the patch still contained a commented out return for when grab_symbols fails. I need that line, because otherwise the OPTIONAL missing symbols will still halt loading gstreamer. Think there is a seperate codeing issue in the LL_GST_SYM macro...
|
Tofu Linden 2009-02-04 10:31:52-05 That's some interesting debugging, thanks. So how about if the viewer just stops catching SIGCHLDs? I'm pretty sure it doesn't need to (the fact that it does is a holdover from the shared code with servers).
|
Tofu Linden 2009-02-04 10:49:42-05 So, this 'foo.patch' would be good to test!
|
Iskar Ariantho 2009-02-04 12:33:49-05 Tested it, and it does NOT work. (bleah, a total recompile just to suppress the setting of SIGCHLD, whatever happened to a simple // )
Actually, i am not sure why it doesnt work, judging from the sourcecode i would say it should give the same end result, but since it doesn't, i can only assume some library (curl?, libmoz?) cant leave the signals alone...
I also looked at some other places the viewer forks, like the llvoiceclient.cpp where it forks SLVoice and llwindow/llwindowsdl.cpp (exec_cmd) for starting external browsers... However neither function cares about the waitpid result, so, even if waitpid fails due to the SIGCHILD race, it works out ok in the end.
Seeing the viewer doesnt use gst_update_registry(), there is no further forking in gstreamer, hence i would say my patch is the least intrusive to fix this issue.
Oh, as an aside, 'err' in your patch is still NULL after returning from gst_init_check, resulting in an ever so slighty crash when dereferencing it. Was the first thing i did myself, before discovering GST_DEBUG
|
Tofu Linden 2009-02-04 12:45:33-05 Huh, so much for the GStreamer docs - again.
|
Tofu Linden 2009-02-04 13:00:51-05 If there's a chance that other libs are dicking with SIGCHLD, which there is, then I want to leave the LL_IGNORE_SIGCHLD stuff intact. I'm concocting a mix of our patches. I hope you can try it. 
|
Tofu Linden 2009-02-04 13:14:27-05 There, how's foo2.patch for you?
|
Iskar Ariantho 2009-02-04 13:34:09-05 if you want to enclose the signal stuff in LL_LINUX, i think you should place the struct sigaction tmpact, oldact and the restore of the old sighandler also under LL_LINUX
New version is compiling....
|
Tofu Linden 2009-02-04 14:31:27-05 Good point, I started the LL_LINUX bracketing and got distracted by one of those 200 other things going on. 
|
Iskar Ariantho 2009-02-04 15:52:40-05 Yup, the latest patch works ok for me. Be amazed, be happy
I added a little debug info, and it seems upon arrival in llmediaimplgstreamer the SIGCHLD handler is set to SIG_IGN. So yup, somebody is messing with it. Hope to see the patch soon in 1.22!
|
Tofu Linden 2009-02-04 15:56:06-05 Hooray, thanks for the debugging, patch and testing.
I'll get this on maint-viewer and the RC release team may or may not cherrypick it to 1.22; if not 1.22, 1.23.
|
Tayra Dagostino 2009-02-06 14:36:07-05 from OpenAL wiki:
"On Linux OpenAL will by default use the OSS kernel sound device."
all soundcard too much new and wothout retro-compatibility suffer problem with openal, workaround is create a file in user home
~/.openalrc
with only 1 line:
(define devices '(alsa esd native))
in this way openAL try first ALSA device, so ESD, and last native (old Open Sound System)
in this way OpenAL work with audio stream
1.22.9 NB still broken
|
Tayra Dagostino 2009-02-07 08:14:58-05 1.22.9 now work on linux for audio stream, both mp3, ogg, fixed or variable rate
OpenAL 1.4.272
Gstreamer: 0.10.19
|
catherine pfeffer 2009-02-08 10:46:11-05 Itt might be unrelated, but see VWR-11947 :
Now (starting with 1.22.8), the viewer crashes when I start playing streamed sounds.
Update: it seems to be unrelated problems, because the patch attached here is apparently of no help for VWR-11947.
|
Techwolf Lupindo 2009-02-09 16:09:51-05 @Tayra Dagostino, please note the the openal support in 1.22.8 requires openalsoft. The openal wiki refers to the old and outdated openal from creative labs. I use .alsoftrc with the following
Note that device is only for alsa, under [general] from the docs,
Also note that openalsoft is now 1.6.372 http://kcat.strangesoft.net/openal.html
|
Christina01a Twine 2009-03-26 04:11:33-04 Hello,
this is my first time to post a comment here.
I'm facing the same problem ... I don't have music inworld with this latest viewer.
Although I'd like to use above patch, I don't know how to use it.
This question must sounds a beginner's, but could anyone tell me how to use it?
Thanks.
|
Calazur Zarco 2009-04-10 15:54:26-04 My problem was ONLY "music" not working (means that all sound but music was working in this new version).
I solved it uncommenting this in "secondlife" script loader:
#export LL_BAD_OPENAL_DRIVER=x
export LL_BAD_OPENAL_DRIVER=x
I dont use openal, I use alsa on all my Debian and Ubuntu systems, even ESD and OSS goes throught ALSA for me.
Its all self-explained inside the file and in readme-linux.txt, with some other options to try if that dont work for you.
EDITED: I forgot to mention that I didnt use any patch, I have the raw new update viwer only asked by the older client to upgrade.
Thanks for this post, starting here I could find the files and all.
Good luck
|
Tayra Dagostino 2009-04-10 16:02:13-04 upgrading to lenny solve problem, using directly openal
|
mojito sorbet 2009-05-21 07:57:04-04 Using 1.22.11 on Ubuntu 9.04, streaming was not working. Commenting out the LL_BAD_OPENAL_DRIVER so it used FMOD fixed it. But you can not have any other programs running that use audio, such as RhythmBox.
However, RC 1.23.2 broke it again and the workaround does not fix it any more.
|
Dessie Linden 2009-06-15 19:52:33-04 Fixed in 1.23.4, released on 06/15/2009.
|
catherine pfeffer 2009-07-22 10:50:56-04 I don't know if this is the right place for reporting this, but :
On Linux 64 bit and SL client 1.23.4 (123908).
- with openal : ambient noises ok, no streams
- with fmod : no sound at all
be it with gstreamer enabled or disabled, and individual fmod backends activated or not.
I know this is a different problem, which origin is 64 bit linux libraries not called by 32 bits SL client. However it would be nice to have that resolved too (ideally by having a real 64 bits SL client).
Also, my feeling was it would be nice to tell other 64 bits users about this problem if they search the jira for hints.
|