Summary: | ASTERISK-13511: [patch] ami fails on high load | ||
Reporter: | Marcus Hunger (fnordian) | Labels: | |
Date Opened: | 2009-02-04 06:53:27.000-0600 | Date Closed: | 2009-02-04 12:55:33.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) tcptls.patch | |
Description: | hi, the asterisk manager interface stops working and closes the session on high load (on the interface). i traced the issue down to a strange behavior of fwrite: although ast_wait_for_output (poll) says write would be possible, the fwrite just returns 0 and errno is set to ESPIPE. the tcp-connection is still established on both sides. i was able to fix the issue by disabling output-buffering for the file-handle using setvbuf, although i do not understand the issue completly. it would be great if someone could look into this. | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-02-04 08:26:19.000-0600 I'd be fine with this patch, actually. By: Digium Subversion (svnbot) 2009-02-04 12:48:33.000-0600 Repository: asterisk Revision: 173458 U trunk/main/tcptls.c ------------------------------------------------------------------------ r173458 | tilghman | 2009-02-04 12:48:32 -0600 (Wed, 04 Feb 2009) | 9 lines When using a socket as a FILE *, the stdio functions will sometimes try to do an fseek() on the stream, which is an invalid operation for a socket. Turning off buffering explicitly lets the stdio functions know they cannot do this, thus avoiding a potential error. (closes issue ASTERISK-13511) Reported by: fnordian Patches: tcptls.patch uploaded by fnordian (license 110) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=173458 By: Digium Subversion (svnbot) 2009-02-04 12:52:28.000-0600 Repository: asterisk Revision: 173459 _U branches/1.6.1/ U branches/1.6.1/main/tcptls.c ------------------------------------------------------------------------ r173459 | tilghman | 2009-02-04 12:52:28 -0600 (Wed, 04 Feb 2009) | 16 lines Merged revisions 173458 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r173458 | tilghman | 2009-02-04 12:48:06 -0600 (Wed, 04 Feb 2009) | 9 lines When using a socket as a FILE *, the stdio functions will sometimes try to do an fseek() on the stream, which is an invalid operation for a socket. Turning off buffering explicitly lets the stdio functions know they cannot do this, thus avoiding a potential error. (closes issue ASTERISK-13511) Reported by: fnordian Patches: tcptls.patch uploaded by fnordian (license 110) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=173459 By: Digium Subversion (svnbot) 2009-02-04 12:55:32.000-0600 Repository: asterisk Revision: 173460 _U branches/1.6.0/ U branches/1.6.0/main/tcptls.c ------------------------------------------------------------------------ r173460 | tilghman | 2009-02-04 12:55:32 -0600 (Wed, 04 Feb 2009) | 16 lines Merged revisions 173458 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r173458 | tilghman | 2009-02-04 12:48:06 -0600 (Wed, 04 Feb 2009) | 9 lines When using a socket as a FILE *, the stdio functions will sometimes try to do an fseek() on the stream, which is an invalid operation for a socket. Turning off buffering explicitly lets the stdio functions know they cannot do this, thus avoiding a potential error. (closes issue ASTERISK-13511) Reported by: fnordian Patches: tcptls.patch uploaded by fnordian (license 110) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=173460 |