0bd5b9284f
When a channel fails to create, the code currently just returns. This
is wrong for two reasons:
1) Channel n+1 will not get to initialize it's semaphores, leading to
an assert when terminate_threads tries to post to it:
qemu-system-x86_64: ../util/qemu-thread-posix.c:92:
qemu_mutex_lock_impl: Assertion `mutex->initialized' failed.
2) (theoretical) If channel n-1 already started creation it will
defeat the purpose of the channels_created logic which is in place
to avoid migrate_fd_cleanup() to run while channels are still being
created.
This cannot really happen today because the current failure cases
for multifd_new_send_channel_create() are all synchronous,
resulting from qio_channel_file_new_path() getting a bad
filename. This would hit all channels equally.
But I don't want to set a trap for future people, so have all
channels try to create (even if failing), and only fail after the
channels_created semaphore has been posted.
While here, remove the error_report_err call. There's one already at
migrate_fd_cleanup later on.
Cc: qemu-stable@nongnu.org
Reported-by: Jim Fehlig <jfehlig@suse.com>
Fixes:
|
||
---|---|---|
.. | ||
block-dirty-bitmap.c | ||
channel-block.c | ||
channel-block.h | ||
channel.c | ||
channel.h | ||
colo-failover.c | ||
colo-stubs.c | ||
colo.c | ||
dirtyrate.c | ||
dirtyrate.h | ||
exec.c | ||
exec.h | ||
fd.c | ||
fd.h | ||
file.c | ||
file.h | ||
global_state.c | ||
meson.build | ||
migration-hmp-cmds.c | ||
migration-stats.c | ||
migration-stats.h | ||
migration.c | ||
migration.h | ||
multifd-qpl.c | ||
multifd-uadk.c | ||
multifd-zero-page.c | ||
multifd-zlib.c | ||
multifd-zstd.c | ||
multifd.c | ||
multifd.h | ||
options.c | ||
options.h | ||
page_cache.c | ||
page_cache.h | ||
postcopy-ram.c | ||
postcopy-ram.h | ||
qemu-file.c | ||
qemu-file.h | ||
ram.c | ||
ram.h | ||
rdma.c | ||
rdma.h | ||
savevm.c | ||
savevm.h | ||
socket.c | ||
socket.h | ||
target.c | ||
threadinfo.c | ||
threadinfo.h | ||
tls.c | ||
tls.h | ||
trace-events | ||
trace.h | ||
vmstate-types.c | ||
vmstate.c | ||
xbzrle.c | ||
xbzrle.h | ||
yank_functions.c | ||
yank_functions.h |