All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 2/8] tests/qtest/migration: Change validate_uuid test to not trigger exit(1)
Date: Tue, 10 Mar 2026 15:59:04 -0400	[thread overview]
Message-ID: <abB4CCl_VpmzEmT-@x1.local> (raw)
In-Reply-To: <20260310135540.8679-2-farosas@suse.de>

On Tue, Mar 10, 2026 at 10:55:34AM -0300, Fabiano Rosas wrote:
> The UUID validation happens early enough during the migration process
> that the incoming coroutine hasn't yet yielded once so the
> EXIT_FAILURE from the coroutine can trigger ASAN leak detection due to
> the temporary socket from qio_net_listener_channel_func() still having
> an elevated refcount.
> 
> Direct leak of 400 byte(s) in 1 object(s) allocated from:
>     #0 0x55e668890a07 in malloc asan_malloc_linux.cpp:68:3
>     #1 0x7f3c7e2b6648 in g_malloc ../glib/gmem.c:130
>     #2 0x55e66a8ef05f in object_new_with_type ../qom/object.c:767:15
>     #3 0x55e66a8ef178 in object_new ../qom/object.c:789:12
>     #4 0x55e66a93bcc6 in qio_channel_socket_new ../io/channel-socket.c:70:31
>     #5 0x55e66a93f34f in qio_channel_socket_accept ../io/channel-socket.c:401:12
>     #6 0x55e66a96752a in qio_net_listener_channel_func ../io/net-listener.c:64:12
>     #7 0x55e66a94bdac in qio_channel_fd_source_dispatch ../io/channel-watch.c:84:12
>     #8 0x7f3c7e2adf4b in g_main_dispatch ../glib/gmain.c:3476
>     #9 0x7f3c7e2adf4b in g_main_context_dispatch_unlocked ../glib/gmain.c:4284
>     #10 0x7f3c7e2b00c8 in g_main_context_dispatch ../glib/gmain.c:4272
> 
> Direct leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x55e668890a07 in malloc asan_malloc_linux.cpp:68:3
>     #1 0x7f3c7e2b6648 in g_malloc ../glib/gmem.c:130
>     #2 0x7f3c7e2ad40c in g_source_set_callback ../glib/gmain.c:1879
>     #3 0x55e66a95c4d2 in qio_channel_add_watch_full ../io/channel.c:416:5
>     #4 0x55e66a95c5a9 in qio_channel_add_watch_source ../io/channel.c:444:10
>     #5 0x55e66a96380c in qio_net_listener_watch ../io/net-listener.c:166:46
>     #6 0x55e66a96496a in qio_net_listener_set_client_func_internal ../io/net-listener.c:275:5
>     #7 0x55e66a963e79 in qio_net_listener_set_client_func_full ../io/net-listener.c:284:5
>     #8 0x55e669e1b3bb in socket_connect_incoming ../migration/socket.c:165:5
>     #9 0x55e669d26b9f in migration_connect_incoming ../migration/channel.c:83:13
>     #10 0x55e669d5f6d2 in qemu_setup_incoming_migration ../migration/migration.c:672:5
>     #11 0x55e669d5f344 in qmp_migrate_incoming ../migration/migration.c:1771:5
> 
> This is inconsequential in production, but let's give ourselves an
> easier time and avoid this situation when testing. The uuid_error test
> doesn't really need to check the exit code, just the migration state
> would be sufficient. Set exit-on-error=false for this test.
> 
> While looking at this, add a comment to the source explaining that the
> incoming coroutine may block the main loop for a (longer than
> expected) while.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu



  reply	other threads:[~2026-03-10 19:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 13:55 [PATCH 1/8] tests/qtest/migration: Fix leak of migration tests data Fabiano Rosas
2026-03-10 13:55 ` [PATCH 2/8] tests/qtest/migration: Change validate_uuid test to not trigger exit(1) Fabiano Rosas
2026-03-10 19:59   ` Peter Xu [this message]
2026-03-11 10:34   ` Prasad Pandit
2026-03-10 13:55 ` [PATCH 3/8] tests/qtest/migration: Fix misuse of listen_uri Fabiano Rosas
2026-03-10 15:48   ` Lukas Straub
2026-03-10 13:55 ` [PATCH 4/8] tests/qtest/migration: Stop invoking migrate_incoming from hooks Fabiano Rosas
2026-03-10 15:47   ` Lukas Straub
2026-03-10 13:55 ` [PATCH 5/8] tests/qtest/migration: Force exit-on-error=false when appropriate Fabiano Rosas
2026-03-10 20:46   ` Peter Xu
2026-03-10 21:14     ` Fabiano Rosas
2026-03-11 10:36       ` Prasad Pandit
2026-03-11 15:40       ` Peter Xu
2026-03-10 13:55 ` [PATCH 6/8] io: Fix TLS bye task leak Fabiano Rosas
2026-03-10 14:29   ` Daniel P. Berrangé
2026-03-10 13:55 ` [PATCH 7/8] tests/qtest/migration: Fix leak in CPR exec test Fabiano Rosas
2026-03-10 20:46   ` Peter Xu
2026-03-11  9:56   ` Prasad Pandit
2026-03-10 13:55 ` [PATCH 8/8] migration/multifd: Fix leaks of TLS error objects Fabiano Rosas
2026-03-10 20:49   ` Peter Xu
2026-03-11  9:32   ` Prasad Pandit
2026-03-10 19:47 ` [PATCH 1/8] tests/qtest/migration: Fix leak of migration tests data Peter Xu
2026-03-11 11:56 ` Prasad Pandit
2026-03-11 12:57   ` Fabiano Rosas

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=abB4CCl_VpmzEmT-@x1.local \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.