Bug 2173639 - qemu tests/unit/test-vmstate crashes in g_tree_foreach
Summary: qemu tests/unit/test-vmstate crashes in g_tree_foreach
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2173357
TreeView+ depends on / blocked
 
Reported: 2023-02-27 15:07 UTC by Richard W.M. Jones
Modified: 2023-02-27 21:19 UTC (History)
11 users (show)

Fixed In Version: qemu-7.2.0-7.fc39
Clone Of:
Environment:
Last Closed: 2023-02-27 21:19:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab qemu-project qemu issues 1518 0 None opened qemu tests/unit/test-vmstate crashes in g_tree_foreach 2023-02-27 15:24:51 UTC

Description Richard W.M. Jones 2023-02-27 15:07:10 UTC
Description of problem:

qemu is not buildable in Rawhide at the moment, failing in
these tests:

214/658 qemu:unit / test-vmstate                                                  ERROR           0.22s   killed by signal 11 SIGSEGV
317/658 qemu:qtest+qtest-i386 / qtest-i386/rtl8139-test                           ERROR           0.28s   2 subtests passed
588/658 qemu:qtest+qtest-x86_64 / qtest-x86_64/rtl8139-test                       ERROR           0.45s   2 subtests passed

I reproduced the issue locally and the stack trace is:

#0  g_tree_foreach (user_data=0x7fffa23ccbc0, func=0x55a834fe3770 <diff_tree>, 
    tree=<optimized out>) at ../glib/gtree.c:1132
#1  g_tree_foreach (tree=<optimized out>, func=0x55a834fe3770 <diff_tree>, 
    user_data=0x7fffa23ccbc0) at ../glib/gtree.c:1117
#2  0x000055a834fe382c in compare_trees (tree1=0x55a836723bf0, 
    tree2=0x55a836723f50, 
    function=function@entry=0x55a834fe3570 <match_interval_mapping_node>)
    at ../tests/unit/test-vmstate.c:1085
#3  0x000055a834fee265 in diff_domain (d2=0x55a836709310, d1=0x55a836708fd0)
    at ../tests/unit/test-vmstate.c:1093
#4  test_gtree_load_domain () at ../tests/unit/test-vmstate.c:1138
#5  0x00007f0eef39d32e in test_case_run (tc=0x55a836724150)
    at ../glib/gtestutils.c:3108
#6  g_test_run_suite_internal (suite=suite@entry=0x55a8367056e0, 
    path=path@entry=0x0) at ../glib/gtestutils.c:3203
#7  0x00007f0eef39cf03 in g_test_run_suite_internal (
    suite=suite@entry=0x55a836705090, path=path@entry=0x0)
    at ../glib/gtestutils.c:3222
#8  0x00007f0eef39cf03 in g_test_run_suite_internal (
    suite=suite@entry=0x55a8366ff670, path=path@entry=0x0)
    at ../glib/gtestutils.c:3222
#9  0x00007f0eef39cf03 in g_test_run_suite_internal (
    suite=suite@entry=0x55a836700140, path=path@entry=0x0)
#10 0x00007f0eef39d8c2 in g_test_run_suite (suite=0x55a836700140)
    at ../glib/gtestutils.c:3302
#11 0x00007f0eef397c40 in g_test_run () at ../glib/gtestutils.c:2409
#12 g_test_run () at ../glib/gtestutils.c:2396
#13 0x000055a834fe2645 in main (argc=<optimized out>, argv=<optimized out>)
    at ../tests/unit/test-vmstate.c:1523

Version-Release number of selected component (if applicable):

qemu-7.2.0-7.fc39
glib2-2.75.3-4.fc39

How reproducible:

100%

Steps to Reproduce:

See: https://koji.fedoraproject.org/koji/taskinfo?taskID=98065780

Comment 1 Dr. David Alan Gilbert 2023-02-27 15:22:03 UTC
This looks like Eric's compare_tree's function that's upset.

Comment 2 Richard W.M. Jones 2023-02-27 15:24:51 UTC
Upstream issue:
https://gitlab.com/qemu-project/qemu/-/issues/1518

Comment 3 Eric Auger 2023-02-27 15:55:03 UTC
I remember Marc-Andre sent a fix a long time ago related to those tests but this fell through the cracks and has never been upstreamed. There is a good likelyhood this bug is related.

https://lore.kernel.org/qemu-devel/20200827161826.1165971-1-marcandre.lureau@redhat.com/#t

I will take this in charge.

Comment 4 Richard W.M. Jones 2023-02-27 16:06:25 UTC
Can confirm that applying
https://lore.kernel.org/qemu-devel/20200827161826.1165971-1-marcandre.lureau@redhat.com/#t
fixes the problem.

Comment 5 Fedora Update System 2023-02-27 21:03:26 UTC
FEDORA-2023-c3e82ef376 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c3e82ef376

Comment 6 Fedora Update System 2023-02-27 21:19:34 UTC
FEDORA-2023-c3e82ef376 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.