Modify

Opened 7 years ago

Closed 3 years ago

#9036 closed defect (moved_to_github)

Asterisk crashes with Assertion `md_c[1] == md_count[1]' failed.

Reported by: Craig <candrews@…> Owned by: zandbelt
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: asterisk Cc:

Description

Asterisk seems to randomly crash with this output:

# asterisk -f
[Mar 12 21:08:51] NOTICE[3834]: cdr.c:1567 do_reload: CDR simple logging enabled.
[Mar 12 21:08:52] WARNING[3834]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory
[Mar 12 21:08:52] WARNING[3834]: ccss.c:3988 initialize_cc_max_requests: Could not find valid ccss.conf file. Using cc_max_requests default
[Mar 12 21:08:52] NOTICE[3834]: loader.c:1118 load_modules: 70 modules will be loaded.
[Mar 12 21:08:52] WARNING[3834]: loader.c:387 load_dynamic_module: Error loading module 'res_monitor': File not found
[Mar 12 21:08:52] WARNING[3834]: loader.c:387 load_dynamic_module: Error loading module 'res_crypto': File not found
[Mar 12 21:08:52] WARNING[3834]: loader.c:387 load_dynamic_module: Error loading module 'res_crypto': File not found
[Mar 12 21:08:52] WARNING[3834]: res_musiconhold.c:1033 moh_scan_files: Cannot open dir /var/lib/asterisk/moh or dir does not exist
[Mar 12 21:08:52] WARNING[3834]: res_musiconhold.c:1855 load_module: No music on hold classes configured, disabling music on hold.
[Mar 12 21:08:52] ERROR[3834]: netsock2.c:245 ast_sockaddr_resolve: getaddrinfo("OpenWrt", "(null)", ...): Name or service not known
[Mar 12 21:08:52] WARNING[3834]: acl.c:569 resolve_first: Unable to lookup 'OpenWrt'
[Mar 12 21:08:52] NOTICE[3834]: chan_sip.c:26005 build_peer: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser'
[Mar 12 21:08:52] WARNING[3834]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory
[Mar 12 21:08:52] WARNING[3834]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory
[Mar 12 21:08:52] WARNING[3834]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory
[Mar 12 21:08:52] NOTICE[3834]: chan_agent.c:1129 read_agent_config: No agent configuration found -- agent support disabled
[Mar 12 21:08:52] WARNING[3834]: chan_iax2.c:3228 reload_firmware: Error opening firmware directory '/var/lib/asterisk/firmware/iax': No such file or directory
[Mar 12 21:08:52] WARNING[3834]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory
[Mar 12 21:08:52] WARNING[3834]: config.c:1112 process_text_line: parse error: No category context for line 11 of /etc/asterisk/cdr_custom.conf
[Mar 12 21:08:52] ERROR[3834]: cdr_custom.c:86 load_config: Unable to load cdr_custom.conf. Not logging custom CSV CDRs.
[Mar 12 21:08:52] NOTICE[3834]: pbx_ael.c:122 pbx_load_module: Starting AEL load process.
[Mar 12 21:08:52] NOTICE[3834]: pbx_ael.c:130 pbx_load_module: File /etc/asterisk/extensions.ael not found; AEL declining load
[Mar 12 21:08:53] ERROR[3861]: pbx_spool.c:586 scan_thread: Unable to initialize inotify(7)
asterisk: md_rand.c: 322: ssleay_rand_add: Assertion `md_c[1] == md_count[1]' failed.
Aborted

I'm using a Asus WNDR3700v2 and trunk r25952

The only seemingly relevant result on Google is http://fixunix.com/openssl/159122-re-assertion-md_c-1-md_count-1-failed.html

Attachments (0)

Change History (9)

comment:1 Changed 7 years ago by Craig <candrews@…>

I forgot to mention that this is using Asterisk 1.8

comment:2 Changed 6 years ago by swalker

  • Owner changed from developers to zandbelt
  • Status changed from new to assigned

comment:3 Changed 5 years ago by Leonid Evdokimov <leon@…>

Another relevant result: http://readlist.com/lists/openssl.org/openssl-users/1/5348.html

crypto/rand/md_rand.c
320-	if (entropy < ENTROPY_NEEDED) /* stop counting when we have enough */
321-	    entropy += add;
322-	if (!do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
323-	
324-#if !defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
325:	assert(md_c[1] == md_count[1]);
326-#endif
327-	}
328-
329-static void ssleay_rand_seed(const void *buf, int num)
330-	{

Seems, openssl is built without OPENSSL_THREADS.
https://dev.openwrt.org/browser/trunk/package/openssl/Makefile gives me no clues regading this issue.

I see frequent tor crashes because of same issue:

...
Aug 24 00:43:13.842 [notice] Performing bandwidth self-test...done.
/usr/sbin/tor: md_rand.c: 325: ssleay_rand_add: Assertion `md_c[1] == md_count[1]' failed.
Aborted
root@OpenWrt:~# opkg list-installed | grep 'tor \|ssl '
libopenssl - 1.0.1c-1
tor - 0.2.2.37-1

comment:4 Changed 5 years ago by Leonid Evdokimov <leon@…>

P.S. I filled alike defect about tor package: #12072

comment:5 follow-up: Changed 5 years ago by jow

  • Resolution set to fixed
  • Status changed from assigned to closed

see r33269

comment:6 Changed 5 years ago by coolspace

  • Resolution fixed deleted
  • Status changed from closed to reopened

Helo, Jow,
Now, it seems this bug happens again in the trunk. I'm using OpenWrt Barrier Breaker r36570. I just checked the latested source code. It seems the changeset of r33269 was revert by r33292 for some reason. So now, this problem happens again.

comment:7 in reply to: ↑ 5 Changed 5 years ago by anonymous

Replying to jow:

see r33269

This patch was revert by r33292 for some unknown reason. So now, this bug happens again :)

comment:8 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:9 Changed 3 years ago by jogo

  • Resolution set to moved_to_github
  • Status changed from reopened to closed

Asterisk is now maintained here: https://github.com/openwrt/telephony.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.