Bug 103113 - [GST] Freeze with max CPU when playing streaming media when netload is high
Summary: [GST] Freeze with max CPU when playing streaming media when netload is high
Status: RESOLVED INTENTIONAL
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.2.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 112352 118635 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-03 06:43 UTC by djandruczyk
Modified: 2006-06-11 12:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description djandruczyk 2005-04-03 06:43:06 UTC
Version:           1.2.3 (using KDE KDE 3.3.2)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.5  (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
 
OS:                Linux

When playing a stream from the internet (club977) when the system's netwrok load is relatively higher (bittorrent ISO download in progress)  amarok will stop playing hte stream,  it's gui wil freeze and CPU usage will max out at 100%.

The only solution is to kill amarokapp and restart amarok.  It's easily repeatable.  gkrellm reports that network activity was a steady 100-140KB/sec DL and about 20KB/sec upload during the times when amarok regularly locked up, when net activity is low amarok will NOT lockup.  My connection is capable of about 360KB/sec downstream (to me) and 50KB/sec upload (to the internet), so my connection isn't being maxed by any means

running strace on amarokapp reports this following loop:

ioctl(3, FIONREAD, [0])                 = 0
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1112502812, 229608}, NULL) = 0
select(29, [3 4 5 8 10 12 19 20 21 22 23 24 26 27 28], [], [], {0, 2109}) = 1 (i
n [5], left {0, 3000})
read(5, "\0", 1)                        = 1
gettimeofday({1112502812, 232579}, NULL) = 0
gettimeofday({1112502812, 232825}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1112502812, 232958}, NULL) = 0
select(29, [3 4 5 8 10 12 19 20 21 22 23 24 26 27 28], [], [], {0, 5644}) = 0 (T
imeout)
gettimeofday({1112502812, 241477}, NULL) = 0
gettimeofday({1112502812, 244436}, NULL) = 0
gettimeofday({1112502812, 245225}, NULL) = 0
gettimeofday({1112502812, 245294}, NULL) = 0
gettimeofday({1112502812, 245351}, NULL) = 0
gettimeofday({1112502812, 245406}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1112502812, 245542}, NULL) = 0
select(29, [3 4 5 8 10 12 19 20 21 22 23 24 26 27 28], [], [], {0, 12915}) = 0 (
Timeout)
gettimeofday({1112502812, 261858}, NULL) = 0
gettimeofday({1112502812, 265088}, NULL) = 0
uname({sys="Linux", node="removed.for.privacy.reasons", ...}) = 0
ioctl(5, FIONREAD, [0])                 = 0
write(7, "\0", 1)                       = 1
ioctl(5, FIONREAD, [1])                 = 0
gettimeofday({1112502812, 270585}, NULL) = 0
gettimeofday({1112502812, 270657}, NULL) = 0
gettimeofday({1112502812, 270728}, NULL) = 0
gettimeofday({1112502812, 270783}, NULL) = 0
gettimeofday({1112502812, 270862}, NULL) = 0
write(3, "\1\0\n\0>\16\200\3\244\0\0\0\220\1h\1 \3\340\1\0\0\0\0"..., 868) = 868
ioctl(3, FIONREAD, [544])               = 0
read(3, "\34\360\336\266>\16\200\3(\0\0\0\255\324E\1\0\0\0\0\255"..., 544) = 544
Comment 1 Ian Monroe 2005-04-03 06:53:05 UTC
what sound engine do you use?

This reminds me of that issue with gstreamer and pausing live.fm.
Comment 2 djandruczyk 2005-04-03 19:00:09 UTC
gstreamer I think.  On the Engine Tab in amarok's configurator the "Sound System" is BLANK, the only choices are the blank one, aRTs Engine and <No engine>  The output devices is "esdsink" so I believe that's gstreamer...

Comment 3 Luke Plant 2005-04-30 20:51:25 UTC
I get the same thing, but always with streaming media, even when my connection isn't being otherwised used.  I get a blip of initial network activity, then amarok freezes and uses 100% CPU.  The streams work fine in Kaffeine, XMMS etc.

In the 'Sound system' configuration box, I have two items - a blank entry and <no engine>.  I presume the blank entry is arts, although it could be gstreamer as I do have that installed. Clicking 'About' does not give me any information.
Comment 4 Mark Kretschmann 2005-04-30 21:20:13 UTC
On Saturday 30 April 2005 20:51, Luke Plant wrote:
> In the 'Sound system' configuration box, I have two items - a blank entry
> and <no engine>.  I presume the blank entry is arts, although it could be
> gstreamer as I do have that installed. Clicking 'About' does not give me
> any information.


We're currently investigating this (very strange) phenomenon of the "blank 
entry". None of our developers can reproduce it, so we're a bit at a loss 
here. Could you please specify

1) Your distro
2) KDE version
3) amaroK version

And whether it always appears blank or just sometimes.

