summary refs log tree commit diff stats
path: root/results/classifier/gemma3:12b/hypervisor/2395
blob: d01430ec96bf80e35267420df2046dffe50a79a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
qemu-system-x86_64: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed when paused vm migrating (with shared storage) from dest  to src host
Description of problem:
We are doing migration tests with share storage (nfs) as follows:
First, we pause the virtual machine using the 'virsh suspend'command, then migrate the virtual machine to the destination host by 'virsh migrate' command, and there is no problem. After the migration is complete, the virtual machine remains paused on the destination host. However, when we migrate the virtual machine back to the original host, an assertion error is triggered on the current host(dest host):

```
705 qemu-system-x86_64: ../block.c:6748: bdrv_inactivate_recurse: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed.
706 2024-06-17 11:15:59.972+0000: shutting down, reason=crashed
```

and virsh migrate commant return error:
```
**virsh migrate test qemu+tcp://host_ip/system tcp://host_ip --live --verbose --unsafe
Migration: [ 98 %]error: operation failed: domain is not running**
```
Steps to reproduce:
1. We create an vm with shareable storage and then paused vm in source host:
  ```
   virsh create test.xml    running 
   virsh suspend test       paused
  ```
2. Migrate vm to the destination host:
   ``virsh migrate test qemu+tcp://dest_ip/system tcp://dest_ip --live --verbose --unsafe``
3. In destination host,vm is paused.
4. Migrate vm back to the source host,and then migration failed and assert error in qemu log in destination host:
   ```
   virsh migrate test qemu+tcp://host_ip/system tcp://host_ip --live --verbose --unsafe
   Migration: [ 98 %]error: operation failed: domain is not running
   ```
   ```
    705 qemu-system-x86_64: ../block.c:6748: bdrv_inactivate_recurse: Assertion `!(bs->open_flags & 
        BDRV_O_INACTIVE)' failed.
    706 2024-06-17 11:15:59.972+0000: shutting down, reason=crashed
   ```
Additional information:
1) src -----> dest
 ```
migration_thread() 
    migration_completion
      global_state_store()
      vm_stop_force_state(RUN_STATE_FINISH_MIGRATE)
      qemu_savevm_state_complete_precopy_nop_iterable() 
          bdrv_inactivate_all () 
            bdrv_inactivate_recurse() 
             bs->open_flags |= BDRV_O_INACTIVE; (BDRV_O_INACTIVE=0x0800)
```

2) dest -----> src
```
migration_thread() 
  qemu_savevm_state_complete_precopy_non_iterable() 
    bdrv_inactivate_all () 
      bdrv_inactivate_recurse() 
        assert(!(bs->open_flags & BDRV_O_INACTIVE));  Assert and Crash
```


I'm not sure how to address this issue. If QEMU does not support such a migration, a gentler way would be to directly report an error and exit, just like what did in migrate_prepare function, instead of crash qemu. 

If you have any ideas, please let me know, thanks.