[Asterisk-Users] 99% cpu on asterisk with chan_unicall and low traffic

Andres Maduro andres at iconos.com.ve
Wed Jun 1 11:59:11 MST 2005


Hi, 

I made a full strace of the running Asterisk process during a high load 99% of cpu usage, aprox. ~800 MBytes of data was gathered and found
lots of errors in this log.

The errors started when * tried to open a /dev/zap/channel file (before this, there were other errors but I think there are harmless).  Following, I include some pieces of the log and an url if you want to download the whole thing in gzipped format (25 Mbytes).

......
1085  open("/dev/zap/channel", O_RDWR|O_NONBLOCK <unfinished ...>
1091  <... fcntl64 resumed> )           = -1 EBADF (Bad file descriptor)
1085  <... open resumed> )              = 34
1091  fcntl64(3615, F_GETFL <unfinished ...>
1085  ioctl(34, 0x40044a26 <unfinished ...>
1091  <... fcntl64 resumed> )           = -1 EBADF (Bad file descriptor)
1085  <... ioctl resumed> , 0xbfffdb4c) = 0
1091  fcntl64(3616, F_GETFL <unfinished ...>
1085  ioctl(34, 0x80184a1c <unfinished ...>
1091  <... fcntl64 resumed> )           = -1 EBADF (Bad file descriptor)
1085  <... ioctl resumed> , 0xbfffdd60) = 0
1091  fcntl64(3617, F_GETFL <unfinished ...>
1085  ioctl(34, 0x40184a1b <unfinished ...>
1091  <... fcntl64 resumed> )           = -1 EBADF (Bad file descriptor)

When the cpu is at 99%, lots of 

1111  write(34, "\321\321\321\323\320\323\320\320\321\320\323\320\320\322"..., 160)
= -1 EAGAIN (Resour
ce temporarily unavailable)
1111  write(34, "\321\321\321\323\320\323\320\320\321\320\323\320\320\322"..., 160)
= -1 EAGAIN (Resour
ce temporarily unavailable)

ocurrs which is a FD for /dev/zap/channel.

I think there is a problem with file descriptor 34 which is /dev/zap/channel.  My zaptel.conf is as follows:

# Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" HDB3/ 
span=1,1,0,cas,hdb3
cas=1-15:1101
cas=17-31:1101

# Span 2: WCTDM/0 "Wildcard TDM400P REV E/F Board 1" 
fxols=32
fxols=33
fxols=34
fxols=35

and the MFCR2 proto configuration in unicall is as follows:

protocolclass=mfcr2
protocolvariant=ve,10,7
protocolend=co
group = 1
channel => 1-15
group = 2
channel => 17-31

This could give us more clues as to where the problem might be located.  Your comments are welcome.

The full gzipped 25 Mbytes log can be downloaded from http://www.iconos.com.ve/download/unicall/asterisk-kia-unicall-strace.out.gz

Regards.
        Andres.


More information about the asterisk-users mailing list