>From the error message this seems to be about concurrency:

qemu-system-riscv64: ../../util/qemu-coroutine-lock.c:57: 
qemu_co_queue_wait_impl: Assertion `qemu_in_coroutine()' failed.
Aborted (core dumped)

 42 void coroutine_fn qemu_co_queue_wait_impl(CoQueue *queue, QemuLockable 
*lock)
 43 {
 44     Coroutine *self = qemu_coroutine_self();
 45     QSIMPLEQ_INSERT_TAIL(&queue->entries, self, co_queue_next);
 46
 47     if (lock) {
 48         qemu_lockable_unlock(lock);
 49     }
 50
 51     /* There is no race condition here.  Other threads will call
 52      * aio_co_schedule on our AioContext, which can reenter this
 53      * coroutine but only after this yield and after the main loop
 54      * has gone through the next iteration.
 55      */
 56     qemu_coroutine_yield();
 57     assert(qemu_in_coroutine());
 58
 59     /* TODO: OSv implements wait morphing here, where the wakeup
 60      * primitive automatically places the woken coroutine on the
 61      * mutex's queue.  This avoids the thundering herd effect.
 62      * This could be implemented for CoMutexes, but not really for
 63      * other cases of QemuLockable.
 64      */
 65     if (lock) {
 66         qemu_lockable_lock(lock);
 67     }
 68 }

I wondered if I can stop this from happening by reducing the SMP count and/or
the real CPUs that are usable.

- Running with -smp 1 -  3/3 fails

Arm cpus are not so easily hot-pluggable so I wasn't able to run with just
one cpu yet - but then the #host cpus won't change the threads/processes that 
are executed - just their concurrency.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1921664

Title:
  Coroutines are racy for risc64 emu on arm64 - crash on Assertion

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921664/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to