(4th try) breakpoint on qemu_file_set_error, it's bdrv_inactivate_all that's returning the error.
(gdb) list
1155 if (inactivate_disks) {
1156 /* Inactivate before sending QEMU_VM_EOF so that the
1157 * bdrv_invalidate_cache_all() on the other end won't fail. */
1158 ret = bdrv_inactivate_all();
1159 if (ret) {
1160 qemu_file_set_error(f, ret);
1161 return ret;
1162 }
1163 }
(4th try) breakpoint on qemu_file_ set_error, it's bdrv_inactivate_all that's returning the error.
(gdb) list _cache_ all() on the other end won't fail. */ _all(); set_error( f, ret);
1155 if (inactivate_disks) {
1156 /* Inactivate before sending QEMU_VM_EOF so that the
1157 * bdrv_invalidate
1158 ret = bdrv_inactivate
1159 if (ret) {
1160 qemu_file_
1161 return ret;
1162 }
1163 }