[Home]

Summary:ASTERISK-30420: res_speech_aeap: Crash due to NULL format on setup
Reporter:Peter Howell (wpeterhowell)Labels:
Date Opened:2023-02-08 21:01:37.000-0600Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Resources/NewFeature
Versions:18.14.0 18.16.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:CentOS 7Attachments:( 0) core-asterisk-2023-02-08T05-54-45Z-brief.txt
( 1) core-asterisk-2023-02-08T05-54-45Z-full.txt
( 2) core-asterisk-2023-02-08T05-54-45Z-info.txt
( 3) core-asterisk-2023-02-08T05-54-45Z-locks.txt
( 4) core-asterisk-2023-02-08T05-54-45Z-thread1.txt
Description:This occurs randomly but fairly consistently -- 1 out of 20 times maybe.

We receive from Asterisk:
{"request":"setup","version":"0.1.0","codecs":[{"name":"ulaw"}],"params":{},"id":"211233a3-48de-4758-b46c-90b3701a3d06"}

We reply successfully with:
{"response":"setup","id":"211233a3-48de-4758-b46c-90b3701a3d06","codecs":[{"name":"ulaw"}]}

Asterisk shows the following, and then SEGFAULTs:
ERROR[19158] res_aeap/transaction.c: AEAP transaction (0x7f5f0800f8d0): message 'setup' timed out
VERBOSE[8438][C-0000003b] pbx.c: Executing [17195559990@dial-out:7] SpeechStart("IAX2/hwl-pbx-5767", "") in new stack
VERBOSE[8438][C-0000003b] pbx.c: Spawn extension (dial-out, 17195559990, 7) exited non-zero on 'IAX2/hwl-pbx-5767'
VERBOSE[8438][C-0000003b] chan_iax2.c: Hungup 'IAX2/hwl-pbx-5767'
Comments:By: Asterisk Team (asteriskteam) 2023-02-08 21:01:42.489-0600

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: Peter Howell (wpeterhowell) 2023-02-08 21:04:20.498-0600

This was a core dump from an Amazon Linux aarch64 system, but it also occurs on CentOS 7 x86_64 as well.

By: Joshua C. Colp (jcolp) 2023-02-09 03:44:54.299-0600

How long is your response taking? According to the snippet of log you've posted the setup message timed out, so this seems to be an off-nominal crash scenario when that occurs. Why it is happening in the first place would also need to be investigated.

By: Peter Howell (wpeterhowell) 2023-02-09 07:05:15.307-0600

2023-02-08T10:33:03.556682-07:00 v004 tcx-sayit[8255]: handle_asterisk_message: ASTERISK: REC> {"request":"setup","version":"0.1.0","codecs":[{"name":"ulaw"}],"params":{},"id":"250f2e54-468f-480c-a474-090c9e9111df"}
2023-02-08T10:33:03.556934-07:00 v004 tcx-sayit[8255]: handle_asterisk_message: ASTERISK: SND> {"response":"setup","id":"250f2e54-468f-480c-a474-090c9e9111df","codecs":[{"name":"ulaw"}]}

In this example, the response was sent 252us after receiving the setup message -- no error on sending the reply on the websocket.  However, what I'm now seeing is that this timeout message must have been related to a prior connection, because of this:

[2023-02-08 10:32:59.785] ERROR[30265] res_aeap/transaction.c: AEAP transaction (0x7fe8c8010fc0): message 'setup' timed out
[2023-02-08 10:32:59.785] VERBOSE[8438][C-0000003b] pbx.c: Executing [17195559990@dial-out:7] SpeechStart("IAX2/hwl-pbx-5767", "") in new stack
[2023-02-08 10:32:59.786] VERBOSE[8438][C-0000003b] pbx.c: Spawn extension (dial-out, 17195559990, 7) exited non-zero on 'IAX2/hwl-pbx-5767'
[2023-02-08 10:32:59.786] VERBOSE[8438][C-0000003b] chan_iax2.c: Hungup 'IAX2/hwl-pbx-5767'
[2023-02-08 10:33:05.394] Asterisk 18.14.0 built by root @ v003.nanp.teleconnx.com on a x86_64 running Linux on 2022-10-25 17:46:00 UTC

There were no messages coming from Asterisk at 10:33:03; only the restart at 10:33:05.