Summary: | ASTERISK-28925: memory leak in asterisk 16.10 | ||||
Reporter: | Robert Sutton (rsutton@noojee.com.au) | Labels: | |||
Date Opened: | 2020-05-31 22:56:21 | Date Closed: | 2020-06-01 03:56:27 | ||
Priority: | Major | Regression? | Yes | ||
Status: | Closed/Complete | Components: | Core/Streams | ||
Versions: | 16.10.0 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | ubuntu 18.04, docker, asterisk 16.10, realtime | Attachments: | |||
Description: | please advise what else is required to investigate this issue.
{noformat} Connected to Asterisk 16.10.0 currently running on pbx0 (pid = 1) pbx0*CLI> memory show summary 7171104 bytes in 858 allocations in file ../src/pj/pool_policy_malloc.c 9358 bytes in 28 allocations in file /usr/src/asterisk/include/asterisk/strings.h 28100 bytes in 128 allocations in file /usr/src/asterisk/include/asterisk/threadstorage.h 16736 bytes in 72 allocations in file acl.c 144 bytes in 1 allocations in file app.c 712 bytes in 1 allocations in file app_bridgewait.c 1128 bytes in 3 allocations in file app_confbridge.c 6736 bytes in 2 allocations in file app_queue.c 3538 bytes in 116 allocations in file asterisk.c 7008 bytes in 292 allocations in file astobj2.c 191376 bytes in 2658 allocations in file astobj2_hash.c 256 bytes in 2 allocations in file bridge.c 160235 bytes in 443 allocations in file bucket.c 816 bytes in 4 allocations in file ccss.c 25128 bytes in 5 allocations in file cdr.c 6816 bytes in 6 allocations in file cel.c 160 bytes in 2 allocations in file chan_bridge_media.c 816 bytes in 2 allocations in file chan_pjsip.c 25304 bytes in 8 allocations in file channel.c 10493 bytes in 488 allocations in file cli.c 6256 bytes in 48 allocations in file codec.c 26496 bytes in 1 allocations in file codec_resample.c 39320 bytes in 12 allocations in file confbridge/conf_config_parser.c 5334 bytes in 54 allocations in file config.c 94840 bytes in 613 allocations in file config_options.c 216 bytes in 2 allocations in file core_local.c 3690 bytes in 15 allocations in file datastore.c 7258 bytes in 117 allocations in file devicestate.c 69968 bytes in 224 allocations in file endpoints.c 7065 bytes in 29 allocations in file features_config.c 7912 bytes in 23 allocations in file file.c 9413 bytes in 133 allocations in file format.c 992 bytes in 1 allocations in file format_cache.c 29950320 bytes in 748229 allocations in file format_cap.c 6937 bytes ( 6937 cache) in 17 allocations in file frame.c 9213 bytes in 58 allocations in file http.c 42359 bytes in 1203 allocations in file indications.c 12768 bytes in 6 allocations in file iostream.c 828 bytes in 12 allocations in file json.c 2296 bytes in 1 allocations in file libasteriskssl.c 36729 bytes in 216 allocations in file loader.c 4190 bytes in 2 allocations in file logger.c 81307 bytes in 242 allocations in file manager.c 1096 bytes in 1 allocations in file media_cache.c 96 bytes in 2 allocations in file message.c 108640 bytes in 194 allocations in file mwi.c 784 bytes in 2 allocations in file named_acl.c 1736 bytes in 1 allocations in file named_locks.c 9000 bytes in 214 allocations in file optional_api.c 73541 bytes in 461 allocations in file pbx.c 61518 bytes in 210 allocations in file pbx_app.c 1350 bytes in 56 allocations in file pbx_config.c 154 bytes in 3 allocations in file pbx_variables.c 240 bytes in 2 allocations in file pjsip/cli_commands.c 4202 bytes in 33 allocations in file res_config_mysql.c 3310 bytes in 12 allocations in file res_http_websocket.c 2350 bytes in 8 allocations in file res_musiconhold.c 88 bytes in 1 allocations in file res_mwi_external.c 2087 bytes in 35 allocations in file res_pjproject.c 192 bytes in 6 allocations in file res_pjsip.c 584 bytes in 2 allocations in file res_pjsip/config_auth.c 465 bytes in 2 allocations in file res_pjsip/config_global.c 88 bytes in 1 allocations in file res_pjsip/config_system.c 5408 bytes in 12 allocations in file res_pjsip/config_transport.c 11952 bytes in 14 allocations in file res_pjsip/location.c 352 bytes in 1 allocations in file res_pjsip/pjsip_cli.c 20276 bytes in 176 allocations in file res_pjsip/pjsip_configuration.c 5520 bytes in 8 allocations in file res_pjsip/pjsip_distributor.c 1392 bytes in 3 allocations in file res_pjsip/pjsip_global_headers.c 115654 bytes in 412 allocations in file res_pjsip/pjsip_options.c 3465 bytes in 13 allocations in file res_pjsip/pjsip_scheduler.c 2080 bytes in 20 allocations in file res_pjsip/pjsip_session.c 2560 bytes in 7 allocations in file res_pjsip/pjsip_transport_events.c 2272 bytes in 4 allocations in file res_pjsip/pjsip_transport_management.c 101 bytes in 1 allocations in file res_pjsip_authenticator_digest.c 852 bytes in 6 allocations in file res_pjsip_dialog_info_body_generator.c 120 bytes in 1 allocations in file res_pjsip_endpoint_identifier_ip.c 1492 bytes in 7 allocations in file res_pjsip_exten_state.c 21250 bytes in 150 allocations in file res_pjsip_mwi.c 4435 bytes in 43 allocations in file res_pjsip_notify.c 5132 bytes in 23 allocations in file res_pjsip_outbound_registration.c 2375 bytes in 14 allocations in file res_pjsip_pubsub.c 366 bytes in 3 allocations in file res_pjsip_registrar.c 575 bytes in 4 allocations in file res_pjsip_session.c 99744 bytes in 3 allocations in file res_pjsip_transport_websocket.c 136 bytes in 1 allocations in file res_smdi.c 38 bytes in 2 allocations in file res_sorcery_astdb.c 4064 bytes in 32 allocations in file res_sorcery_config.c 968 bytes in 1 allocations in file res_sorcery_memory.c 968 bytes in 1 allocations in file res_sorcery_memory_cache.c 102 bytes in 6 allocations in file res_sorcery_realtime.c 7880 bytes in 5 allocations in file res_stasis.c 712 bytes in 1 allocations in file res_stasis_device_state.c 2152 bytes in 1 allocations in file res_stasis_playback.c 2152 bytes in 1 allocations in file res_stasis_recording.c 328 bytes in 2 allocations in file res_statsd.c 2947 bytes in 49 allocations in file rtp_engine.c 27648 bytes in 126 allocations in file sched.c 376 bytes in 4 allocations in file serializer.c 440853 bytes in 698 allocations in file sorcery.c 178945 bytes in 1915 allocations in file stasis.c 2208 bytes in 2 allocations in file stasis/messaging.c 91755 bytes in 568 allocations in file stasis_cache.c 5664 bytes in 59 allocations in file stasis_cache_pattern.c 30565 bytes in 518 allocations in file stasis_message.c 13824 bytes in 126 allocations in file stasis_message_router.c 18552 bytes in 1 allocations in file stdtime/localtime.c 59832880 bytes in 747923 allocations in file stream.c 17120 bytes in 718 allocations in file stringfields.c 123705 bytes in 254 allocations in file strings.c 96766 bytes in 519 allocations in file taskprocessor.c 2352 bytes in 12 allocations in file tcptls.c 25016 bytes in 245 allocations in file threadpool.c 160 bytes in 3 allocations in file timing.c 16768 bytes in 34 allocations in file translate.c 160 bytes in 2 allocations in file udptl.c 4266 bytes in 52 allocations in file utils.c 99622595 bytes allocated (6937 in caches) in 1512429 selected allocations 99622595 bytes in all allocations 871386 bytes in deferred free large allocations 33687 bytes in deferred free small allocations 905073 bytes in deferred free allocations 100527668 bytes in all allocations and deferred free allocations {noformat} memory show allocations is full of this {noformat} 40 bytes allocated by format_cap_init() line 109 of format_cap.c 80 bytes allocated by ast_stream_alloc() line 111 of stream.c 80 bytes allocated by ast_stream_alloc() line 111 of stream.c 40 bytes allocated by format_cap_init() line 109 of format_cap.c 40 bytes allocated by format_cap_init() line 109 of format_cap.c 80 bytes allocated by ast_stream_alloc() line 111 of stream.c 80 bytes allocated by ast_stream_alloc() line 111 of stream.c 80 bytes allocated by ast_stream_alloc() line 111 of stream.c {noformat} | ||||
Comments: | By: Asterisk Team (asteriskteam) 2020-05-31 22:56:23.379-0500 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]. Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur. By: Robert Sutton (rsutton@noojee.com.au) 2020-06-01 01:47:12.749-0500 I've just tested with 16.9 and this leak doesn't exist there. this should give some idea about what commands are being executed. {noformat} == Setting global variable 'SIPDOMAIN' to '192.168.0.120' -- Executing [7601@handset:1] Set("PJSIP/520-0000001a", "AGIEXITONHANGUP=yes") in new stack -- Executing [7601@handset:2] AGI("PJSIP/520-0000001a", "agi://127.0.0.1/route?targ=7601&ctx=Pre-Handset") in new stack -- AGI Script Executing Application: (Progress) Options: () > 0x7f40fc0b54c0 -- Strict RTP learning after remote address set to: 192.168.0.2:11800 > 0x7f40fc0b54c0 -- Strict RTP switching to RTP target address 192.168.0.2:11800 as source -- AGI Script Executing Application: (Playtones) Options: (ring) -- AGI Script Executing Application: (StopPlayTones) Options: () -- AGI Script Executing Application: (StopMixMonitor) Options: () -- AGI Script Executing Application: (StopMixMonitor) Options: () -- AGI Script Executing Application: (mixmonitor) Options: (/var/spool/asterisk/monitor/1590993483.36-035204-7601-I-1.wav,,curl 'https://127.0.0.1/migrate?guid=1590993483425-38685&apiKey=mykey') == Begin MixMonitor Recording PJSIP/520-0000001a -- AGI Script Executing Application: (StopMixMonitor) Options: () == MixMonitor close filestream (mixed) == Executing [curl 'https://127.0.0.1/migrate?guid=1590993483425-38685&apiKey=mykey'] -- AGI Script Executing Application: (StopMixMonitor) Options: () -- AGI Script Executing Application: (mixmonitor) Options: (/var/spool/asterisk/monitor/1590993483.36-035204-7601-I-2.wav,,curl 'https://127.0.0.1/migrate?guid=1590993483525-38824&apiKey=mykey') == Begin MixMonitor Recording PJSIP/520-0000001a -- Started music on hold, class 'default', on channel 'PJSIP/520-0000001a' -- Stopped music on hold on PJSIP/520-0000001a -- Called 123 -- <PJSIP/520-0000001a> Playing 'https://127.0.0.1/getAudioData/mykey/8f0a02cf-482c-4c17-a325-20d9de096703.wav.slin' (escape_digits=) (sample_offset 0) (language 'en_AU') == DTLS ECDH initialized (automatic), faster PFS enabled -- PJSIP/123-0000001b is ringing -- PJSIP/123-0000001b is ringing == End MixMonitor Recording PJSIP/520-0000001a > 0x7f40fc0b54c0 -- Strict RTP learning complete - Locking on source address 192.168.0.2:11800 -- Called 123 == DTLS ECDH initialized (automatic), faster PFS enabled -- PJSIP/123-0000001c is ringing -- PJSIP/123-0000001c is ringing == Spawn extension (handset, 7601, 2) exited non-zero on 'PJSIP/520-0000001a' -- Executing [h@handset:1] Hangup("PJSIP/520-0000001a", "") in new stack == Spawn extension (handset, h, 1) exited non-zero on 'PJSIP/520-0000001a' == MixMonitor close filestream (mixed) == Executing [curl 'https://127.0.0.1/migrate?guid=1590993483525-38824&apiKey=mykey'] -- Manager 'asterisk' from 192.168.0.120, hanging up channel: PJSIP/123-0000001c [Jun 1 16:38:27] NOTICE[68]: manager.c:4488 action_hangup: Request to hangup non-existent channel: PJSIP/123-0000001C == End MixMonitor Recording PJSIP/520-0000001a {noformat} |