{"id":2230495,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230495/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429190550.20122-3-farosas@suse.de/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260429190550.20122-3-farosas@suse.de>","date":"2026-04-29T19:05:47","name":"[v1,2/5] tests/qtest/dbus-vmstate: Mute Glib complaints about g_unsetenv thread-safety","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4499de23b0f61756d63084e96feee70184a4e870","submitter":{"id":85343,"url":"http://patchwork.ozlabs.org/api/1.1/people/85343/?format=json","name":"Fabiano Rosas","email":"farosas@suse.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429190550.20122-3-farosas@suse.de/mbox/","series":[{"id":502137,"url":"http://patchwork.ozlabs.org/api/1.1/series/502137/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502137","date":"2026-04-29T19:05:45","name":"tests/qtest: Re-enable dbus-vmstate","version":1,"mbox":"http://patchwork.ozlabs.org/series/502137/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230495/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230495/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=fWoIChkE;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=lIOiwFlE;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=fWoIChkE;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=lIOiwFlE;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)","smtp-out1.suse.de;\n dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fWoIChkE;\n dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=lIOiwFlE"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5Rg1288wz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 05:09:01 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIAEa-0001nN-1m; Wed, 29 Apr 2026 15:06:08 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wIAEY-0001mR-Gr\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 15:06:06 -0400","from smtp-out1.suse.de ([195.135.223.130])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1wIAEW-0000Nh-GQ\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 15:06:06 -0400","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 16F656A81A;\n Wed, 29 Apr 2026 19:05:57 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B3317593B1;\n Wed, 29 Apr 2026 19:05:55 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id MMhBIJNW8mm/eQAAD6G6ig\n (envelope-from <farosas@suse.de>); Wed, 29 Apr 2026 19:05:55 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777489557;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5Q11033ixT9HAxDsw1JBkEAYwLqftpwNv4tC1cNzWxc=;\n b=fWoIChkEdsZIGGjQyYF+d9cMjEAw+7I6okZFA8A2NMBuYbyusXkNOURG5VsSii5DZIUc1v\n 0FH935L9kyl1hhU/ImlfwhIDQrgZAPWKfYj8baVg+rRYLWZ4R6K9GMhIm7wuy33anU4qYQ\n G9r4x58wZGRV8uel4sETiF2qzp7uwJQ=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777489557;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5Q11033ixT9HAxDsw1JBkEAYwLqftpwNv4tC1cNzWxc=;\n b=lIOiwFlEO/SIqa/N/BLmB4/Dxsb+Mk8mzZbhahih0SC6pgzlyq7FBqGxDh+qex8A1egxxj\n rJNK2Zqs6J6PToCg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777489557;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5Q11033ixT9HAxDsw1JBkEAYwLqftpwNv4tC1cNzWxc=;\n b=fWoIChkEdsZIGGjQyYF+d9cMjEAw+7I6okZFA8A2NMBuYbyusXkNOURG5VsSii5DZIUc1v\n 0FH935L9kyl1hhU/ImlfwhIDQrgZAPWKfYj8baVg+rRYLWZ4R6K9GMhIm7wuy33anU4qYQ\n G9r4x58wZGRV8uel4sETiF2qzp7uwJQ=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777489557;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5Q11033ixT9HAxDsw1JBkEAYwLqftpwNv4tC1cNzWxc=;\n b=lIOiwFlEO/SIqa/N/BLmB4/Dxsb+Mk8mzZbhahih0SC6pgzlyq7FBqGxDh+qex8A1egxxj\n rJNK2Zqs6J6PToCg=="],"From":"Fabiano Rosas <farosas@suse.de>","To":"qemu-devel@nongnu.org","Cc":"Peter Xu <peterx@redhat.com>, marcandre.lureau@redhat.com,\n Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>","Subject":"[PATCH v1 2/5] tests/qtest/dbus-vmstate: Mute Glib complaints about\n g_unsetenv thread-safety","Date":"Wed, 29 Apr 2026 16:05:47 -0300","Message-ID":"<20260429190550.20122-3-farosas@suse.de>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260429190550.20122-1-farosas@suse.de>","References":"<20260429190550.20122-1-farosas@suse.de>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Spamd-Result":"default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%];\n NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[];\n R_MISSING_CHARSET(0.50)[];\n R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n MX_GOOD(-0.01)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+];\n RCVD_VIA_SMTP_AUTH(0.00)[];\n DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim];\n DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[];\n FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5];\n RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:mid,suse.de:dkim,suse.de:email,gnome.org:url];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n DKIM_TRACE(0.00)[suse.de:+]","X-Rspamd-Action":"no action","X-Spam-Score":"-3.01","X-Rspamd-Server":"rspamd1.dmz-prg2.suse.org","X-Rspamd-Queue-Id":"16F656A81A","Received-SPF":"pass client-ip=195.135.223.130; envelope-from=farosas@suse.de;\n helo=smtp-out1.suse.de","X-Spam_score_int":"-43","X-Spam_score":"-4.4","X-Spam_bar":"----","X-Spam_report":"(-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"TLDR: GLib is bugged, the dbus-vmstate-test spams debug messages\nunconditionally. Mute them.\n\nGLib is trying to protect against the lack of thread-safety of\nsetenv/unsetsenv functions by warning when those functions were\ninvoked after a thread has been started.\nhttps://gitlab.gnome.org/GNOME/glib/issues/715\n\nUnfortunately:\n1) GLib itself starts a thread pool via _g_dbus_initialize when\nworking around a bug in its type dependency chain. This happens in\nmany places, but the test triggers it via\ng_dbus_address_get_for_bus_sync.\nhttps://bugzilla.gnome.org/show_bug.cgi?id=627724\n\n2) GLib itself calls g_unsetenv after the test calls g_test_dbus_up.\n\n3) The debug message at g_unsetenv is issued to the G_LOG_DOMAIN\ndefined while compiling the library, i.e \"GLib\", but this domain is\nnever initialized, so the log functions go into a fallback chain that\nresults in ignoring the G_MESSAGES_DEBUG environment variable, causing\nthe debug messages to not be suppressed when they should.\n\nMute the messages by implementing a handler for G_LOG_LEVEL_DEBUG\nin the \"GLib\" log domain and honoring G_MESSAGES_DEBUG.\n\nSigned-off-by: Fabiano Rosas <farosas@suse.de>\n---\n tests/qtest/dbus-vmstate-test.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)","diff":"diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-test.c\nindex 90c050b448..51c5fdb995 100644\n--- a/tests/qtest/dbus-vmstate-test.c\n+++ b/tests/qtest/dbus-vmstate-test.c\n@@ -357,12 +357,33 @@ test_dbus_vmstate_missing_dst(char *name, MigrateCommon *args)\n     g_test_trap_assert_passed();\n }\n \n+static void log_func(const gchar *log_domain, GLogLevelFlags log_level,\n+                     const gchar *message, gpointer user_data)\n+{\n+    const gchar *domains;\n+\n+    assert(log_level & G_LOG_LEVEL_DEBUG);\n+\n+    domains = getenv(\"G_MESSAGES_DEBUG\");\n+    if (!domains || (!strstr(domains, \"GLib\") && !strstr(domains, \"all\"))) {\n+        return;\n+    }\n+    g_log_default_handler(\"GLib\", G_LOG_LEVEL_DEBUG, message, NULL);\n+}\n+\n int\n main(int argc, char **argv)\n {\n     GError *err = NULL;\n     int ret;\n \n+    /*\n+     * GLib currently emits debug messages that ignore\n+     * G_MESSAGES_DEBUG. Set a custom log handler to work around the\n+     * issue.\n+     */\n+    g_log_set_handler(\"GLib\", G_LOG_LEVEL_DEBUG, log_func, NULL);\n+\n     g_test_init(&argc, &argv, NULL);\n \n     workdir = g_dir_make_tmp(\"dbus-vmstate-test-XXXXXX\", &err);\n","prefixes":["v1","2/5"]}