Suddenly system crashing with segmentation faults

Found these lines on the ‘full’ log. Does it shed any light?

[2018-10-30 13:41:03] ERROR[134567][C-00000474] astobj2.c: Excessive refcount 100000 reached on ao2 object 0x31abfc8
[2018-10-30 13:41:03] ERROR[134567][C-00000474] astobj2.c: FRACK!, Failed assertion Excessive refcount 100000 reached on ao2 object 0x31abfc8 (0)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: Got 21 backtrace records
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #0: [0x5fcc55] asterisk __ast_assert_failed() (0x5fcbd1+84)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #1: [0x45d4bd] asterisk ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #2: [0x45d816] asterisk __ao2_ref() (0x45d7e8+2E)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #3: [0x51f35e] asterisk ast_format_cap_get_format() (0x51f2fe+60)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #4: [0x7f6c1bf302ce] chan_sip.so ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #5: [0x7f6c1bf35303] chan_sip.so ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #6: [0x7f6c1bf121cb] chan_sip.so ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #7: [0x4bcfa3] asterisk ast_call() (0x4bcef0+B3)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #8: [0x7f6c2219ac9e] app_dial.so ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #9: [0x7f6c2219d9fe] app_dial.so ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #10: [0x582ef6] asterisk pbx_exec() (0x582dda+11C)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #11: [0x570787] asterisk ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #12: [0x573c6a] asterisk ast_spawn_extension() (0x573c06+64)
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #13: [0x574945] asterisk ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #14: [0x576115] asterisk ()
[2018-10-30 13:41:03] VERBOSE[134567][C-00000474] logger.c: #15: [0x5f9c08] asterisk ()
[

It shows what the backtrace shows. The reference count of a media format reached an excessive count upon getting it and increasing its reference count within chan_sip.

Do you think switching to PJSIP can help?

It would change the conditions of things, without understanding precisely why it is happening I can’t answer that with any certainty.

It is not a file that is being referenced but a type of file.

It is probably possible to identify the file class, and, for that matter, the specific file, from the core image, but, if you are having difficulties with the idea that there could be a reference count on a type of file, it might be quite difficult to talk you through doing that, and, as well as being rather large, core files tend to need something very close to the actual failing system for gdb to be able to make sense of them, so it really has to be done on your system.

Jonathon mentioned leaks before. Leaks, in software engineering, are when resources get allocated but never freed, and gradually the system runs out of them. In this case, if it had hit the reference count limit, it would have run out of memory.

Hello, we run into the same issue with asterisk 15. Is there a way to force the clear of allocated and not freed resources? Or increase memory limit somehow…

Thanks

Paolo

No system is going to allow you to release such resources as the system does not know that something won’t use them in tthe future corrupting memory which has been allocated to another use.