[asterisk-bugs] [JIRA] (ASTERISK-29130) Prometheus Segmentation Fault

Francisco Correia (JIRA) noreply at issues.asterisk.org
Fri Oct 16 09:11:36 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252468#comment-252468 ] 

Francisco Correia edited comment on ASTERISK-29130 at 10/16/20 9:09 AM:
------------------------------------------------------------------------

Steps to Reproduce
 - Prometheus resource enabled and configured no 8088/metrics, and a prometheus server is scraping metrics with a 30 seconds interval

1) Call enters a Stasis application
2) Stasis application starts playing music on hold on the caller channel
3) Stasis application dials one of the dummy extensions with a 10 second timeout
4) Repeats dial until some extension answer
Asterisk crashes,
   I think the crash is a consequence of prometheus server invoking the metrics endpoint on asterisk while a call is active

{noformat}
; Dialplan for the dummy callee 
exten => 9980,1,NoOp(Calling Tiburcio Saidi)
 same =>      n,Set(LOCAL_AGENT_ANSWER_PROBABILITY=80)
 same =>      n,Set(LOCAL_AGENT_NAME=Tiburcio Saidi)
 same =>      n,Goto(local-agent-diaplan,s,1)



; Dummy Agent Dial Plan
[local-agent-diaplan]
exten => s,1,NoOp()
 same =>      n,DumpChan()
 same =>      n,Ringing()
 same =>      n,GotoIf($[${RAND(1,100)} < ${LOCAL_AGENT_ANSWER_PROBABILITY}]?answer:ignore)
 same =>      n(answer),NoOp(${LOCAL_AGENT_NAME} will take the call in a moment)
 same =>      n,Wait(${RAND(10,25)})
 same =>      n,Answer()
 same =>      n,Set(TIMEOUT(absolute)=${RAND(60,350)})
 same =>      n(playloop),Playback(tt-monkeys)
 same =>      n,Goto(playloop)
 same =>      n(ignore),NoOp(${LOCAL_AGENT_NAME} is busy doing something else, who knows what)
 same =>      n,Wait(${RAND(10,60)})
 same =>      n,Hangup()
{noformat}



was (Author: fcorreia):
Steps to Reproduce

1) Call enters a Stasis application
2) Stasis application starts playing music on hold on the caller channel
3) Stasis application dials one of the dummy extensions with a 10 second timeout
4) Repeats dial until some extension answer
Asterisk crashes

{noformat}
; Dialplan for the dummy callee 
exten => 9980,1,NoOp(Calling Tiburcio Saidi)
 same =>      n,Set(LOCAL_AGENT_ANSWER_PROBABILITY=80)
 same =>      n,Set(LOCAL_AGENT_NAME=Tiburcio Saidi)
 same =>      n,Goto(local-agent-diaplan,s,1)



; Dummy Agent Dial Plan
[local-agent-diaplan]
exten => s,1,NoOp()
 same =>      n,DumpChan()
 same =>      n,Ringing()
 same =>      n,GotoIf($[${RAND(1,100)} < ${LOCAL_AGENT_ANSWER_PROBABILITY}]?answer:ignore)
 same =>      n(answer),NoOp(${LOCAL_AGENT_NAME} will take the call in a moment)
 same =>      n,Wait(${RAND(10,25)})
 same =>      n,Answer()
 same =>      n,Set(TIMEOUT(absolute)=${RAND(60,350)})
 same =>      n(playloop),Playback(tt-monkeys)
 same =>      n,Goto(playloop)
 same =>      n(ignore),NoOp(${LOCAL_AGENT_NAME} is busy doing something else, who knows what)
 same =>      n,Wait(${RAND(10,60)})
 same =>      n,Hangup()
{noformat}


> Prometheus Segmentation Fault
> -----------------------------
>
>                 Key: ASTERISK-29130
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29130
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/General
>    Affects Versions: 18.0.0
>         Environment: OS: CentOS 7
> Version: asterisk-18.0.0-rc2.tar.gz
>            Reporter: Francisco Correia
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: core.1383-brief.txt, core.1383-full.txt, core.1383-info.txt, core.1383-locks.txt, core.1383-thread1.txt
>
>
> Prometheus Resource while building metrics response creates segmentation fault during active call on a Stasis Application.
> {noformat}
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Core was generated by `/usr/sbin/asterisk -f -g -C /etc/asterisk/asterisk.conf'.
> Program terminated with signal 11, Segmentation fault.
> #0  bridges_scrape_cb (response=0x7f337c0ccc78) at prometheus/bridges.c:129
> 129				PROMETHEUS_METRIC_SET_LABEL(&bridge_metrics[index], 1, "id", (snapshot->uniqueid));
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list