[asterisk-bugs] [JIRA] (ASTERISK-29846) channels: bad ao2 ref causes crash

N A (JIRA) noreply at issues.asterisk.org
Thu Mar 24 10:23:07 CDT 2022


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=258463#comment-258463 ] 

N A commented on ASTERISK-29846:
--------------------------------

Yes, it's a crash. Or at least, Asterisk is no longer running, and if that's not the result of a crash, not sure what else.

"It" doesn't say anything. I have a cron job that runs every 5 minutes that executes asterisk -rx "core show channels", and if it fails, it runs cd /var/crash && asterisk -g (the g is theoretically redundant, since I have the dump core option in asterisk.conf, but I'm not taking any chances...)

It then sends me an email so I know within 5 minutes if Asterisk crashed.

I also have recently added to the email to print out an ls -la /var/crash BEFORE starting it again, so I can see the contents, and in all of these mysterious crashes, it is simply empty. The res_calendar thing from the other day was an exception as I did get core dumps from those.

Additionally, if I get a segfault in a module that I wrote, I also get a core dump from that (typically while I am testing, so I can see in real time). So it's not like I can't get core dumps - I can and do - but never in these "mysterious" cases that happen randomly, a few times a week.

The only indication is that one minute Asterisk is running and the next it isn't, and I get an email.

Thus, it's almost as if whatever is causing the crash is somehow outside the scope of the processes that would generally result in a core dump. I don't really know what that would mean in the context of Asterisk or what type of issue that could indicate.

Really, I think the only possibly clue would be I get kept the debug log running continuously to a file, and that's what I initially did, but you indicated that wouldn't pinpoint the issue and indeed it seemed inconsistent in tracking that over time. Unfortunately it does not seem like we can really get anything further than those. Happy to try out any further suggestions though as at this point there is nothing to lose.

> channels: bad ao2 ref causes crash
> ----------------------------------
>
>                 Key: ASTERISK-29846
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29846
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 18.9.0
>         Environment: Debian 10
>            Reporter: N A
>            Assignee: N A
>         Attachments: core-asterisk-2022-02-01T17-04-52Z-brief.txt, core-asterisk-2022-02-01T17-04-52Z-full.txt, core-asterisk-2022-02-01T17-04-52Z-info.txt, core-asterisk-2022-02-01T17-04-52Z-locks.txt, core-asterisk-2022-02-01T17-04-52Z-thread1.txt, core-asterisk-2022-02-10T00-46-55Z-full.txt
>
>
> Currently, Asterisk crashes randomly every few days, not seemingly linked to anything going on at the moment. In fact, prior to this crash, the system was completely idle (no calls) for the previous 34 minutes.
> Here is a backtrace from right before the last crash, useful as it has line numbers:
> 01:35:03 ERROR[13076] : Got 10 backtrace records
> # 0: [0x55ca492928cc] asterisk utils.c:2727 __ast_assert_failed()
> # 1: [0x55ca49109db3] asterisk astobj2.c:212 log_bad_ao2()
> # 2: [0x55ca4910a73a] asterisk astobj2.c:501 __ao2_ref()
> # 3: [0x55ca4917269a] asterisk cli.c:1218 handle_chanlist()
> # 4: [0x55ca4917859f] asterisk cli.c:3020 ast_cli_command_full()
> # 5: [0x55ca49178734] asterisk cli.c:3048 ast_cli_command_multiple_full()
> # 6: [0x55ca49101e0c] asterisk asterisk.c:1424 netconsole()
> # 7: [0x55ca4928fb57] asterisk utils.c:1572 dummy_start()
> # 8: [0x7f257c305fa3] libpthread.so.0 pthread_create.c:487 start_thread()
> # 9: [0x7f257bd994cf] libc.so.6 clone.S:97 clone()



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list