6133b39f3c
The previous patch fixed a race condition, in which there were coroutines being executing doubly, or after coroutine deletion. We can detect common scenarios when this happens, and print an error message and abort before we corrupt memory / data, or segfault. This patch will abort if an attempt to enter a coroutine is made while it is currently pending execution, either in a specific AioContext bh, or pending execution via a timer. It will also abort if a coroutine is scheduled, before a prior scheduled run has occurred. We cannot rely on the existing co->caller check for recursive re-entry to catch this, as the coroutine may run and exit with COROUTINE_TERMINATE before the scheduled coroutine executes. (This is the scenario that was occurring and fixed in the previous patch). This patch also re-orders the Coroutine struct elements in an attempt to optimize caching. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> |
||
---|---|---|
.. | ||
acl.c | ||
aio-posix.c | ||
aio-win32.c | ||
aiocb.c | ||
async.c | ||
base64.c | ||
bitmap.c | ||
bitops.c | ||
buffer.c | ||
bufferiszero.c | ||
cacheinfo.c | ||
compatfd.c | ||
coroutine-sigaltstack.c | ||
coroutine-ucontext.c | ||
coroutine-win32.c | ||
crc32c.c | ||
cutils.c | ||
envlist.c | ||
error.c | ||
event_notifier-posix.c | ||
event_notifier-win32.c | ||
fifo8.c | ||
getauxval.c | ||
hbitmap.c | ||
hexdump.c | ||
host-utils.c | ||
id.c | ||
iohandler.c | ||
iov.c | ||
keyval.c | ||
lockcnt.c | ||
log.c | ||
main-loop.c | ||
Makefile.objs | ||
memfd.c | ||
mmap-alloc.c | ||
module.c | ||
notify.c | ||
osdep.c | ||
oslib-posix.c | ||
oslib-win32.c | ||
pagesize.c | ||
path.c | ||
qdist.c | ||
qemu-config.c | ||
qemu-coroutine-io.c | ||
qemu-coroutine-lock.c | ||
qemu-coroutine-sleep.c | ||
qemu-coroutine.c | ||
qemu-error.c | ||
qemu-openpty.c | ||
qemu-option.c | ||
qemu-progress.c | ||
qemu-sockets.c | ||
qemu-thread-posix.c | ||
qemu-thread-win32.c | ||
qemu-timer-common.c | ||
qemu-timer.c | ||
qht.c | ||
range.c | ||
rcu.c | ||
readline.c | ||
stats64.c | ||
systemd.c | ||
thread-pool.c | ||
throttle.c | ||
timed-average.c | ||
trace-events | ||
unicode.c | ||
uri.c | ||
uuid.c |