QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>
Subject: Re: [PATCH for-5.0 1/3] migration: fix cleanup_bh leak on resume
Date: Thu, 26 Mar 2020 03:40:09 +0100
Message-ID: <874kub96uu.fsf@secure.laptop> (raw)
In-Reply-To: <20200325184723.2029630-2-marcandre.lureau@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Wed, 25 Mar 2020 19:47:21 +0100")

Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> Since commit 8c6b0356b53977bcfdea5299db07884915425b0c ("util/async:
> make bh_aio_poll() O(1)"), migration-test reveals a leak:
>
> QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
> tests/qtest/migration-test  -p /x86_64/migration/postcopy/recovery
> tests/qtest/libqtest.c:140: kill_qemu() tried to terminate QEMU
> process but encountered exit status 1 (expected 0)
>
> =================================================================
> ==2082571==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 40 byte(s) in 1 object(s) allocated from:
>     #0 0x7f25971dfc58 in __interceptor_malloc (/lib64/libasan.so.5+0x10dc58)
>     #1 0x7f2596d08358 in g_malloc (/lib64/libglib-2.0.so.0+0x57358)
>     #2 0x560970d006f8 in qemu_bh_new /home/elmarco/src/qemu/util/main-loop.c:532
>     #3 0x5609704afa02 in migrate_fd_connect
> /home/elmarco/src/qemu/migration/migration.c:3407
>     #4 0x5609704b6b6f in migration_channel_connect
> /home/elmarco/src/qemu/migration/channel.c:92
>     #5 0x5609704b2bfb in socket_outgoing_migration
> /home/elmarco/src/qemu/migration/socket.c:108
>     #6 0x560970b9bd6c in qio_task_complete /home/elmarco/src/qemu/io/task.c:196
>     #7 0x560970b9aa97 in qio_task_thread_result
> /home/elmarco/src/qemu/io/task.c:111
>     #8 0x7f2596cfee3a  (/lib64/libglib-2.0.so.0+0x4de3a)
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>



  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 18:47 [PATCH for-5.0 0/3] Memory leak fixes Marc-André Lureau
2020-03-25 18:47 ` [PATCH for-5.0 1/3] migration: fix cleanup_bh leak on resume Marc-André Lureau
2020-03-26  2:40   ` Juan Quintela [this message]
2020-03-25 18:47 ` [PATCH for-5.0 2/3] qmp: fix leak on callbacks that return both value and error Marc-André Lureau
2020-03-30 14:59   ` Markus Armbruster
2020-03-25 18:47 ` [PATCH for-5.0 3/3] object-add: don't create return value if failed Marc-André Lureau
2020-03-25 20:43   ` Philippe Mathieu-Daudé
2020-03-26  9:42   ` Paolo Bonzini
2020-03-30 14:48     ` Markus Armbruster

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=874kub96uu.fsf@secure.laptop \
    --to=quintela@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@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

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git