From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: David Woodhouse <dwmw2@infradead.org>, qemu-devel@nongnu.org
Cc: Phil Dennis-Jordan <phil@philjordan.eu>,
Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: Re: [PULL 23/29] ui & main loop: Redesign of system-specific main thread event handling
Date: Tue, 1 Apr 2025 13:58:46 +0200 [thread overview]
Message-ID: <9ae8882b-35d1-489a-9f5c-579bd9ae89df@linaro.org> (raw)
In-Reply-To: <aedc72a0e5dabe190427dd536b2882f0ca8713c4.camel@infradead.org>
On 1/4/25 13:43, David Woodhouse wrote:
> On Tue, 2025-04-01 at 13:30 +0200, Philippe Mathieu-Daudé wrote:
>> On 1/4/25 13:18, Philippe Mathieu-Daudé wrote:
>>> Hi David,
>>>
>>> On 8/1/25 14:51, David Woodhouse wrote:
>>>> On Tue, 2024-12-31 at 21:22 +0100, Philippe Mathieu-Daudé wrote:
>>>>>
>>>>> This change tidies up main thread management to be more
>>>>> flexible.
>>>>>
>>>>> * The qemu_main global function pointer is a custom function
>>>>> for the
>>>>> main thread, and it may now be NULL. When it is, the main
>>>>> thread
>>>>> runs the main Qemu loop. This represents the traditional
>>>>> setup.
>>>>> * When non-null, spawning the main Qemu event loop on a
>>>>> separate
>>>>> thread is now done centrally rather than inside the Cocoa
>>>>> UI code.
>>>>> * For most platforms, qemu_main is indeed NULL by default,
>>>>> but on
>>>>> Darwin, it defaults to a function that runs the CFRunLoop.
>>>>> * The Cocoa UI sets qemu_main to a function which runs the
>>>>> NSApplication event handling runloop, as is usual for a
>>>>> Cocoa app.
>>>>> * The SDL UI overrides the qemu_main function to NULL, thus
>>>>> specifying that Qemu's main loop must run on the main
>>>>> thread.
>>>>> * The GTK UI also overrides the qemu_main function to NULL.
>>>>> * For other UIs, or in the absence of UIs, the platform's
>>>>> default
>>>>> behaviour is followed.
>>>>
>>>> When exiting an emulated Xen guest with <Ctrl-a x> on the
>>>> console, I
>>>> now see:
>>>>
>>>> (gdb) run
>>>> Starting program: /home/dwmw2/git/qemu/ball/qemu-system-x86_64 -
>>>> display none -vga none -serial mon:stdio -machine q35 -accel
>>>> kvm,xen-
>>>> version=0x4000a,kernel-irqchip=split -smp 2 -kernel /home/dwmw2/
>>>> avocado/data/cache/by_name/bzImage -append printk.time=0\
>>>> root=/dev/
>>>> xvda\ console=ttyS0\ xen_emul_unplug=ide-disks\
>>>> xen_no_vector_callback\ noapic\ loglevel=0 -drive
>>>> file=/home/dwmw2/
>>>> avocado/data/cache/by_name/
>>>> rootfs.ext4,if=none,snapshot=on,format=raw,id=drv0 -device xen-
>>>> disk,drive=drv0,vdev=xvda -device virtio-net-pci,netdev=unet -
>>>> netdev
>>>> user,id=unet,hostfwd=:127.0.0.1:0-:22
>>>>
>>>> Starting syslogd: OK
>>>> Starting klogd: OK
>>>> Running sysctl: OK
>>>> Saving 256 bits of non-creditable seed for next boot
>>>> Starting network: OK
>>>> Starting dhcpcd...
>>>> no such user dhcpcd
>>>> dhcpcd-9.4.1 starting
>>>> no interfaces have a carrier
>>>> forked to background, child pid 111
>>>> Starting dropbear sshd: OK
>>>> #
>>>> QEMU: Terminated
>>>> qemu-system-x86_64: ../block/block-backend.c:1290: blk_in_drain:
>>>> Assertion `qemu_in_main_thread()' failed.
>>>>
>>>> Thread 1 "qemu-system-x86" received signal SIGABRT, Aborted.
>>>> 0x00007ffff5ffc724 in __pthread_kill_implementation () from
>>>> /lib64/
>>>> libc.so.6
>>>> (gdb) bt
>>>> #0 0x00007ffff5ffc724 in __pthread_kill_implementation () at
>>>> /lib64/
>>>> libc.so.6
>>>> #1 0x00007ffff5fa3d1e in raise () at /lib64/libc.so.6
>>>> #2 0x00007ffff5f8b942 in abort () at /lib64/libc.so.6
>>>> #3 0x00007ffff5f8b85e in __assert_fail_base.cold () at
>>>> /lib64/libc.so.6
>>>> #4 0x00007ffff5f9be47 in __assert_fail () at /lib64/libc.so.6
>>>> #5 0x0000555555abf911 in blk_in_drain (blk=0x555557ca6680)
>>>> at ../block/block-backend.c:1290
>>>> #6 0x000055555593410c in xen_block_dataplane_stop
>>>> (dataplane=0x555558982950)
>>>> at ../hw/block/dataplane/xen-block.c:695
>>>> #7 0x000055555593441a in xen_block_dataplane_stop
>>>> (dataplane=<optimized out>)
>>>> at ../hw/block/dataplane/xen-block.c:689
>>>> #8 0x00005555555dfd5e in xen_block_disconnect
>>>> (xendev=xendev@entry=0x55555880aa60, errp=<optimized out>)
>>>> at ../hw/block/xen-block.c:172
>>>> #9 0x00005555555dfeca in xen_block_unrealize
>>>> (xendev=0x55555880aa60)
>>>> at ../hw/block/xen-block.c:282
>>>> #10 0x000055555578ef71 in xen_device_unrealize (dev=<optimized
>>>> out>)
>>>> at ../hw/xen/xen-bus.c:978
>>>> #11 0x0000555555bfe65f in notifier_list_notify (list=<optimized
>>>> out>,
>>>> data=0x0)
>>>> at ../util/notify.c:39
>>>> #12 0x00007ffff5fa6461 in __run_exit_handlers () at
>>>> /lib64/libc.so.6
>>>> #13 0x00007ffff5fa652e in exit () at /lib64/libc.so.6
>>>> #14 0x0000555555b523dc in qemu_default_main
>>>> (opaque=opaque@entry=0x0)
>>>> #15 0x00005555555609c0 in main (argc=<optimized out>,
>>>> argv=<optimized
>>>> out>) at ../system/main.c:76
>>>>
>>>
>>> Is this still an issue?
>>
>> Likely fixed by commit e7bc0204 ("system/runstate:
>> Fix regression, clarify BQL status of exit notifiers"), so
>> I'm closing https://gitlab.com/qemu-project/qemu/-/issues/2771.
>
> Indeed. I think I was assuming the explicit Resolves: tag in that
> commit was going to magically close the issue when it was merged.
> Should I have closed it manually?
It should have been closed automatically. Maybe some transient
problem on GitLab side ¯\_(ツ)_/¯
next prev parent reply other threads:[~2025-04-01 11:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 20:21 [PULL 00/29] Misc HW patches for 2024-12-31 Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 01/29] hw/pci-host/gpex: Allow more than 4 legacy IRQs Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 02/29] hw/misc/ivshmem-flat: Add ivshmem-flat device Philippe Mathieu-Daudé
2025-01-02 21:19 ` Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 03/29] hw/misc/ivshmem: Rename ivshmem to ivshmem-pci Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 04/29] hw/usb/uhci: checkpatch cleanup Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 05/29] hw/usb/uhci: Introduce and use register defines Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 06/29] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel() Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 07/29] hw/i386: Mark devices as little-endian Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 08/29] hw/tricore: " Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 09/29] hw/openrisc: Mark devices as big-endian Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 10/29] hw/sparc: " Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 11/29] hw/net/xilinx_ethlite: Convert some debug logs to trace events Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 12/29] hw/net/xilinx_ethlite: Remove unuseful debug logs Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 13/29] hw/net/xilinx_ethlite: Update QOM style Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 14/29] hw/net/xilinx_ethlite: Correct maximum RX buffer size Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 15/29] hw/net/xilinx_ethlite: Rename rxbuf -> port_index Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 16/29] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read() Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 17/29] hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 18/29] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque' Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 19/29] hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 20/29] hw/block/virtio-blk: Replaces request free function with g_free Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 21/29] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 22/29] hw/usb/hcd-xhci: Unimplemented/guest error logging for port MMIO Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 23/29] ui & main loop: Redesign of system-specific main thread event handling Philippe Mathieu-Daudé
2025-01-08 13:51 ` David Woodhouse
2025-04-01 11:18 ` Philippe Mathieu-Daudé
2025-04-01 11:30 ` Philippe Mathieu-Daudé
2025-04-01 11:43 ` David Woodhouse
2025-04-01 11:58 ` Philippe Mathieu-Daudé [this message]
2025-04-01 12:00 ` David Woodhouse
2024-12-31 20:22 ` [PULL 24/29] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 25/29] hw/display/apple-gfx: Adds PCI implementation Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 26/29] hw/display/apple-gfx: Adds configurable mode list Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 27/29] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 28/29] net/vmnet: Pad short Ethernet frames Philippe Mathieu-Daudé
2024-12-31 20:22 ` [PULL 29/29] hw/display/qxl: Do not use C99 // comments Philippe Mathieu-Daudé
2025-01-01 23:41 ` [PULL 00/29] Misc HW patches for 2024-12-31 Stefan Hajnoczi
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=9ae8882b-35d1-489a-9f5c-579bd9ae89df@linaro.org \
--to=philmd@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=dwmw2@infradead.org \
--cc=phil@philjordan.eu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).