[Home]

Summary:ASTERISK-30237: res_prometheus: Crash when scraping bridges
Reporter:Igor Yeroshev (Igor_Ye)Labels:
Date Opened:2022-09-19 03:55:51Date Closed:2022-09-27 06:15:58
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/General Resources/res_ari_channels
Versions:18.11.3 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-30239 Prometheus plugin crashes Asterisk when using local channel
Environment:Attachments:( 0) core-asterisk-2022-09-13T08-07-08Z-brief.txt
( 1) core-asterisk-2022-09-13T08-07-08Z-full.txt
( 2) core-asterisk-2022-09-13T08-07-08Z-info.txt
( 3) core-asterisk-2022-09-13T08-07-08Z-locks.txt
( 4) core-asterisk-2022-09-13T08-07-08Z-thread1.txt
Description:I was running Asterisk 18.11.3 on RHEL 8.
And noticed that asterisk crashed during Dialing call from ARI in moment when request from prometheus received.
How it can be reprodused

1. Send request to create channel through ARI
2. Send Dial request to this channel through ARI
3. Send request from prometheus to http://asterisk:8088/metrics or simply from browser.
And asterisk immediatly crashes
dmesg -T show this message
[Tue Sep 13 12:36:05 2022] asterisk[13513]: segfault at 8 ip 00007efbc5581cd7 sp 00007efbc0696140 error 4 in res_prometheus.so[7efbc557b000+d000]

Can you help solve the problem? Maybe it’s some kind of bug in this version? I couldn’t find information about it.
Comments:By: Asterisk Team (asteriskteam) 2022-09-19 03:55:57.159-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-09-19 04:05:00.891-0500

The module you're having difficulty with is in 'extended' support status and is supported only by community members.  Your issue is in the queue. Your patience is appreciated as a community developer may work the issue when time and resources become available.

Asterisk is an open source project and community members work the issues on a voluntary basis. You are welcome to develop your own patches and submit them to the project.[1]

If you are not a programmer and you are in a hurry to see a patch provided then you might try rallying support on the Asterisk users mailing list or forums.[2] Another alternative is offering a bug bounty on the asterisk-dev mailing list.[3] Often a little incentive can go a long way.

[1]: https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process
[2]: http://www.asterisk.org/community/discuss
[3]: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Bug+Bounties



By: Friendly Automation (friendly-automation) 2022-09-27 06:16:00.773-0500

Change 19368 merged by Friendly Automation:
res_prometheus: Do not crash on invisible bridges

[https://gerrit.asterisk.org/c/asterisk/+/19368|https://gerrit.asterisk.org/c/asterisk/+/19368]

By: Friendly Automation (friendly-automation) 2022-09-27 06:16:10.885-0500

Change 19369 merged by Friendly Automation:
res_prometheus: Do not crash on invisible bridges

[https://gerrit.asterisk.org/c/asterisk/+/19369|https://gerrit.asterisk.org/c/asterisk/+/19369]

By: Friendly Automation (friendly-automation) 2022-09-27 06:16:31.229-0500

Change 19306 merged by Friendly Automation:
res_prometheus: Do not crash on invisible bridges

[https://gerrit.asterisk.org/c/asterisk/+/19306|https://gerrit.asterisk.org/c/asterisk/+/19306]

By: Friendly Automation (friendly-automation) 2022-09-27 06:19:30.933-0500

Change 19367 merged by Joshua Colp:
res_prometheus: Do not crash on invisible bridges

[https://gerrit.asterisk.org/c/asterisk/+/19367|https://gerrit.asterisk.org/c/asterisk/+/19367]