Thanks.
Comment 5 djandruczyk 2005-04-30 21:56:59 UTC
Distro:  Gentoo
KDE: 3.3.2
Amarok 1.2.3 (unmasked via gentoo's /etc/package.keywords file)

Under the "Engine" tab, Sound system is blank, choices are  "blank", "aRTs Engine" and "<no engine>"  It appears that the blank one is gstreamer, as the output plugin is esdsink. (tried changing to alsasink/osssink and no change in behavior) Clicking the "About" button next to the sound system choice does nothing..

Comment 6 Luke Plant 2005-04-30 22:33:13 UTC
Re: questions about the blank entry
I'm using:
Distro: Ubuntu
KDE: 3.4
Amarok: 1.2.3

The entry is always blank (though I haven't been using amarok long).
Any debugging you'd like me to do?  I can recompile it with debug symbols very easily (I love Debian!), and can use gdb, let me know if I can help.
Comment 7 Leo Franchi 2005-05-01 19:15:25 UTC
Distro: Yellow Dog
KDE: 3.3.2, i think (not sure)
Amarok: 1.2.3

same problem. this is an old G3 blue+white mac, kinda slow but works fine. it plays as well, it just has no name in the engine dialog.
Comment 8 Mark Kretschmann 2005-05-01 20:25:21 UTC
CVS commit by markey: 

FIX:
The first engine entry in the config dialog was always blank. This bug affected all fresh amaroK installations, when no prior amarokrc existed.

CCBUG: 103113


  M +1 -0      ChangeLog   1.639
  M +4 -0      src/enginecontroller.cpp   1.129


--- kdeextragear-1/amarok/ChangeLog  #1.638:1.639
@@ -55,4 +55,5 @@
 
   BUGFIXES:
+    * The first engine entry in the config dialog was always blank.
     * If you filtered by more than one word in Collection Browser, adding
       expandable items (eg: artists or albums) wouldn't work. (BR 100150)

--- kdeextragear-1/amarok/src/enginecontroller.cpp  #1.128:1.129
@@ -119,4 +119,8 @@ EngineController::loadEngine() //static
     }
 
+    // Important: Make sure soundSystem is not empty
+    if( AmarokConfig::soundSystem().isEmpty() )
+        AmarokConfig::setSoundSystem( engineName );
+
     return m_engine;
 }
Comment 9 Mark Kretschmann 2005-05-01 20:30:40 UTC
CVS commit by markey: 

BACKPORT:
The first engine entry in the config dialog was always blank. This bug affected all fresh amaroK installations, when no prior amarokrc existed.

CCBUG: 103113


  M +1 -0      ChangeLog   1.593.2.12
  M +4 -0      src/enginecontroller.cpp   1.127.2.1


--- kdeextragear-1/amarok/ChangeLog  #1.593.2.11:1.593.2.12
@@ -9,4 +9,5 @@
 
   BUGFIXES:
+    * The first engine entry in the config dialog was always blank.
     * If you filtered by more than one word in Collection Browser, adding
       expandable items (eg: artists or albums) wouldn't work. (BR 100150)

--- kdeextragear-1/amarok/src/enginecontroller.cpp  #1.127:1.127.2.1
@@ -119,4 +119,8 @@ EngineController::loadEngine() //static
     }
 
+    // Important: Make sure soundSystem is not empty
+    if( AmarokConfig::soundSystem().isEmpty() )
+        AmarokConfig::setSoundSystem( engineName );
+
     return m_engine;
 }
Comment 10 Luke Plant 2005-05-10 20:16:43 UTC
Back to the original bug report:   I don't know about the original reporter, but I've found that in my case the crashes only occur with some streams.  In fact, all the ones that come with amarok that I've tried work fine.  Here are some that don't:

http://ogg.smgradio.com/vr160.ogg  (Ogg Vorbis)
http://www.smgradio.com/core/audio/mp3/live.pls?service=vrbb (MP3)


Comment 11 Mark Kretschmann 2005-05-10 20:50:08 UTC
On Tuesday 10 May 2005 20:16, Luke Plant wrote:
> ------- Back to the original bug report:   I don't know about the original
> reporter, but I've found that in my case the crashes only occur with some
> streams.  In fact, all the ones that come with amarok that I've tried work
> fine.  Here are some that don't:
>
> http://ogg.smgradio.com/vr160.ogg  (Ogg Vorbis)
> http://www.smgradio.com/core/audio/mp3/live.pls?service=vrbb (MP3)


This freezing bug has been fixed long ago (in svn trunk).
Comment 12 Luke Plant 2005-05-11 01:28:36 UTC
On 10 May 2005 18:50:10 -0000 Mark Kretschmann wrote:

> This freezing bug has been fixed long ago (in svn trunk).

