Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SIGHUP Crash The Server

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Sun Jun 24, 2007 3:54 am    Post subject: SIGHUP Crash The Server Reply with quote

Hi to all,
I am using Icecast_2.3.1 and whenever I try to send HUP signal to the server it always fails. I have added some code pieces and cleared some of them (in sighandler.c and cfgfile.c) to resolve the problem:

Code:
void _sig_hup(int signo)
{
    INFO0("Scheduling config reread Global Control ! ...");
    global . schedule_config_reread = 1;
    /* some OSes require us to reattach the signal handler */
    INFO0("Scheduled config reread, SIGHUP sending ...");
    signal(SIGHUP, _sig_hup);
    INFO0("Signal sended ...");
}


This works properly and I could see the messages in log file. Also I have added debug codes in cfgfile.c/config_clear() for each section and here is the output:

Quote:
[2007-06-24 05:13:21] INFO CONFIG/config_clear Config Clearing
[2007-06-24 05:13:21] INFO CONFIG/config_clear Relays Cleared
.....
[2007-06-24 05:13:21] INFO CONFIG/config_clear Mounts Cleared
And Nothing!


Related code piece in cfgfile.c/config_clear() here:

Code:
    INFO0("Config Mounts Cleared");
    alias = c->aliases;
    while(alias) {
        nextalias = alias->next;
        xmlFree(alias->source);
        xmlFree(alias->destination);
        xmlFree(alias->bind_address);
        free(alias);
        alias = nextalias;
    }
    INFO0("Aliases Cleared");


I couldn't see "Aliases Cleared" message in log file and thought the problem might be alias section and comment them out. The server again crashed but not immediately. When I comment "global . schedule_config_reread = 1;" line out, Icecast do not reread config file.

I am not sure if this is a bug so I decided to write this here.

Thanks.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber