All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Cc: Peter Xu <peterx@redhat.com>
Subject: Re: leaks in migration-test
Date: Mon, 09 Mar 2026 09:06:45 -0300	[thread overview]
Message-ID: <87ldg11a22.fsf@suse.de> (raw)
In-Reply-To: <CAFEAcA_3ed-jb+P8SVh6Pj8uGM+aYcCHTZgvzzHEUFW5zSn3rQ@mail.gmail.com>

Peter Maydell <peter.maydell@linaro.org> writes:

> I'm continuing to work through leaks reported during "make check".
> Some of them come from the migration-test. (For these to actually
> appear in the log you need to run with QTEST_LOG=1, otherwise the
> migration test framework will send stderr to /dev/null and the
> tests will fail without printing the leak report.)

I'm pretty sure something changed that caused this. In the past the
leaks would be reported by the parent migration-test binary, so it
wouldn't matter where QEMU sends stderr. I don't know if it's QEMU's
build environment or something on my machine.

I'm also seeing in dmesg after migration-test aborts, which didn't use
to be the case:
Process 23732(migration-test) has RLIMIT_CORE set to 1

Anyway, the redirect to /dev/null is a pain for other reasons as well,
we discussed adding an output filter step to qtest like the iotests
have, but I couldn't find the time to work on it yet.

>
> I did find this comment in qmp_migrate_incoming():
>
>      * NOTE: QEMU _might_ leak this refcount in some failure paths, but
>      * that's OK.  This is the minimum change we need to at least making
>      * sure success case is clean on the refcount.  We can try harder to
>      * make it accurate for any kind of failures, but it might be an
>      * overkill and doesn't bring us much benefit.
>

This is silly, but I don't think is what's causing this leak. AFAIK, it
only causes problems in some very-cornery-cases when there are races
involved. I have a patch for this one as well. Again, lacking time.

> The issue with this is that it means we need to suppress leak
> reports in the whole migration-test binary, which means the
> migration code will get no leak-detection coverage at all.
> (Not all the leak paths have qmp_migrate_incoming() in their backtrace,
> as you can see below.)
>
> We're getting pretty close to being able to get a complete "make check"
> run with the leak sanitizer enabled, so it would be nice to not have
> to suppress leak reports for this test at some point.
>

Go team! Let me just put the migration pull-request out and I'll look
into this.

> Full leak report below:
>
> Direct leak of 400 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x61401b586c3c in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:767:15
>     #3 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #4 0x61401b5dabf6 in qio_channel_socket_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:70:31
>     #5 0x61401b5de78f in qio_channel_socket_accept
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:401:12
>     #6 0x61401b60a10d in qio_net_listener_channel_func
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:64:12
>     #7 0x61401b5ec4ac in qio_channel_fd_source_dispatch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-watch.c:84:12
>     #8 0x787075a9f45d
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d45d) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #9 0x787075a9f6cf in g_main_context_dispatch
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d6cf) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #10 0x61401c03c809 in glib_pollfds_poll
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:290:9
>     #11 0x61401c03b2c4 in os_host_main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:313:5
>     #12 0x61401c03af01 in main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:592:11
>     #13 0x61401a6f1b06 in qemu_main_loop
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/runstate.c:943:9
>     #14 0x61401bcf5d1d in qemu_default_main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:50:14
>     #15 0x61401bcf5c3e in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:93:9
>     #16 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #17 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #18 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Direct leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a97240 in g_source_set_callback
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x55240) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x61401b5fe2a2 in qio_channel_add_watch_full
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel.c:416:5
>     #4 0x61401b5fe379 in qio_channel_add_watch_source
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel.c:444:10
>     #5 0x61401b605f44 in qio_net_listener_watch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:166:46
>     #6 0x61401b6071df in qio_net_listener_set_client_func_internal
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:275:5
>     #7 0x61401b606629 in qio_net_listener_set_client_func_full
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:284:5
>     #8 0x61401a8721e2 in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:165:5
>     #9 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #10 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #11 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #12 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #13 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #14 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #15 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #16 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #17 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 168 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a8
> 06eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x61401b586c3c in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:767:15
>     #3 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #4 0x61401b6040ab in qio_net_listener_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:40:33
>     #5 0x61401a871fdc in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:144:32
>     #6 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #7 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #8 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #9 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #10 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #11 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #12 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #13 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #14 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 96 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a8645a in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4445a) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #4 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #5 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #6 0x61401b6040ab in qio_net_listener_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:40:33
>     #7 0x61401a871fdc in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:144:32
>     #8 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #9 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #10 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #11 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #12 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #13 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #14 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #15 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #16 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 96 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a8645a in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4445a) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #4 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #5 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #6 0x61401b5dabf6 in qio_channel_socket_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:70:31
>     #7 0x61401b5de78f in qio_channel_socket_accept
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:401:12
>     #8 0x61401b60a10d in qio_net_listener_channel_func
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:64:12
>     #9 0x61401b5ec4ac in qio_channel_fd_source_dispatch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-watch.c:84:12
>     #10 0x787075a9f45d
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d45d) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #11 0x787075a9f6cf in g_main_context_dispatch
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d6cf) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #12 0x61401c03c809 in glib_pollfds_poll
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:290:9
>     #13 0x61401c03b2c4 in os_host_main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:313:5
>     #14 0x61401c03af01 in main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:592:11
>     #15 0x61401a6f1b06 in qemu_main_loop
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/runstate.c:943:9
>     #16 0x61401bcf5d1d in qemu_default_main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:50:14
>     #17 0x61401bcf5c3e in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:93:9
>     #18 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #19 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #20 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8840 in realloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86840)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5819 in g_realloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63819) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a863f7
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x443f7) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x787075a86492 in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x44492) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #4 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #5 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #6 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #7 0x61401b5dabf6 in qio_channel_socket_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:70:31
>     #8 0x61401b5de78f in qio_channel_socket_accept
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:401:12
>     #9 0x61401b60a10d in qio_net_listener_channel_func
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:64:12
>     #10 0x61401b5ec4ac in qio_channel_fd_source_dispatch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-watch.c:84:12
>     #11 0x787075a9f45d
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d45d) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #12 0x787075a9f6cf in g_main_context_dispatch
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d6cf) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #13 0x61401c03c809 in glib_pollfds_poll
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:290:9
>     #14 0x61401c03b2c4 in os_host_main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:313:5
>     #15 0x61401c03af01 in main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:592:11
>     #16 0x61401a6f1b06 in qemu_main_loop
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/runstate.c:943:9
>     #17 0x61401bcf5d1d in qemu_default_main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:50:14
>     #18 0x61401bcf5c3e in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:93:9
>     #19 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #20 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #21 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a860d in calloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f8660d)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5771 in g_malloc0
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63771) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a8640c
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4440c) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x787075a86492 in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x44492) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #4 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #5 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #6 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #7 0x61401b6040ab in qio_net_listener_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:40:33
>     #8 0x61401a871fdc in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:144:32
>     #9 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #10 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #11 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #12 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #13 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #14 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #15 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #16 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #17 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8840 in realloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86840)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5819 in g_realloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63819) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a863f7
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x443f7) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x787075a86492 in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x44492) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #4 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #5 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #6 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #7 0x61401b6040ab in qio_net_listener_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:40:33
>     #8 0x61401a871fdc in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:144:32
>     #9 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #10 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #11 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #12 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #13 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #14 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #15 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #16 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #17 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a860d in calloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f8660d)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5771 in g_malloc0
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63771) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075a8640c
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4440c) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x787075a86492 in g_hash_table_new_full
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x44492) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #4 0x61401b585297 in object_initialize_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:568:23
>     #5 0x61401b586c7d in object_new_with_type
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:774:5
>     #6 0x61401b586d60 in object_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../qom/object.c:789:12
>     #7 0x61401b5dabf6 in qio_channel_socket_new
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:70:31
>     #8 0x61401b5de78f in qio_channel_socket_accept
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-socket.c:401:12
>     #9 0x61401b60a10d in qio_net_listener_channel_func
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:64:12
>     #10 0x61401b5ec4ac in qio_channel_fd_source_dispatch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-watch.c:84:12
>     #11 0x787075a9f45d
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d45d) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #12 0x787075a9f6cf in g_main_context_dispatch
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d6cf) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #13 0x61401c03c809 in glib_pollfds_poll
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:290:9
>     #14 0x61401c03b2c4 in os_host_main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:313:5
>     #15 0x61401c03af01 in main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:592:11
>     #16 0x61401a6f1b06 in qemu_main_loop
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/runstate.c:943:9
>     #17 0x61401bcf5d1d in qemu_default_main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:50:14
>     #18 0x61401bcf5c3e in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:93:9
>     #19 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #20 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #21 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 26 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075aba498 in g_strdup
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x78498) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x61401b604206 in g_strdup_inline
> /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
>     #4 0x61401b604206 in qio_net_listener_set_name
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:49:22
>     #5 0x61401a872017 in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:149:5
>     #6 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #7 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #8 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #9 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #10 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #11 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #12 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #13 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #14 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 26 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8423 in malloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86423)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa4ac9 in g_malloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62ac9) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x787075aba498 in g_strdup
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x78498) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #3 0x61401b5fbeb6 in g_strdup_inline
> /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
>     #4 0x61401b5fbeb6 in qio_channel_set_name
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel.c:47:17
>     #5 0x61401a87233c in socket_accept_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:129:5
>     #6 0x61401b60a4c8 in qio_net_listener_channel_func
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:79:9
>     #7 0x61401b5ec4ac in qio_channel_fd_source_dispatch
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/channel-watch.c:84:12
>     #8 0x787075a9f45d
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d45d) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #9 0x787075a9f6cf in g_main_context_dispatch
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d6cf) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #10 0x61401c03c809 in glib_pollfds_poll
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:290:9
>     #11 0x61401c03b2c4 in os_host_main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:313:5
>     #12 0x61401c03af01 in main_loop_wait
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../util/main-loop.c:592:11
>     #13 0x61401a6f1b06 in qemu_main_loop
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/runstate.c:943:9
>     #14 0x61401bcf5d1d in qemu_default_main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:50:14
>     #15 0x61401bcf5c3e in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:93:9
>     #16 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #17 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #18 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 24 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a860d in calloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f8660d)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5771 in g_malloc0
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63771) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x61401b604c4e in qio_net_listener_add
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:237:41
>     #3 0x61401b6045ac in qio_net_listener_open_sync
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:126:13
>     #4 0x61401a872068 in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:157:9
>     #5 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #6 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #7 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #8 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #9 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #10 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #11 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #12 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #13 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> Indirect leak of 8 byte(s) in 1 object(s) allocated from:
>     #0 0x6140191a8840 in realloc
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1f86840)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>     #1 0x787075aa5819 in g_realloc
> (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63819) (BuildId:
> 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
>     #2 0x61401b604b85 in qio_net_listener_add
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:234:24
>     #3 0x61401b6045ac in qio_net_listener_open_sync
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../io/net-listener.c:126:13
>     #4 0x61401a872068 in socket_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/socket.c:157:9
>     #5 0x61401a767363 in migration_connect_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/channel.c:83:13
>     #6 0x61401a7a4dae in qemu_setup_incoming_migration
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:702:5
>     #7 0x61401a7a49d5 in qmp_migrate_incoming
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../migration/migration.c:1779:5
>     #8 0x61401a5ee910 in qmp_x_exit_preconfig
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:2833:13
>     #9 0x61401a5f4c4a in qemu_init
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/vl.c:3849:9
>     #10 0x61401bcf5bcc in main
> /home/pm215/qemu/build/x86-tgt-san-dbg/../../system/main.c:71:5
>     #11 0x78707362a1c9 in __libc_start_call_main
> csu/../sysdeps/nptl/libc_start_call_main.h:58:16
>     #12 0x78707362a28a in __libc_start_main csu/../csu/libc-start.c:360:3
>     #13 0x61401910d5d4 in _start
> (/home/pm215/qemu/build/x86-tgt-san-dbg/qemu-system-x86_64+0x1eeb5d4)
> (BuildId: 49f2401988ff3a806eedf30b7738ac61bcd9af6a)
>
> SUMMARY: AddressSanitizer: 1004 byte(s) leaked in 13 allocation(s).
>
>
> thanks
> -- PMM


  parent reply	other threads:[~2026-03-09 12:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08 19:22 leaks in migration-test Peter Maydell
2026-03-08 23:42 ` Pierrick Bouvier
2026-03-09  9:42   ` Peter Maydell
2026-03-09 16:10     ` Pierrick Bouvier
2026-03-09 12:06 ` Fabiano Rosas [this message]
2026-03-09 12:12   ` Peter Maydell
2026-03-09 20:31   ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ldg11a22.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.