Invalid GSM data can take asterisk to crash?

Hello, All:

We are using asterisk 1.4.29 for our call center. And, It would crash about 3 to 5 times/day.
The system would create core file in /tmp when asterisk crash.

We execute command “gdb asterisk /tmp/core*”, and type ‘thread apply all bt’ can get information like follow:


Thread 1 (process 23683):
#0 0x0000003d54e30155 in raise () from /lib64/libc.so.6
#1 0x0000003d54e31bf0 in abort () from /lib64/libc.so.6
#2 0x0000003d54e6a38b in __libc_message () from /lib64/libc.so.6
#3 0x0000003d54e71834 in _int_free () from /lib64/libc.so.6
#4 0x0000003d54e74e7c in free () from /lib64/libc.so.6
#5 0x0000003d54e6089b in fclose@@GLIBC_2.2.5 () from /lib64/libc.so.6
#6 0x000000000044f318 in ?? ()
#7 0x00000000004289b3 in ao2_ref ()
#8 0x0000000000455465 in ast_frame_free ()
#9 0x00002aaaaaab4915 in ?? () from /usr/lib64/asterisk/modules/res_musiconhold.so
#10 0x0000000000434d67 in ?? ()
#11 0x000000000043a89e in ?? ()
#12 0x000000000043d2fb in ast_safe_sleep_conditional ()
#13 0x00002aaabefcdcbf in ?? () from /usr/lib64/asterisk/modules/chan_agent.so
#14 0x000000000046d8a5 in pbx_exec ()
#15 0x000000000047185b in ?? ()
#16 0x0000000000471ca3 in ast_spawn_extension ()
#17 0x0000000000474ef5 in ?? ()
#18 0x0000000000476329 in ?? ()
#19 0x000000000049f5fe in ?? ()
#20 0x0000003d55a062f7 in start_thread () from /lib64/libpthread.so.0
#21 0x0000003d54ed1e3d in clone () from /lib64/libc.so.6

And execute command ‘grep “[23683]” /var/log/asterisk/full*’ , we get information like follow


[Feb 26 18:00:20] VERBOSE[23683] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [Feb 26 18:00:20] VERBOSE[23683] logger.c: Found
[Feb 26 18:00:20] VERBOSE[23683] logger.c: == Manager ‘remote_user’ logged on from 172.24.0.2
[Feb 26 18:00:20] VERBOSE[23683] logger.c: == Manager ‘remote_user’ logged off from 172.24.0.2
[Feb 26 18:21:22] VERBOSE[23683] logger.c: – Executing [*88888871@from-internal:1] Set(“SIP/7204-1c48ae40”, “AGENTNUMBER=8871”) in new stack
[Feb 26 18:21:22] VERBOSE[23683] logger.c: – Executing [*88888871@from-internal:2] NoOp(“SIP/7204-1c48ae40”, “AgentNumber is 8871”) in new stack
[Feb 26 18:21:22] VERBOSE[23683] logger.c: – Executing [*88888871@from-internal:3] AgentLogin(“SIP/7204-1c48ae40”, “8871”) in new stack
[Feb 26 18:21:22] VERBOSE[23683] logger.c: – <SIP/7204-1c48ae40> Playing ‘agent-pass’ (language ‘en’)
[Feb 26 18:21:24] VERBOSE[23683] logger.c: – <SIP/7204-1c48ae40> Playing ‘agent-loginok’ (language ‘en’)
[Feb 26 18:21:26] VERBOSE[23683] logger.c: – Started music on hold, class ‘default’, on SIP/7204-1c48ae40
[Feb 26 18:21:26] VERBOSE[23683] logger.c: == Agent ‘8871’ logged in (format g723/g723)
[Feb 26 18:24:53] ERROR[23683] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:25:34] WARNING[23683] codec_gsm.c: Invalid GSM data (1)
[Feb 26 18:25:34] WARNING[23683] translate.c: gsmtolin did not update samples 0

The other:

Thread 1 (process 30878):
#0 0x0000003d54e30155 in raise () from /lib64/libc.so.6
#1 0x0000003d54e31bf0 in abort () from /lib64/libc.so.6
#2 0x0000003d54e6a38b in __libc_message () from /lib64/libc.so.6
#3 0x0000003d54e71834 in _int_free () from /lib64/libc.so.6
#4 0x0000003d54e74e7c in free () from /lib64/libc.so.6
#5 0x0000003d54e6089b in fclose@@GLIBC_2.2.5 () from /lib64/libc.so.6
#6 0x000000000044f318 in ?? ()
#7 0x00000000004289b3 in ao2_ref ()
#8 0x0000000000455465 in ast_frame_free ()
#9 0x00002aaaaaab4915 in ?? () from /usr/lib64/asterisk/modules/res_musiconhold.so
#10 0x0000000000434d67 in ?? ()
#11 0x000000000043a89e in ?? ()
#12 0x000000000043d2fb in ast_safe_sleep_conditional ()
#13 0x00002aaabefcdcbf in ?? () from /usr/lib64/asterisk/modules/chan_agent.so
#14 0x000000000046d8a5 in pbx_exec ()
#15 0x000000000047185b in ?? ()
#16 0x0000000000471ca3 in ast_spawn_extension ()
#17 0x0000000000474ef5 in ?? ()
#18 0x0000000000476329 in ?? ()
#19 0x000000000049f5fe in ?? ()
#20 0x0000003d55a062f7 in start_thread () from /lib64/libpthread.so.0
#21 0x0000003d54ed1e3d in clone () from /lib64/libc.so.6

/var/log/asterisk/full:


[Feb 26 18:25:49] VERBOSE[30878] logger.c: – Executing [*88888847@from-internal:1] Set(“SIP/7220-0b93d820”, “AGENTNUMBER=
8847”) in new stack
[Feb 26 18:25:49] VERBOSE[30878] logger.c: – Executing [*88888847@from-internal:2] NoOp(“SIP/7220-0b93d820”, “AgentNumber
is 8847”) in new stack
[Feb 26 18:25:49] VERBOSE[30878] logger.c: – Executing [*88888847@from-internal:3] AgentLogin(“SIP/7220-0b93d820”, “8847”
) in new stack
[Feb 26 18:25:49] VERBOSE[30878] logger.c: – <SIP/7220-0b93d820> Playing ‘agent-pass’ (language ‘en’)
[Feb 26 18:25:51] VERBOSE[30878] logger.c: – <SIP/7220-0b93d820> Playing ‘agent-loginok’ (language ‘en’)
[Feb 26 18:25:52] VERBOSE[30878] logger.c: – Started music on hold, class ‘default’, on SIP/7220-0b93d820
[Feb 26 18:25:52] VERBOSE[30878] logger.c: == Agent ‘8847’ logged in (format g723/g723)
[Feb 26 18:28:58] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:31:10] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:32:33] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:36:02] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:42:27] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:45:04] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:46:39] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:48:54] ERROR[30878] channel.c: ast_read() called with no recorded file descriptor.
[Feb 26 18:53:31] WARNING[30878] codec_gsm.c: Invalid GSM data (1)
[Feb 26 18:53:31] WARNING[30878] translate.c: gsmtolin did not update samples 0

Our mainly hardware:
CPU: GenuineIntel Intel® Xeon® CPU E5504 @ 2.00GHz
Memory: 4 G

Thanks for your help and any information about it.