Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
gssdp
gssdp
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gssdpgssdp
  • Issues
  • #10

Closed
Open
Opened Sep 11, 2020 by Jordan Petridis@alatiera🌱Developer

Valgrind complains about a leak after bc0785aa

Hi, after upgrading gupnp from 1.0.4 to 1.0.6 and gssdp from 1.0.3 to 1.0.5 I started noticing the following leak in the GStreamer tests.

I've bisected and it looks like they started happening after bc0785aa

I've attached a log sample, but you can find more of them here. https://gitlab.freedesktop.org/alatiera/gst-ci/-/jobs/4497220

==17285== Memcheck, a memory error detector
==17285== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17285== Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info
==17285== Command: /builds/alatiera/gst-ci/gst-build/build/subprojects/gst-plugins-bad/tests/check/elements_webrtcbin
==17285== Parent PID: 14875
==17285== 
==17397== 
==17397== HEAP SUMMARY:
==17397==     in use at exit: 961,972 bytes in 6,177 blocks
==17397==   total heap usage: 103,412 allocs, 97,235 frees, 29,227,830 bytes allocated
==17397== 
==17397== 42 bytes in 4 blocks are definitely lost in loss record 3,037 of 5,209
==17397==    at 0x483D80B: malloc (vg_replace_malloc.c:307)
==17397==    by 0x4A553A8: g_malloc (gmem.c:99)
==17397==    by 0x4A6F663: g_strdup (gstrfuncs.c:363)
==17397==    by 0x86673EB: gssdp_client_set_property (gssdp-client.c:421)
==17397==    by 0x4B3EFF1: object_set_property (gobject.c:1469)
==17397==    by 0x4B3EFF1: g_object_constructor (gobject.c:2192)
==17397==    by 0x8684AC0: gupnp_context_constructor (gupnp-context.c:398)
==17397==    by 0x4B3F21B: g_object_new_with_custom_constructor (gobject.c:1745)
==17397==    by 0x4B3F21B: g_object_new_internal (gobject.c:1825)
==17397==    by 0x4B41337: g_object_new_valist (gobject.c:2152)
==17397==    by 0x502BDAD: g_initable_new_valist (ginitable.c:244)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x86A200A: network_device_create_context (gupnp-linux-context-manager.c:277)
==17397==    by 0x86A267D: create_context (gupnp-linux-context-manager.c:511)
==17397==    by 0x86A2E49: receive_netlink_message (gupnp-linux-context-manager.c:774)
==17397==    by 0x86A232A: on_netlink_message_available (gupnp-linux-context-manager.c:399)
==17397==    by 0x505208A: socket_source_dispatch (gsocket.c:3961)
==17397==    by 0x4A4F56F: g_main_dispatch (gmain.c:3216)
==17397==    by 0x4A4F56F: g_main_context_dispatch (gmain.c:3881)
==17397==    by 0x4A4F8FF: g_main_context_iterate.isra.0 (gmain.c:3954)
==17397==    by 0x4A4FBF2: g_main_loop_run (gmain.c:4148)
==17397==    by 0x62371B2: thread_func (gupnp-simple-igd-thread.c:296)
==17397==    by 0x4A79011: g_thread_proxy (gthread.c:805)
==17397== 
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: definite
   fun:malloc
   fun:g_malloc
   fun:g_strdup
   fun:gssdp_client_set_property
   fun:object_set_property
   fun:g_object_constructor
   fun:gupnp_context_constructor
   fun:g_object_new_with_custom_constructor
   fun:g_object_new_internal
   fun:g_object_new_valist
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:network_device_create_context
   fun:create_context
   fun:receive_netlink_message
   fun:on_netlink_message_available
   fun:socket_source_dispatch
   fun:g_main_dispatch
   fun:g_main_context_dispatch
   fun:g_main_context_iterate.isra.0
   fun:g_main_loop_run
   fun:thread_func
   fun:g_thread_proxy
}
==17397== 64 bytes in 4 blocks are indirectly lost in loss record 3,274 of 5,209
==17397==    at 0x4B5D0FB: g_type_create_instance (gtype.c:1845)
==17397==    by 0x4B3F3F4: g_object_new_internal (gobject.c:1827)
==17397==    by 0x4B41337: g_object_new_valist (gobject.c:2152)
==17397==    by 0x502BDAD: g_initable_new_valist (ginitable.c:244)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x502A7B7: g_inet_address_mask_new (ginetaddressmask.c:260)
==17397==    by 0x86677F4: get_host_ip (gssdp-client.c:2041)
==17397==    by 0x86677F4: init_network_info (gssdp-client.c:2066)
==17397==    by 0x86677F4: gssdp_client_initable_init (gssdp-client.c:249)
==17397==    by 0x86842E0: gupnp_context_initable_init (gupnp-context.c:185)
==17397==    by 0x502BDC9: g_initable_new_valist (ginitable.c:248)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x86A200A: network_device_create_context (gupnp-linux-context-manager.c:277)
==17397==    by 0x86A267D: create_context (gupnp-linux-context-manager.c:511)
==17397==    by 0x86A2E49: receive_netlink_message (gupnp-linux-context-manager.c:774)
==17397==    by 0x86A232A: on_netlink_message_available (gupnp-linux-context-manager.c:399)
==17397==    by 0x505208A: socket_source_dispatch (gsocket.c:3961)
==17397==    by 0x4A4F56F: g_main_dispatch (gmain.c:3216)
==17397==    by 0x4A4F56F: g_main_context_dispatch (gmain.c:3881)
==17397==    by 0x4A4F8FF: g_main_context_iterate.isra.0 (gmain.c:3954)
==17397==    by 0x4A4FBF2: g_main_loop_run (gmain.c:4148)
==17397==    by 0x62371B2: thread_func (gupnp-simple-igd-thread.c:296)
==17397==    by 0x4A79011: g_thread_proxy (gthread.c:805)
==17397== 
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: indirect
   fun:g_type_create_instance
   fun:g_object_new_internal
   fun:g_object_new_valist
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:g_inet_address_mask_new
   fun:get_host_ip
   fun:init_network_info
   fun:gssdp_client_initable_init
   fun:gupnp_context_initable_init
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:network_device_create_context
   fun:create_context
   fun:receive_netlink_message
   fun:on_netlink_message_available
   fun:socket_source_dispatch
   fun:g_main_dispatch
   fun:g_main_context_dispatch
   fun:g_main_context_iterate.isra.0
   fun:g_main_loop_run
   fun:thread_func
   fun:g_thread_proxy
}
==17397== 128 bytes in 4 blocks are indirectly lost in loss record 4,828 of 5,209
==17397==    at 0x4B5D0FB: g_type_create_instance (gtype.c:1845)
==17397==    by 0x4B3F3F4: g_object_new_internal (gobject.c:1827)
==17397==    by 0x4B41337: g_object_new_valist (gobject.c:2152)
==17397==    by 0x4B4168C: g_object_new (gobject.c:1670)
==17397==    by 0x86677DF: get_host_ip (gssdp-client.c:2039)
==17397==    by 0x86677DF: init_network_info (gssdp-client.c:2066)
==17397==    by 0x86677DF: gssdp_client_initable_init (gssdp-client.c:249)
==17397==    by 0x86842E0: gupnp_context_initable_init (gupnp-context.c:185)
==17397==    by 0x502BDC9: g_initable_new_valist (ginitable.c:248)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x86A200A: network_device_create_context (gupnp-linux-context-manager.c:277)
==17397==    by 0x86A267D: create_context (gupnp-linux-context-manager.c:511)
==17397==    by 0x86A2E49: receive_netlink_message (gupnp-linux-context-manager.c:774)
==17397==    by 0x86A232A: on_netlink_message_available (gupnp-linux-context-manager.c:399)
==17397==    by 0x505208A: socket_source_dispatch (gsocket.c:3961)
==17397==    by 0x4A4F56F: g_main_dispatch (gmain.c:3216)
==17397==    by 0x4A4F56F: g_main_context_dispatch (gmain.c:3881)
==17397==    by 0x4A4F8FF: g_main_context_iterate.isra.0 (gmain.c:3954)
==17397==    by 0x4A4FBF2: g_main_loop_run (gmain.c:4148)
==17397==    by 0x62371B2: thread_func (gupnp-simple-igd-thread.c:296)
==17397==    by 0x4A79011: g_thread_proxy (gthread.c:805)
==17397==    by 0x4F624E1: start_thread (pthread_create.c:479)
==17397==    by 0x4C836C2: clone (clone.S:95)
==17397== 
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: indirect
   fun:g_type_create_instance
   fun:g_object_new_internal
   fun:g_object_new_valist
   fun:g_object_new
   fun:get_host_ip
   fun:init_network_info
   fun:gssdp_client_initable_init
   fun:gupnp_context_initable_init
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:network_device_create_context
   fun:create_context
   fun:receive_netlink_message
   fun:on_netlink_message_available
   fun:socket_source_dispatch
   fun:g_main_dispatch
   fun:g_main_context_dispatch
   fun:g_main_context_iterate.isra.0
   fun:g_main_loop_run
   fun:thread_func
   fun:g_thread_proxy
   fun:start_thread
   fun:clone
}
==17397== 160 bytes in 4 blocks are indirectly lost in loss record 4,943 of 5,209
==17397==    at 0x4B5D08F: g_type_create_instance (gtype.c:1845)
==17397==    by 0x4B3F3F4: g_object_new_internal (gobject.c:1827)
==17397==    by 0x4B41337: g_object_new_valist (gobject.c:2152)
==17397==    by 0x4B4168C: g_object_new (gobject.c:1670)
==17397==    by 0x86677DF: get_host_ip (gssdp-client.c:2039)
==17397==    by 0x86677DF: init_network_info (gssdp-client.c:2066)
==17397==    by 0x86677DF: gssdp_client_initable_init (gssdp-client.c:249)
==17397==    by 0x86842E0: gupnp_context_initable_init (gupnp-context.c:185)
==17397==    by 0x502BDC9: g_initable_new_valist (ginitable.c:248)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x86A200A: network_device_create_context (gupnp-linux-context-manager.c:277)
==17397==    by 0x86A267D: create_context (gupnp-linux-context-manager.c:511)
==17397==    by 0x86A2E49: receive_netlink_message (gupnp-linux-context-manager.c:774)
==17397==    by 0x86A232A: on_netlink_message_available (gupnp-linux-context-manager.c:399)
==17397==    by 0x505208A: socket_source_dispatch (gsocket.c:3961)
==17397==    by 0x4A4F56F: g_main_dispatch (gmain.c:3216)
==17397==    by 0x4A4F56F: g_main_context_dispatch (gmain.c:3881)
==17397==    by 0x4A4F8FF: g_main_context_iterate.isra.0 (gmain.c:3954)
==17397==    by 0x4A4FBF2: g_main_loop_run (gmain.c:4148)
==17397==    by 0x62371B2: thread_func (gupnp-simple-igd-thread.c:296)
==17397==    by 0x4A79011: g_thread_proxy (gthread.c:805)
==17397==    by 0x4F624E1: start_thread (pthread_create.c:479)
==17397==    by 0x4C836C2: clone (clone.S:95)
==17397== 
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: indirect
   fun:g_type_create_instance
   fun:g_object_new_internal
   fun:g_object_new_valist
   fun:g_object_new
   fun:get_host_ip
   fun:init_network_info
   fun:gssdp_client_initable_init
   fun:gupnp_context_initable_init
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:network_device_create_context
   fun:create_context
   fun:receive_netlink_message
   fun:on_netlink_message_available
   fun:socket_source_dispatch
   fun:g_main_dispatch
   fun:g_main_context_dispatch
   fun:g_main_context_iterate.isra.0
   fun:g_main_loop_run
   fun:thread_func
   fun:g_thread_proxy
   fun:start_thread
   fun:clone
}
==17397== 512 (160 direct, 352 indirect) bytes in 4 blocks are definitely lost in loss record 5,134 of 5,209
==17397==    at 0x4B5D08F: g_type_create_instance (gtype.c:1845)
==17397==    by 0x4B3F3F4: g_object_new_internal (gobject.c:1827)
==17397==    by 0x4B41337: g_object_new_valist (gobject.c:2152)
==17397==    by 0x502BDAD: g_initable_new_valist (ginitable.c:244)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x502A7B7: g_inet_address_mask_new (ginetaddressmask.c:260)
==17397==    by 0x86677F4: get_host_ip (gssdp-client.c:2041)
==17397==    by 0x86677F4: init_network_info (gssdp-client.c:2066)
==17397==    by 0x86677F4: gssdp_client_initable_init (gssdp-client.c:249)
==17397==    by 0x86842E0: gupnp_context_initable_init (gupnp-context.c:185)
==17397==    by 0x502BDC9: g_initable_new_valist (ginitable.c:248)
==17397==    by 0x502BE7C: g_initable_new (ginitable.c:162)
==17397==    by 0x86A200A: network_device_create_context (gupnp-linux-context-manager.c:277)
==17397==    by 0x86A267D: create_context (gupnp-linux-context-manager.c:511)
==17397==    by 0x86A2E49: receive_netlink_message (gupnp-linux-context-manager.c:774)
==17397==    by 0x86A232A: on_netlink_message_available (gupnp-linux-context-manager.c:399)
==17397==    by 0x505208A: socket_source_dispatch (gsocket.c:3961)
==17397==    by 0x4A4F56F: g_main_dispatch (gmain.c:3216)
==17397==    by 0x4A4F56F: g_main_context_dispatch (gmain.c:3881)
==17397==    by 0x4A4F8FF: g_main_context_iterate.isra.0 (gmain.c:3954)
==17397==    by 0x4A4FBF2: g_main_loop_run (gmain.c:4148)
==17397==    by 0x62371B2: thread_func (gupnp-simple-igd-thread.c:296)
==17397==    by 0x4A79011: g_thread_proxy (gthread.c:805)
==17397== 
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: definite
   fun:g_type_create_instance
   fun:g_object_new_internal
   fun:g_object_new_valist
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:g_inet_address_mask_new
   fun:get_host_ip
   fun:init_network_info
   fun:gssdp_client_initable_init
   fun:gupnp_context_initable_init
   fun:g_initable_new_valist
   fun:g_initable_new
   fun:network_device_create_context
   fun:create_context
   fun:receive_netlink_message
   fun:on_netlink_message_available
   fun:socket_source_dispatch
   fun:g_main_dispatch
   fun:g_main_context_dispatch
   fun:g_main_context_iterate.isra.0
   fun:g_main_loop_run
   fun:thread_func
   fun:g_thread_proxy
}
==17397== LEAK SUMMARY:
==17397==    definitely lost: 202 bytes in 8 blocks
==17397==    indirectly lost: 352 bytes in 12 blocks
==17397==      possibly lost: 0 bytes in 0 blocks
==17397==    still reachable: 68,194 bytes in 370 blocks
==17397==                       of which reachable via heuristic:
==17397==                         length64           : 1,664 bytes in 38 blocks
==17397==                         newarray           : 1,728 bytes in 28 blocks
==17397==         suppressed: 824,856 bytes in 5,246 blocks
==17397== Reachable blocks (those to which a pointer was found) are not shown.
==17397== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17397== 
==17397== For lists of detected and suppressed errors, rerun with: -s
==17397== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 3 from 3)
==17285== 
==17285== HEAP SUMMARY:
==17285==     in use at exit: 550,397 bytes in 1,405 blocks
==17285==   total heap usage: 48,284 allocs, 46,879 frees, 24,252,398 bytes allocated
==17285== 
==17285== LEAK SUMMARY:
==17285==    definitely lost: 0 bytes in 0 blocks
==17285==    indirectly lost: 0 bytes in 0 blocks
==17285==      possibly lost: 0 bytes in 0 blocks
==17285==    still reachable: 0 bytes in 0 blocks
==17285==                       of which reachable via heuristic:
==17285==                         length64           : 80 bytes in 2 blocks
==17285==                         newarray           : 1,552 bytes in 17 blocks
==17285==         suppressed: 546,557 bytes in 1,371 blocks
==17285== 
==17285== For lists of detected and suppressed errors, rerun with: -s
==17285== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/gssdp#10