start it with asterisk -vvvgc bkw ----- Original Message ----- From: "Arjan" <arjan@inventionz.org> To: <asterisk-users@lists.digium.com> Sent: Sunday, July 11, 2004 12:27 PM Subject: [Asterisk-Users] Asterisk on FreeBSD 4.10 dies> Hi All, > > I'm pretty green to Asterisk. I'm trying to work towards a basic setup > with a couple of Cisco 7960's (SIP image), nothing more nothing less. > > But somehow my Asterisk server keeps crashing somehow. I'll launch it with > the -c option and at a certain point the console shows "Killed", no > debugging and/or faultoutput/crashinfo whatsoever. This happens at random > intervals, even with the server idle and the phones doing nothing. > > Any hints/tips on debugging this? > > arjan > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
> -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Arjan > Hi Brian, > > On Sun, 11 Jul 2004 at 12:38 -0500, Brian K. West wrote: > > > start it with asterisk -vvvgc > > Been there, done that. Nothing, no coredump. A lot of verbose > output while starting and then the server sits idle (after > having one 7960 registered to it) and after a while it > crashed. Weird part here is that "Killed" on the console > makes me think it was actually sent a -9 by some-thing/one > instead of it actually crashing with a segmentation fault or > something. > > <one short moment of brightness> > > Jul 11 20:17:27 shell /kernel: pid 43603 (asterisk), uid 0, > was killed: > exceeded maximum CPU limit > > 43676 root 63 0 10244K 7628K RUN 2:44 99.05% 99.02% > asterisk > > Any thoughts on this?You might check login class in login.conf for the user that invokes asterisk. Setting cputime=unlimited may help. Rich
> -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Arjan > > On Sun, 11 Jul 2004 at 15:39 -0500, Dr. Rich Murphey wrote: > > > You might check login class in login.conf for the user that invokes > > asterisk. Setting cputime=unlimited may help. > > This will prevent the kernel from killing the process but I'm > puzzled by the load Asterisk generates on a AMD XP+ 2000 cpu. > While running the box goes to 40%, even though Asterisk is > doing nothing (well at least: not handling calls, etc).That sounds like a bug. One should be able to attach to the process in gdb, stop the process and see where it's looping. Rich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello On 12/07/2004, at 4:24 AM, Arjan wrote:> 43676 root 63 0 10244K 7628K RUN 2:44 99.05% 99.02% > asterisk >This is covered in the asterisk FreeBSD section: http://www.voip-info.org/tiki-index.php?page=Asterisk+FreeBSD extract: "CPU 99.9 % used by Asterisk? The current version runs amok on a FreeBSD system, occuping all your CPU cycles. To get Asterisk back to a normal level, you have to disable the problemativ module in Asterisk config modules.conf with this statement: noload => pbx_wilcalu.so " In any case, I gave up using Asterisk with FreeBSD too many issues that couldn't be explained. Switching to linux fixed all the issues with the exact same configuration file Jean-Yves - --- Jean-Yves Avenard Hydrix Pty Ltd - Embedding the net www.hydrix.com | fax +61 3 95093717 | phone +61 3 9509 3724 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFA8cVmXeDVKqIr3GURAiDBAJ4yLySDKD8NoozveF8eIHD+jRWtuACeIf1M DyckWYJeN9rpjbfvxGZzQMk=O3eG -----END PGP SIGNATURE-----
Differences in how poll() works is probably responsible. Try this and see if it helps. Cheers, Rich> -----Original Message----- > [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Arjan > > On Sun, 11 Jul 2004 at 16:03 -0500, Dr. Rich Murphey wrote: > > > That sounds like a bug. One should be able to attach to > the process > > in gdb, stop the process and see where it's looping. > > I'm going to pretend here and now that I'm a hardcore > debugger (with a little help of my local debug-guru haha): > > --- ktrace output coming up - > 44392 asterisk RET read 0 > 44392 asterisk CALL poll(0xbfa76fb4,0x1,0) > 44392 asterisk RET poll 1 > 44392 asterisk CALL read(0x12,0x284fd0a0,0x100) > 44392 asterisk GIO fd 18 read 0 bytes > > root asterisk 44392 18 /var 22833 prwx------ 0 r > --- > root@shell$ find /var -inum 22833 > /var/run/autodial.ctl > > A backtrace in gdb comes up with: > > #0 0x28142d64 in __sys_read () from /usr/lib/libc_r.so.4 > #1 0x2813f1a0 in _read () from /usr/lib/libc_r.so.4 > #2 0x2813f1fa in read () from /usr/lib/libc_r.so.4 > #3 0x284fafaf in autodial (ignore=0x0) at pbx_wilcalu.c:83 > #4 0x28105240 in _thread_start () from /usr/lib/libc_r.so.4 > #5 0x0 in ?? () > > Does this make any sense ? > > arjan > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > >-------------- next part -------------- Index: pbx_wilcalu.c ==================================================================RCS file: /usr/cvsroot/asterisk/pbx/pbx_wilcalu.c,v retrieving revision 1.14 diff -u -r1.14 pbx_wilcalu.c --- pbx_wilcalu.c 22 Jun 2004 18:49:00 -0000 1.14 +++ pbx_wilcalu.c 12 Jul 2004 13:09:24 -0000 @@ -74,11 +74,18 @@ while(1){ ssize_t bytes; void *pass; + int ret = 0; memset(buf,0,257); fds[0].fd = fd; fds[0].events = POLLIN; - poll(fds, 1, -1); + ret = poll(fds, 1, -1); + if ((ret < 0) && + ( (fds[0].revents == POLLHUP) || + (fds[0].revents == POLLHUP))) { + ast_log(LOG_ERROR, "Autodial: cannot poll dial file: %s\n", dialfile); + pthread_exit(NULL); + } bytes=read(fd,buf,256); buf[(int)bytes]=0;