asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.97k stars 924 forks source link

[bug]: Asterisk segfault #688

Closed nnew2 closed 1 month ago

nnew2 commented 1 month ago

Severity

Major

Versions

18.20.2

Components/Modules

We don't know which component is causing this

Operating Environment

Debian 11 Linux foobar 5.10.0-28-cloud-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux

Frequency of Occurrence

One Time

Issue Description

Asterisk suffered a segfault.

Apr 2 16:07:07 foobar kernel: [1792829.264877] asterisk[3248677]: segfault at 7f6d0000001a ip 00007f6e0eeb3391 sp 00007f6dbe83c8c0 error 4 in libc-2.31.so[7f6e0ee53000+159000]

As this crash (to our knowledge) has only occurred once we're not sure if there is anything to be done here. However, if the cause can be pointed out and be fixed from the logs we believe it would be great to have it fixed so that it does not happen again.

Attached files from ast_coredumper.

core-asterisk-2024-04-02T14-07-08Z-brief.txt core-asterisk-2024-04-02T14-07-08Z-thread1.txt core-asterisk-2024-04-02T14-07-08Z-locks.txt core-asterisk-2024-04-02T14-07-08Z-info.txt core-asterisk-2024-04-02T14-07-08Z-full.txt

Relevant log output

(gdb) frame
#0  unlink_chunk (p=p@entry=0x7f6dfc0db300, av=0x7f6dfc000020) at malloc.c:1459
1459    in malloc.c

(gdb) bt
#0  unlink_chunk (p=p@entry=0x7f6dfc0db300, av=0x7f6dfc000020) at malloc.c:1459
#1  0x00007f6e0eeb379d in _int_free (av=0x7f6dfc000020, p=0x7f6dfc0db300, have_lock=<optimized out>) at malloc.c:4333
#2  0x000055c4b8a21a07 in __ast_string_field_free_memory
    (mgr=<optimized out>, pool_head=0x7f6dfc147d58, cleanup_type=<optimized out>, file=<optimized out>, lineno=<optimized out>, func=<optimized out>) at stringfields.c:145
#3  0x000055c4b88e1b7b in __ao2_ref
    (user_data=0x7f6dfc147d58, delta=-1, tag=0x0, file=0x55c4b8af1ef5 "stasis_channels.c", line=249, func=0x55c4b8af2d70 <__PRETTY_FUNCTION__.50> "channel_snapshot_dtor") at astobj2.c:615
#4  0x000055c4b8a0e481 in channel_snapshot_dtor (obj=0x7f6de4048da8) at stasis_channels.c:249
#5  0x000055c4b88e1b7b in __ao2_ref
    (user_data=0x7f6de4048da8, delta=-1, tag=0x0, file=0x55c4b8af1ef5 "stasis_channels.c", line=568, func=0x55c4b8af27f0 <__PRETTY_FUNCTION__.16> "channel_snapshot_update_dtor") at astobj2.c:615
#6  0x000055c4b88e1b7b in __ao2_ref
    (user_data=0x7f6de4048d78, delta=-1, tag=0x0, file=0x55c4b8af31a9 "stasis_message.c", line=137, func=0x55c4b8af31c0 <__PRETTY_FUNCTION__.0> "stasis_message_dtor") at astobj2.c:615
#7  0x000055c4b88e1b7b in __ao2_ref
    (user_data=0x7f6de40141b8, delta=-1, tag=0x0, file=0x55c4b8af0498 "stasis.c", line=1267, func=0x55c4b8af0cd0 <__PRETTY_FUNCTION__.45> "dispatch_exec_async") at astobj2.c:615
#8  0x000055c4b8a05a2d in dispatch_exec_async (local=<optimized out>) at stasis.c:1267
#9  0x000055c4b8a27d27 in ast_taskprocessor_execute (tps=tps@entry=0x55c4b9d78e10) at taskprocessor.c:1300
#10 0x000055c4b8a27dd0 in default_tps_processing_function (data=data@entry=0x55c4b9d76ba0) at taskprocessor.c:212
#11 0x000055c4b8a36c2d in dummy_start (data=<optimized out>) at utils.c:1607
#12 0x00007f6e0f667ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#13 0x00007f6e0ef2ca6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Asterisk Issue Guidelines

jcolp commented 1 month ago

The log would seem to indicate memory corruption of some sort. The log doesn't really show any further information, and I haven't seen any crash like this. I don't think we're going to be able to investigate unless it can be reproduced.

nnew2 commented 1 month ago

You can choose to close the issue, or keep it open. At least it is now logged for future reference.