[Home]

Summary:ASTERISK-29822: cli: Typing \? freezes the CLI permanently with remote console
Reporter:N A (InterLinked)Labels:
Date Opened:2021-12-27 08:44:19.000-0600Date Closed:2022-06-30 17:33:35
Priority:MinorRegression?
Status:Closed/CompleteComponents:General
Versions:18.9.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Typing backslash followed by ? completely freezes the CLI. It only seems to be that particular key combination.
I realize the ? is a special key, but there seems to be some buggy behavior here. Kind of a major issue, but the likliehood of someone accidentally typing "\?" is probably small, so marking this 'minor'.

This occurs whether it is at the beginning of a command or anywhere afterwards.

CTRL+C is unsuccessful at exiting the CLI. The cli no longer responds to any keyboard input - backspace, alphanumeric keys, etc.

Only way to exit is CTRL+\ which sends a SIGQUIT to force the process to quit. The average user probably won't know to do this.

Assuming this isn't supposed to happen, looks like it's happening in the fd polling, so not sure if anything can be done about it, but here it is anyways:
https://github.com/asterisk/asterisk/blob/f38277524148e352b85810dda1c999bdde34e3cb/main/asterisk.c#L1410

EDIT: Only occurs with remote console (e.g., {{asterisk -r}})
Comments:By: Asterisk Team (asteriskteam) 2021-12-27 08:44:19.514-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: Benjamin Keith Ford (bford) 2021-12-28 11:42:21.386-0600

I'm unable to reproduce this on latest 18. Is this a clean install of Asterisk?

By: N A (InterLinked) 2021-12-28 12:25:22.871-0600

Yes, reproduces for me on 3 different systems, including with the latest 18.9.0, no modifications.
I wonder if it's some weird OS interaction with the polling API call... these are all on Debian 9, 10 or 11.

By: Friendly Automation (friendly-automation) 2022-06-30 17:33:36.672-0500

Change 18708 merged by Friendly Automation:
cli: Fix CLI blocking forever on terminating backslash

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

By: Friendly Automation (friendly-automation) 2022-06-30 18:28:54.763-0500

Change 18709 merged by Friendly Automation:
cli: Fix CLI blocking forever on terminating backslash

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

By: Friendly Automation (friendly-automation) 2022-07-01 10:14:41.293-0500

Change 18004 merged by Kevin Harwell:
cli: Fix CLI blocking forever on terminating backslash

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

By: Friendly Automation (friendly-automation) 2022-07-01 10:15:00.085-0500

Change 18707 merged by Kevin Harwell:
cli: Fix CLI blocking forever on terminating backslash

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