Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] hanging problem with switch_scheduler_add_task


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
markmorreny at gmail.com
Guest





PostPosted: Fri Aug 21, 2009 10:44 am    Post subject: [Freeswitch-users] hanging problem with switch_scheduler_add Reply with quote

Hi,

I am experiencing some hanging when fs is executing switch_scheduler_add_task.

switch_scheduler_add_task(switch_epoch_time_now(NULL) , data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|SSHF_NO_DEL);

I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION and sometimes, hanging occurs on that particular line.  My data_flush_callback is as follows.  I debug the module and it does not even enter data_flush_callback.  It is hanging at switch_scheduler_add_task(). 

SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {

    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "starting to flush cdr record...\n");

    int last_sequence = flush_data_to_csv();
    if (last_sequence > -1 ) {
   
        update_last_seq(last_sequence);
    }
    task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;

}

Does anyone know why?

Thanks,
Mark
Back to top
mrene_lists at avgs.ca
Guest





PostPosted: Fri Aug 21, 2009 11:05 am    Post subject: [Freeswitch-users] hanging problem with switch_scheduler_add Reply with quote

Means another task is hanging, do a "thread apply all bt" in gdb and
look for scheduler tasks.

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene@avgs.ca




On 21-Aug-09, at 11:41 AM, mark morreny wrote:

Quote:
Hi,

I am experiencing some hanging when fs is executing
switch_scheduler_add_task.

switch_scheduler_add_task(switch_epoch_time_now(NULL) ,
data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|
SSHF_NO_DEL);

I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION
and sometimes, hanging occurs on that particular line. My
data_flush_callback is as follows. I debug the module and it does
not even enter data_flush_callback. It is hanging at
switch_scheduler_add_task().

SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {

switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"starting to flush cdr record...\n");

int last_sequence = flush_data_to_csv();
if (last_sequence > -1 ) {

update_last_seq(last_sequence);
}
task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;

}

Does anyone know why?

Thanks,
Mark

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
markmorreny at gmail.com
Guest





PostPosted: Fri Aug 21, 2009 11:31 am    Post subject: [Freeswitch-users] hanging problem with switch_scheduler_add Reply with quote

Hi Mathieu,

Thanks for your help.

How can I intentionally crash a hanging freeswitch and obtain the core file to run gdb?

Thanks,
Mark

On Fri, Aug 21, 2009 at 11:59 PM, Mathieu Rene <mrene_lists@avgs.ca (mrene_lists@avgs.ca)> wrote:
Quote:
Means another task is hanging, do a "thread apply all bt" in gdb and
look for scheduler tasks.

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene@avgs.ca (mrene@avgs.ca)





On 21-Aug-09, at 11:41 AM, mark morreny wrote:

Quote:
Hi,

I am experiencing some hanging when fs is executing
switch_scheduler_add_task.

switch_scheduler_add_task(switch_epoch_time_now(NULL) ,
data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|
SSHF_NO_DEL);

I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION
and sometimes, hanging occurs on that particular line.  My
data_flush_callback is as follows.  I debug the module and it does
not even enter data_flush_callback.  It is hanging at
switch_scheduler_add_task().

SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {

    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"starting to flush cdr record...\n");

    int last_sequence = flush_data_to_csv();
    if (last_sequence > -1 ) {

        update_last_seq(last_sequence);
    }
    task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;

}

Does anyone know why?

Thanks,
Mark



Quote:
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
rupa at rupa.com
Guest





PostPosted: Fri Aug 21, 2009 12:23 pm    Post subject: [Freeswitch-users] hanging problem with switch_scheduler_add Reply with quote

Use gcore to get a core dump. It will pause the process for the
duration of the dump, but will not kill the process.

On Fri, Aug 21, 2009 at 11:24 AM, mark morreny<markmorreny@gmail.com> wrote:
Quote:
Hi Mathieu,

Thanks for your help.

How can I intentionally crash a hanging freeswitch and obtain the core file
to run gdb?

Thanks,
Mark

On Fri, Aug 21, 2009 at 11:59 PM, Mathieu Rene <mrene_lists@avgs.ca> wrote:
Quote:

Means another task is hanging, do a "thread apply all bt" in gdb and
look for scheduler tasks.

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene@avgs.ca




On 21-Aug-09, at 11:41 AM, mark morreny wrote:

Quote:
Hi,

I am experiencing some hanging when fs is executing
switch_scheduler_add_task.

switch_scheduler_add_task(switch_epoch_time_now(NULL) ,
data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|
SSHF_NO_DEL);

I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION
and sometimes, hanging occurs on that particular line.  My
data_flush_callback is as follows.  I debug the module and it does
not even enter data_flush_callback.  It is hanging at
switch_scheduler_add_task().

SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {

    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"starting to flush cdr record...\n");

    int last_sequence = flush_data_to_csv();
    if (last_sequence > -1 ) {

        update_last_seq(last_sequence);
    }
    task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;

}

Does anyone know why?

Thanks,
Mark

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--
-Rupa

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
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, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services