defunct process or segmentation fault

Steamcast is a stand alone server that combines the features of SHOUTcast and Icecast2 and more to make one mega awesome server.
Post Reply
Lane
Posts: 154
Joined: Mon May 09, 2005 4:16 pm

defunct process or segmentation fault

Post by Lane »

Because of the problems dj-zath (who I know) has been having, I decided to give my steamcast more of a work out. Where I'd not noticed a problem in the past, I am finding one now.

I have a basic setup with two mount points. One for a 128, and one for a 24k stream. I'm using the oddcast dsp in this case to connect to a remote linux server running steamcast.

Here's a typical circumstance that generates fatal errors. I launch steamcast using this conf :

Code: Select all

PortBase=8000
MaxUser=20
LogFile=steamcast.log
ScreenLog=Yes
RealtimeLog=Yes
YPLog=Yes
PidFile=steamcast.pid
NameLookups=No
ClientTimeout=30

AdminUser=admin
AdminPass=xxx

SourceMount=/128.mp3
; SourceBackup=
SourceUser=xxx
SourcePass=xxx
SourceUserMax=20
; SourceRelay=
; SourceAvgBitrateLimit=128
SourceIsSC=Yes
SourceIsDefault=Yes
; SourceIP=123.45.67.89
; SourceAuth=No
SourceBuffUtil=2

SourceMount=/24.mp3
SourceUser=xxx
SourcePass=xxx
SourceUserMax=20
; SourceRelay=
; SourceAvgBitrateLimit=128
SourceIsSC=Yes
SourceIsDefault=No
; SourceIP=123.45.67.89
; SourceAuth=No
SourceBuffUtil=10

;Directory=http://www.radiotoolbox.com/mediatoolbox/yp-cgi.php
Directory=http://www.oddsock.org/cgi-bin/yp-cgi
Directory=http://dir.xiph.org/cgi-bin/yp-cgi
I then make my two initial conections. one at 128k, and one at 24k.

The first thing I notice is that the song info doesn't show for the first sourcemount, but it does for the second. And the description doesn't show up for second one, but it does for the first one. (yp is on of course) Except for the bit rates, the oddsock dsp settings are the same. It doesn't show on the steamcast status page, or status.xml, or in my listening player.

Now the fun begins. If I disconnect one of them, we're fine. But when I reconnect the stream, it usually results in a Segmentation fault and the server is down. Sometimes it will reconnect, but will then give the fault when I try disconnect again. Here is a low of that happening (a seg fault on reconnect).

Code: Select all

Event Log:
[05/09/2005@16:20:42] Configuration loaded from steamcast.conf
[05/09/2005@16:20:42] WARNING: steamcast.vip could not be loaded, no vips will be loaded
[05/09/2005@16:20:42] WARNING: steamcast.ban could not be loaded, no bans will be loaded
[05/09/2005@16:20:42] PID: 27490
[05/09/2005@16:20:42] Listening to ANY:8000 for incoming client connections...
[05/09/2005@16:20:42] Listening to ANY:8001 for incoming source connections...
[05/09/2005@16:20:48] Name:made in canada - 128k; Genre:Rock
[05/09/2005@16:20:48] Public:1; Bitrate:128; URL:http://www.mybeausejour.com:8000/128.mp3
[05/09/2005@16:20:48] Content-Type: audio/mpeg
[05/09/2005@16:20:48] Audio-Info:ice-samplerate=44100;ice-bitrate=128;ice-channels=2
[05/09/2005@16:20:48] Source Connection Complete
[05/09/2005@16:20:48] Starting YP Services...
[05/09/2005@16:20:48] <dir.xiph.org> [add /128.mp3] NAK: Server already exists
[05/09/2005@16:20:48] <www.oddsock.org> [add /128.mp3] NAK: No YPResponse!
[05/09/2005@16:20:49] Source attempting connection from 142.161.245.93.
[05/09/2005@16:20:49] <205.188.234.161> Connection Opened (A: 207.44.228.29:8000/) [L: 1] {UA: SHOUTcast Directory Tester}
[05/09/2005@16:20:49] Source 1 Logged in
[05/09/2005@16:20:49] Public:1; Bitrate:24; URL:http://mybeausejour.com:8000/24.mp3
[05/09/2005@16:20:49] Content-Type: audio/mpeg
[05/09/2005@16:20:49] Source Connection Complete
[05/09/2005@16:20:49] Starting YP Services...
[05/09/2005@16:20:49] <dir.xiph.org> [add /24.mp3] NAK: Server already exists
[05/09/2005@16:20:49] <www.oddsock.org> [add /24.mp3] NAK: No YPResponse!
[05/09/2005@16:21:00] <205.188.234.161> Request: / {UA: Mozilla}
[05/09/2005@16:21:01] <205.188.234.161> Connection Closed [L: 0] {294912 bytes} (12 secs) RE: 134770888
[05/09/2005@16:21:02] <yp.shoutcast.com> added me successfully! (id: 115154443 | tchfrq: 3)
[05/09/2005@16:21:03] <142.161.245.93> Request: / {UA: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.3.1) Gecko/20030723 wamcom.org}
[05/09/2005@16:21:12] <142.161.245.93> Request: /admin/metadata {UA: (Mozilla Compatible)}
[05/09/2005@16:21:12] <142.161.245.93> Request: /admin.cgi {UA: (Mozilla Compatible)}
[05/09/2005@16:21:15] <142.161.245.93> Request: / {UA: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.3.1) Gecko/20030723 wamcom.org}
[05/09/2005@16:21:19] <142.161.245.93> Request: / {UA: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.3.1) Gecko/20030723 wamcom.org}
[05/09/2005@16:23:35] Source Closed Connection
[05/09/2005@16:23:56] Source attempting connection from 142.161.245.93.
[05/09/2005@16:23:56] Source 1 Logged in
[05/09/2005@16:23:56] Public:1; Bitrate:24; URL:http://mybeausejour.com:8000/24.mp3
[05/09/2005@16:23:56] Content-Type: audio/mpeg
[05/09/2005@16:23:56] Source Connection Complete
[05/09/2005@16:23:56] Starting YP Services...
Segmentation fault
You see Source Connection Complete, then it starts YP Services, and it gives the fault, and stops running.

It doesn't do this *every* time, but it's doing it often. Sometimes it will succesfully reconnect, then will seg fault when I *disconnect* the same one again. (my connections and disconnections are initiated at the dsp btw).

AND NOW THE MOST IMPORTANT PART. If I disable the directories for xiph and oddsock, and lock the meta data in the oddcast dsp, the problem occurs much less frequently. I might be able to disconnect and reconnect several times before a failure. (shoutcast is still active, I guess we can't turn that off in steamcast.conf). It always has the seg fault after Starting YP Services ...

So, I turned off the YP in the dsp, and now it stays up all the time. I usually ran it with YP off, as I'm not really running a public server, but as I was asked by zath to turn it on for his server, I decided to try it on for mine as well, and then I ran into these problems.

So, I've narrowed this down as best as I can. Disconnecting and reconnecting sometimes results in a seg fault when YP is on in the dsp. I hope you can make use of this information. If you have any questions, feel free to ask away.

Lane
DJ-Zath
Posts: 16
Joined: Mon May 09, 2005 3:29 am
Location: US - western Illinois
Contact:

Post by DJ-Zath »

Yes, I know mr. lane...

Hi buddy!

I have looked into this situation as a possable cause...

I have "remmed out" the directory entries AND I have set PubServ=0 in the DSP..

The result was the same... when the stream interupts for ANY reason- including net burps, the mount WILL lose sync and then FAIL. EVERY TIME

Its still BETTER than Icecast, though, which requires a manual entry for every time a mount is accessed.. even for relays! really STUPID in my opinion.


Lane: thanks for the suggestion, though.. it was worth a try!

-DjZ
:) :)
Lane
Posts: 154
Joined: Mon May 09, 2005 4:16 pm

Post by Lane »

Well, it didn't fix your problem, but there's still something to fix!

I wonder if there is a way to disable YP services in steamcast? A fix for this particular thing is best, but until then, a way to stop steamcast from running into this error would be a good idea.
Lane
Posts: 154
Joined: Mon May 09, 2005 4:16 pm

Post by Lane »

ok, I tried it when YP on in the dsp, but with SourceIsDefault=No on every mount.

Now this is weird. Both mount source dsp's have YP on. The problem still occured, but only when I disconnect and reconnect the second mount. I'll get a segmentation fault. I disconnected/reconnected the first mount 10 times in a row and it was ok. Why only the second one?

And I still only get the titles on the second one.

This is puzzling me!
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

As I said in the other thread, there is some buggy code in the yp initialization. I have since removed that code so once the next version is out it should be fixed in the mean time. My yp initialization needs alot of work and unfortunately I am short on time.

To stop steamcast from using the yp code simple disable the icy-pub bit. (this is done in your encoder)
- Jay
Lane
Posts: 154
Joined: Mon May 09, 2005 4:16 pm

Post by Lane »

oh, I see Jay, thanks. I searched the forum for this problem but didn't find anything. Glad you're aware of it!
Post Reply