[Home]

Summary:ASTERISK-26753: AMI disconnect causes "ast_careful_fwrite: fwrite() returned error: Broken pipe"
Reporter:Kirill Katsnelson (kkm)Labels:
Date Opened:2017-01-25 21:19:54.000-0600Date Closed:2017-01-30 11:53:00.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:13.13.1 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:$ uname -a Linux qa1-asterisk1 3.13.0-100-generic #147-Ubuntu SMP Tue Oct 18 16:48:51 UTC 2016 x86_64 x86_64 x86_64 GNU/LinuxAttachments:
Description:When a manager sends a Logoff command and immediately disconnects without waiting, the following error is sometimes logged (but not always).

ERROR: utils.c: ast_careful_fwrite: fwrite() returned error: Broken pipe

The error reproduces reliably by calling shutdown(.., SHUT_RD) on the manager's end of the socket before sending a command.

I have a local fix, sending a patch.
Comments:By: Asterisk Team (asteriskteam) 2017-01-25 21:19:55.132-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.

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].

By: Rusty Newton (rnewton) 2017-01-27 11:28:55.354-0600

Thanks for the work and patch!

By: Kirill Katsnelson (kkm) 2017-01-27 15:51:47.540-0600

> Thanks for the work and patch!

I cannot frankly think how we would have our business started and going if Asterisk did not exist. I should thank _you_ folk, and when I can give back even a little, it's really a pleasure!

By: Friendly Automation (friendly-automation) 2017-01-30 11:53:03.343-0600

Change 4824 merged by Joshua Colp:
ast_careful_fwrite to support EPIPE gracefully

[https://gerrit.asterisk.org/4824|https://gerrit.asterisk.org/4824]

By: Friendly Automation (friendly-automation) 2017-01-30 12:51:00.263-0600

Change 4827 merged by Joshua Colp:
ast_careful_fwrite to support EPIPE gracefully

[https://gerrit.asterisk.org/4827|https://gerrit.asterisk.org/4827]