Summary: | ASTERISK-17444: callfiles stops after sometime | ||
Reporter: | waltermoeller (waltermoeller) | Labels: | |
Date Opened: | 2011-02-21 01:30:44.000-0600 | Date Closed: | 2018-01-02 08:44:25.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | PBX/pbx_spool |
Versions: | 1.8.2 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | callfiles in spooldir ( handmade or automatic generated )
the files are executed, all looks fine. After an houre, some hours, or some mins spooler stops after shutdown and restart the files are executed sip reload or or core reload dont help. Version: 1.8.0 , 1.8.1.1, 1.8.-r1-r3 also svn build testet, always same Version 1.6 ok ! error Message in bug tracking is: {noformat} [Feb 21 02:00:50] ERROR[19246] pbx_spool.c: Unexpected event 8192 for file '#' [Feb 21 02:00:50] ERROR[19246] pbx_spool.c: Unexpected event 32768 for file '950-21022011014551.call' {noformat} *ADDITIONAL INFORMATION* here are used sip and iax channels. OS: Linux Gentoo 64 Bit / i920 / 24GB ram, dedicated for Telefon and Routing have trace error , problem is in pbx_spool file / scan_thread errors are listet before / there is no file and var has old filename or crtl A, me have used undef have_inotify , then it is ok ! bug must be here. {noformat} #ifdef HAVE_INOTIFY int stage = 0; /* Convert from seconds to milliseconds, unless there's nothing in the queue already, in which case, we wait forever. */ int waittime = next == INT_MAX ? -1 : (next - now) * 1000; /* When a file arrives, add it to the queue, in mtime order. */ if ((res = poll(&pfd, 1, waittime)) > 0 && (stage = 1) && (res = read(inotify_fd, &buf, sizeof(buf))) >= sizeof(*iev)) { ssize_t len = 0; /* File(s) added to directory, add them to my list */ for (iev = (void *) buf; res >= sizeof(*iev); iev = (struct inotify_event *) (((char *) iev) + len)) { if (iev->mask & IN_CREATE) { queue_file_create(iev->name); } else if (iev->mask & IN_CLOSE_WRITE) { queue_file_write(iev->name); } else if (iev->mask & IN_MOVED_TO) { queue_file(iev->name, 0); } else { ast_log(LOG_ERROR, "Unexpected event %d for file '%s'\n", (int) iev->mask, iev->name); } len = sizeof(*iev) + iev->len; res -= len; } } else if (res < 0 && errno != EINTR && errno != EAGAIN) { ast_debug(1, "Got an error back from %s(2): %s\n", stage ? "read" : "poll", strerror(errno)); } #else {noformat} | ||
Comments: | By: Leif Madsen (lmadsen) 2011-02-22 11:13:09.000-0600 This is sounding a bit like a deadlock to me. Please provide a 'core show locks' and a backtrace from the running process per the documentation at https://wiki.asterisk.org/wiki/display/AST/Debugging By: waltermoeller (waltermoeller) 2011-02-22 17:11:19.000-0600 hi, have trace error , problem is in pbx_spool file / scan_thread errors are listet before / there is no file and var has old filename or crtl A, me have used undef have_inotify , then it is ok ! bug must be here. #ifdef HAVE_INOTIFY int stage = 0; /* Convert from seconds to milliseconds, unless there's nothing * in the queue already, in which case, we wait forever. */ int waittime = next == INT_MAX ? -1 : (next - now) * 1000; /* When a file arrives, add it to the queue, in mtime order. */ if ((res = poll(&pfd, 1, waittime)) > 0 && (stage = 1) && (res = read(inotify_fd, &buf, sizeof(buf))) >= sizeof(*iev)) { ssize_t len = 0; /* File(s) added to directory, add them to my list */ for (iev = (void *) buf; res >= sizeof(*iev); iev = (struct inotify_event *) (((char *) iev) + len)) { if (iev->mask & IN_CREATE) { queue_file_create(iev->name); } else if (iev->mask & IN_CLOSE_WRITE) { queue_file_write(iev->name); } else if (iev->mask & IN_MOVED_TO) { queue_file(iev->name, 0); } else { ast_log(LOG_ERROR, "Unexpected event %d for file '%s'\n", (int) iev->mask, iev->name); } len = sizeof(*iev) + iev->len; res -= len; } } else if (res < 0 && errno != EINTR && errno != EAGAIN) { ast_debug(1, "Got an error back from %s(2): %s\n", stage ? "read" : "poll", strerror(errno)); } #else By: Leif Madsen (lmadsen) 2011-04-14 09:47:52 The output for 'core show locks' would still be useful here. By: Joshua C. Colp (jcolp) 2017-12-19 07:06:43.761-0600 Are you still experiencing this problem in recent supported versions of Asterisk? By: Asterisk Team (asteriskteam) 2018-01-02 08:44:25.266-0600 Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1]. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines |