[Home]

Summary:ASTERISK-26612: assert failure
Reporter:Jørgen H (jorgen)Labels:
Date Opened:2016-11-18 08:38:12.000-0600Date Closed:2016-11-18 12:42:20.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:14.1.2 Frequency of
Occurrence
Related
Issues:
Environment:linux x64Attachments:
Description:When pjsip runs out of tcp sockets (which is set by PJ_IOQUEUE_MAX_HANDLES I guess), it looks like it crashes on an assertion on line 363 in /src/pj/ioqueue_select.c

Regardless what the max sockets value is, it shouldnt crash I guess.
This regards pjsip 2.5.5 including trunk


#0  0x00007f4e8a59d578 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f4e8a59e9fa in __GI_abort () at abort.c:89
#2  0x00007f4e8a596427 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7f4e1d9cd938 "!pj_list_empty(&ioqueue->free_list)",
   file=file@entry=0x7f4e1d9cd660 "../src/pj/ioqueue_select.c", line=line@entry=363,
   function=function@entry=0x7f4e1d9cd9f0 <__PRETTY_FUNCTION__.6416> "pj_ioqueue_register_sock2") at assert.c:92
#3  0x00007f4e8a5964d2 in __GI___assert_fail (assertion=0x7f4e1d9cd938 "!pj_list_empty(&ioqueue->free_list)", file=0x7f4e1d9cd660 "../src/pj/ioqueue_select.c", line=363,
   function=0x7f4e1d9cd9f0 <__PRETTY_FUNCTION__.6416> "pj_ioqueue_register_sock2") at assert.c:101
#4  0x00007f4e1d9bb526 in pj_ioqueue_register_sock2 () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#5  0x00007f4e1d9bf6bc in pj_activesock_create () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#6  0x00007f4e1f9a8a7c in tcp_create.constprop () from /usr/app/asterisk/14.1.1/lib/libpjsip.so.2
#7  0x00007f4e1f9a8fb7 in on_accept_complete () from /usr/app/asterisk/14.1.1/lib/libpjsip.so.2
#8  0x00007f4e1d9bf06f in ioqueue_on_accept_complete () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#9  0x00007f4e1d9ba123 in ioqueue_dispatch_read_event () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#10 0x00007f4e1d9bba3f in pj_ioqueue_poll () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#11 0x00007f4e1f99d9cb in pjsip_endpt_handle_events2 () from /usr/app/asterisk/14.1.1/lib/libpjsip.so.2
#12 0x00007f4e1c59fe68 in monitor_thread_exec (endpt=<optimized out>) at res_pjsip.c:4017
#13 0x00007f4e1d9bcc0a in thread_main () from /usr/app/asterisk/14.1.1/lib/libpj.so.2
#14 0x00007f4e8aeac434 in start_thread (arg=0x7f4e1691b700) at pthread_create.c:334
#15 0x00007f4e8a6530ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Comments:By: Asterisk Team (asteriskteam) 2016-11-18 08:38:13.109-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Richard Mudgett (rmudgett) 2016-11-18 11:30:19.220-0600

Your PJPROJECT is built with assertions enabled.  PJPROJECT is really too aggressive with its assertions because they trip on perfectly valid off nominal conditions.  This is why the build instructions on [1] list -DNDEBUG as a configuration parameter.  It is *highly* recommended to use bundled PJPROJECT because it configures PJPROJECT for Asterisk and applies patches to PJPROJECT to fix known bugs.  The bundled PJPROJECT build is also likely to be ahead of [1] in how to configure PJPROJECT.

[1] https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject