Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chan_dahdi: Don't retry opening nonexistent channels on restart.#670

Merged
asterisk-org-access-app[bot] merged 1 commit into
asterisk:masterfrom
InterLinked1:master-issue-669
Mar 27, 2024
Merged

chan_dahdi: Don't retry opening nonexistent channels on restart.#670
asterisk-org-access-app[bot] merged 1 commit into
asterisk:masterfrom
InterLinked1:master-issue-669

Conversation

@InterLinked1

Copy link
Copy Markdown
Contributor

Commit 729cb1d added logic to retry opening DAHDI channels on "dahdi restart" if they failed initially, up to 1,000 times in a loop, to address cases where the channel was still in use. However, this retry loop does not use the actual error, which means chan_dahdi will also retry opening nonexistent channels 1,000 times per channel, causing a flood of unnecessary warning logs for an operation that will never succeed, with tens or hundreds of thousands of open attempts being made.

The original patch would have been more targeted if it only retried on the specific relevant error (likely EBUSY, although it's hard to say since the original issue is no longer available).

To avoid the problem above while avoiding the possibility of breakage, this skips the retry logic if the error is ENXIO (No such device or address), since this will never succeed.

Resolves: #669

Commit 729cb1d added logic to retry
opening DAHDI channels on "dahdi restart" if they failed initially,
up to 1,000 times in a loop, to address cases where the channel was
still in use. However, this retry loop does not use the actual error,
which means chan_dahdi will also retry opening nonexistent channels
1,000 times per channel, causing a flood of unnecessary warning logs
for an operation that will never succeed, with tens or hundreds of
thousands of open attempts being made.

The original patch would have been more targeted if it only retried
on the specific relevant error (likely EBUSY, although it's hard to
say since the original issue is no longer available).

To avoid the problem above while avoiding the possibility of breakage,
this skips the retry logic if the error is ENXIO (No such device or
address), since this will never succeed.

Resolves: asterisk#669
@github-actions

Copy link
Copy Markdown

REMINDER: If this PR applies to other branches, please add a comment with the appropriate "cherry-pick-to" headers as per the Create a Pull Request process.

If you don't want it cherry-picked, please add a comment with cherry-pick-to: none so we don't keep asking.

If, after adding "cherry-pick-to" comments, you change your mind, please edit the comment to DELETE the header lines and add cherry-pick-to: none.

The currently active branches are now 18, 20, 21 and master.

@asteriskteam asteriskteam requested a review from a team March 26, 2024 13:01
@InterLinked1

Copy link
Copy Markdown
Contributor Author

cherry-pick-to: 18
cherry-pick-to: 20
cherry-pick-to: 21

@gtjoseph gtjoseph added the cherry-pick-test Trigger dry run of cherry-picks label Mar 27, 2024
@github-actions github-actions Bot added cherry-pick-testing-in-progress Cherry-Pick tests in progress and removed cherry-pick-test Trigger dry run of cherry-picks labels Mar 27, 2024
@github-actions

Copy link
Copy Markdown

Successfully merged to branch master and cherry-picked to ["18","20","21"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: chan_dahdi: Tens or hundreds of thousands of channel opens attempted during restart

3 participants