[icecast] Server drops client - problem with IceS?

Jørgen Elgaard Larsen maillistparticipant at elgaard.net
Fri Jan 30 01:28:02 UTC 2004



Hi there,

I just joined the list and have a question on one of the earlier posts:

On Oct 28 2003, Ricardo wrote that his server diconnected his clients. I 
have the exact same problem - and a bit of testing/analysis.

<p>I am running an Icecast server and IceS on the same linux box. IceS is 
encoding a live stream from my sound card.

After a while of listening (approx 2 mins) from another box, the server 
disconnects the client. The log says:

DBUG format/format_generic_write_buf_to_client Client had recoverable 
error -1
DBUG format/format_generic_write_buf_to_client Client had recoverable 
error -1
[repeats some 50 to 250 times, once or twice a second]
DBUG source/source_main Client has fallen too far behind, removing
DBUG source/source_main Client removed

<p>I read Karl's earlier explanaion on that:
> this indicates that the amount of data due to go to that client has
> grown too large. There are several possibilities for this, one is
> stalls on the network, maybe TCP flow control kicking in or an actual
> outage/misconfiguration. Another is buggy client

That was my initial thoughts, too.

There is, however, a couple of twists on that in my case:

1) When I use the same client to listen to an Ogg file served directly
    by the Icecast server (using "fileserve"), there is no such problem.
    This should more or less exclude network issues.

2) The problem is experienced using another client on another OS (Winamp
    5 on Windows 98 instead of ogg123 og Linux). This does not entirely
    exclude the client, but close.

3) Changing bitrate of the stream does not seem to change very much
    regarding (the client may hold on a few seconds more on a ridiculous
    low bitrate).

4) It seems that the problem lies in that the client plays the stream
    too slow compared to the recording. Sample rate is the same all the
    way through, but maybe it goes wrong somewhere?

    I notice, that ogg123's input and output buffers are at 100% most of
    the time - the input buffer gradually crawls from 10 to 100%. When it
    reaches 100%, the log errors begin on the server.

    If I playback at approx. 9% higher speed, it works fine, e.g.
       ogg123 -x 100 -y 92 http://my.server:8765/mystream.ogg
    - except for the resulting small clicks in the audio, of course :-)

    By doing this, ogg123's input buffer stays at about 10%.

5) When I change IceS to take input from a playlist instead of from the
    sound card, the problem goes away and ogg123's buffers drops to
    25/75%

6) I just recorded a WAV file on the server using arecord and then
    encoded it using oggenc. When played as a file (using "fileserve"),
    it works fine. Played as playlist through IceC, it also works fine,
    with ogg123 buffers at 25/75%

My conclusion is that the problem probably lies with IceS - presumably 
in either reading from the (alsa) sound driver or in the Ogg encoding of 
the PCM input. Somewhere on the way it must be messing up the sample 
rate, I guess.

<p>Any thoughts on that?

<p><p>-----------------
Details about my setup:

Server:
Pentium II, 800MHz running Debian GNU/Linux (woody). No X.
Kernel 2.4.18 (custom build)
Icecast 2.0.0 downloaded a couple of days ago
IceS 2.0-Beta4
- both build from tarballs.
Recording from a Soundblaster 128 PCI using ALSA drivers.
The server runs at loads about 0.4 when running both icecast and iceS

Client1:
Pentium IV laptop
Red Hat Linux 9, kernel 2.4.20 (Red Hat version)
onboard i810 sound card, OSS driver
ogg123 from vorbis-tools 1.0 - installed via RPM's a couple of days ago

Client2:
Same laptop, running Win98SE
Winamp 5, downloaded today

Network:
100Mbit LAN

-------------------

Hope you have some ideas on this.

<p><p>Sincerely,

Jørgen Elgaard Larsen
IT Manager
University Radio of Copenhagen
Denmark

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list