qemu live migration with compression ( zstd or zlib ) in same server always(100% reproduce) failed (recevied ram page flag 0x0) Description of problem: Steps to reproduce: 1. live migration with compress mode in same server 2. src: qemu-system-x86_64 -cpu Cascadelake-Server-v4 -smp 10 -enable-kvm -m 50G -nographic -serial telnet:localhost:4321,server,nowait -nic tap,ifname=tap0,script=no,downscript=no CentOS-Stream-GenericCloud-9-20230123.0.x86_64_test_0.qcow2 ``` QEMU 7.2.91 monitor - type 'help' for more information (qemu) migrate_set_capability compress on (qemu) migrate_set_parameter multifd-compression zstd (qemu) info migrate_capabilities xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: on events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off multifd: off dirty-bitmaps: off postcopy-blocktime: off late-block-activate: off x-ignore-shared: off validate-uuid: off background-snapshot: off zero-copy-send: off postcopy-preempt: off (qemu) info migrate_parameters announce-initial: 50 ms announce-max: 550 ms announce-rounds: 5 announce-step: 100 ms compress-level: 1 compress-threads: 8 compress-wait-thread: on decompress-threads: 2 throttle-trigger-threshold: 50 cpu-throttle-initial: 20 cpu-throttle-increment: 10 cpu-throttle-tailslow: off max-cpu-throttle: 99 tls-creds: '' tls-hostname: '' max-bandwidth: 134217728 bytes/second downtime-limit: 300 ms x-checkpoint-delay: 20000 ms block-incremental: off multifd-channels: 2 multifd-compression: zstd xbzrle-cache-size: 67108864 bytes max-postcopy-bandwidth: 0 tls-authz: '' (qemu) migrate -d tcp:localhost:4444 (qemu) qemu-system-x86_64: failed to save SaveStateEntry with id(name): 2(ram): -5 qemu-system-x86_64: Unable to write to socket: Connection reset by peer ``` 3.dest(in same server): qemu-system-x86_64 -cpu Cascadelake-Server-v4 -smp 10 -enable-kvm -m 50G -nographic -serial telnet:localhost:4322,server,nowait -nic tap,ifname=tap1,script=no,downscript=no --incoming tcp:0:4444 CentOS-Stream-GenericCloud-9-20230123.0.x86_64_test_0.qcow2 ``` QEMU 7.2.91 monitor - type 'help' for more information (qemu) migrate_set_capability compress on (qemu) migrate_set_parameter multifd-compression zstd (qemu) info mi mice migrate migrate_capabilities migrate_parameters (qemu) info migrate_capabilities xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: on events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off multifd: off dirty-bitmaps: off postcopy-blocktime: off late-block-activate: off x-ignore-shared: off validate-uuid: off background-snapshot: off zero-copy-send: off postcopy-preempt: off (qemu) info migr migrate migrate_capabilities migrate_parameters (qemu) info migrate_parameters announce-initial: 50 ms announce-max: 550 ms announce-rounds: 5 announce-step: 100 ms compress-level: 1 compress-threads: 8 compress-wait-thread: on decompress-threads: 2 throttle-trigger-threshold: 50 cpu-throttle-initial: 20 cpu-throttle-increment: 10 cpu-throttle-tailslow: off max-cpu-throttle: 99 tls-creds: '' tls-hostname: '' max-bandwidth: 134217728 bytes/second downtime-limit: 300 ms x-checkpoint-delay: 20000 ms block-incremental: off multifd-channels: 2 multifd-compression: zstd xbzrle-cache-size: 67108864 bytes max-postcopy-bandwidth: 0 tls-authz: '' (qemu) info migrate_capabilitiesqemu-system-x86_64: Unknown combination of migration flags: 0x0 qemu-system-x86_64: decompress data failed qemu-system-x86_64: error while loading state section id 2(ram) qemu-system-x86_64: load of migration failed: Operation not permitted ``` Additional information: $ zstd -V *** zstd command line interface 64-bits v1.5.1, by Yann Collet ***