I just checked out from svn and built it, and I'm still seeing this
freezing. I removed the original amarok and amarok-arts (Ubuntu
packages, version 1.2.3) before testing, so I definitely tested the
right version.  Here is the backtrace after the freeze occurs. Let me
know if there is any other debug info you want, or some pointers to start debugging (though I'm not sure I'll get very far, and I don't have much time to look at this).

(gdb) bt full
#0  0x0815794f in amaroK::StreamProvider::readRemote (this=0x87f9978)
at streamprovider.cpp:225 index = 0
        bytesWrite = 1380
        bytesRead = 1380
#1  0x08158892 in amaroK::StreamProvider::qt_invoke (this=0x87f9978,
_id=6, _o=0xbfffe170) at streamprovider.moc:153
No locals.
#2  0xb6d04067 in QObject::activate_signal () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#3  0xb6d03eae in QObject::activate_signal () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#4  0xb704c188 in QSocket::readyRead () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#5  0xb6eebf84 in QSocket::sn_read () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0xb704c257 in QSocket::qt_invoke () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#7  0xb6d04067 in QObject::activate_signal () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#8  0xb6d041be in QObject::activate_signal () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#9  0xb701fee0 in QSocketNotifier::activated () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#10 0xb6d1f036 in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#11 0xb6cac370 in QApplication::internalNotify () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#12 0xb6cab9d4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#13 0xb72cc960 in KApplication::notify () from /usr/lib/libkdecore.so.4
No symbol table info available.
#14 0xb6c9ca10 in QEventLoop::activateSocketNotifiers () from /usr/lib/
libqt-mt.so.3 No symbol table info available.
#15 0xb6c58917 in QEventLoop::processEvents () from /usr/lib/libqt-
mt.so.3 No symbol table info available.
#16 0xb6cbd74c in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
No symbol table info available.

#17 0xb6cbd60e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#18 0xb6cac57b in QApplication::exec () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#19 0x081847bb in main (argc=1, argv=0xbffffa14) at main.cpp:89
        app = {<> = {<No data fields>}, <EngineObserver> =
{_vptr.EngineObserver = 0x8219f64, m_subject = 0x0}, static metaObj =
0x83af328, m_pGlobalAccel = 0x83b6de0, m_pPlayerWindow = 0x0,
m_pPlaylistWindow = 0x83b7020, m_pTray = 0x83c7080}


Comment 13 Georg Wittenburg 2005-08-17 15:44:14 UTC
I'm still seeing this bug with with Amarok 1.3 (Debian packages, gstreamer engine) when playing Cool-Streams / Indie Pop Rocks.
Comment 14 Mark Kretschmann 2005-10-15 09:23:24 UTC
*** Bug 112352 has been marked as a duplicate of this bug. ***
Comment 15 Daniel Benamy 2005-10-27 13:08:31 UTC
I'm seeing this as well. Running Gentoo, amaroK 1.3.5, GStreamer engine with alsasink, gstreamer 0.8.10. I haven't noticed any correlation between the freezes & cpu being pegged and heavy network usage on my part (downloading or whatever), but I share my internet connection so someone else could be doing something. If you need anything else, just ask. Thanks.
Comment 16 Daniel Benamy 2005-10-27 13:13:11 UTC
Sorry for the extra posting. I forgot to say in the first one that the stream I usually listen to is http://radioparadise.com/ 128k mp3.
Comment 17 Olli Neuville 2005-11-09 09:05:37 UTC
>I'm still seeing this bug with with Amarok 1.3 (Debian packages, gstreamer >engine) when playing Cool-Streams / Indie Pop Rocks. 

I have the same problem with either gstreamer and xine. At some point the playback stops and the software tries to buffer the stream again. Eventually the playback never comes back. Amarok does not crash -> it freezes and I have to kill the process.

PC-Linux
Kernel: 2.6.13-gentoo-r5
Qt: 3.3.4
KDE: 3.4.1
amaroK: 1.3.6
Comment 18 Mark Kretschmann 2005-12-19 14:22:23 UTC
*** Bug 118635 has been marked as a duplicate of this bug. ***
Comment 19 robert lindgren 2005-12-19 14:27:38 UTC
It's easy to debug this, just run a shoutcast server, connect to it with amarok, stop the shoutcast server= amarok freezes.
Comment 20 djandruczyk 2005-12-19 16:33:15 UTC
easier way. (works with current amarok.  Connect to a network stream, and then power off the firewall (or router) and amarok will  go to 100% cpu usage.  This happens with amarok 1.3.7 under kde 3.4.3.
Comment 21 Maciej Ananicz 2006-01-24 17:45:23 UTC
*** This bug has been confirmed by popular vote. ***
Comment 22 Greg Meyer 2006-03-07 03:08:15 UTC
Since gstreamer 0.8 engine is no more in 1.4SVN, I'm thinking that the proper thing to do with this bug is close as WONTFIX, not to be offensive just practical.