[Asterisk-Dev] -DO_CRASH

Steve Kann stevek at stevek.com
Wed May 25 17:17:12 MST 2005


Matthew Boehm wrote:

>OK. So Asterisk has been crashed alot in the past 10 min. Like 5 or 6 times.
>Can't figure out wtf is going on.
>
>I keep seeing this right before crash:
>
>May 25 17:31:37 NOTICE[10570]: sched.c:290 ast_sched_del: Attempted to
>delete nonexistent schedule entry 22!
>
>So I look at line 290, and it turns out that if I have -DDO_CRASH enabled,
>asterisk will crash when it reaches that error.
>
>My question is why; why is that option there? Obviously the core programmers
>would not have put that "optional crash" in there if it wasn't important to
>know when an attempt to delete a nonexistent schedule entry occurs.
>
>  
>
Because if you cause it to crash, you can get a core dump telling you 
exactly what was trying to do that.

It's basically the same behavior as assert()..

I wouldn't think that trying to delete a non-existent scheduler entry 
should be a fatal error on a production box though :)


-SteveK




More information about the asterisk-dev mailing list