[Home]

Summary:ASTERISK-23418: ast_read() on chan '...' called with no recorded file descriptor.
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2014-03-05 09:28:34.000-0600Date Closed:2020-09-30 14:26:30
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/General
Versions:SVN 1.8.26.0 13.18.4 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-20443 ast_read() on chan '...' called with no recorded file descriptor
Environment:Attachments:
Description:Error:
{noformat}
#ifdef AST_DEVMODE
               /*
                * The ast_waitfor() code records which of the channel's file
                * descriptors reported that data is available.  In theory,
                * ast_read() should only be called after ast_waitfor() reports
                * that a channel has data available for reading.  However,
                * there still may be some edge cases throughout the code where
                * ast_read() is called improperly.  This can potentially cause
                * problems, so if this is a developer build, make a lot of
                * noise if this happens so that it can be addressed.
                *
                * One of the potential problems is blocking on a dead channel.
                */
               if (chan->fdno == -1) {
                       ast_log(LOG_ERROR,
                               "ast_read() on chan '%s' called with no recorded file descriptor.\n",
                               chan->name);
               }
#endif
{noformat}

Dialplan:
{noformat}
[default]
exten => channel_read,1,NoOp
same => n,Dial(Local/channel_read_2@default)
exten => channel_read_2,1,NoOp
same => n,Hangup()
{noformat}

Execute:
{noformat}
*CLI> core show version
Asterisk SVN-branch-1.8-r409436 built by walter @ walter-desktop on a x86_64 running Linux on 2014-02-20 13:40:09 UTC

*CLI> channel originate Local/channel_read@default application Wait 1
{noformat}

Output:
{noformat}
   -- Executing [channel_read@default:1] NoOp("Local/channel_read@default-00000000;2", "") in new stack
   -- Executing [channel_read@default:2] Dial("Local/channel_read@default-00000000;2", "Local/channel_read_2@default") in new stack
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
   -- Called Local/channel_read_2@default
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
   -- Executing [channel_read_2@default:1] NoOp("Local/channel_read_2@default-00000001;2", "") in new stack
   -- Executing [channel_read_2@default:2] Hangup("Local/channel_read_2@default-00000001;2", "") in new stack
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
 == Spawn extension (default, channel_read_2, 2) exited non-zero on 'Local/channel_read_2@default-00000001;2'
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
   -- No one is available to answer at this time (1:0/0/0)
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
   -- Auto fallthrough, channel 'Local/channel_read@default-00000000;2' status is 'NOANSWER'
[Mar  5 16:23:35] ERROR[20861]: channel.c:3870 __ast_read: ast_read() on chan 'Local/channel_read@default-00000000;1' called with no recorded file descriptor.
{noformat}
Comments:By: Sean Bright (seanbright) 2020-09-30 12:35:14.897-0500

I'm not able to reproduce with Asterisk 13 GIT. Is this still an issue?

By: Walter Doekes (wdoekes) 2020-09-30 14:25:37.262-0500

If you're not  able to reproduce, then I guess not :)

Feel free to close +1

By: Walter Doekes (wdoekes) 2020-09-30 14:26:31.013-0500

Let me just close it. Appears fixed according to Sean.