(qemu) info migrate
info migrate
globals: store-global-state=1, only_migratable=0, send-configuration=1, send-section-footer=1
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off x-multifd: off
Migration status: active
total time: 0 milliseconds
bionic-proposed: PASS (status: setup)
(qemu) info migrate
info migrate
globals: store-global-state=1, only_migratable=0, send-configuration=1, send-section-footer=1
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off x-multifd: off
Migration status: setup
total time: 0 milliseconds
(gdb) b migrate_set_state
Breakpoint 1 at 0x58dd60: file ./migration/migration.c, line 1025.
(gdb) b migration/migration.c:603
Breakpoint 2 at 0x58d670: file ./migration/migration.c, line 603.
# Using 603 vs 606 as the code didn't break on 606 for some reason.
(gdb) run -nodefaults -nographic -S -monitor tcp:0:3333,server,wait=off
T3)
$ nc 127.0.0.1 3333
(qemu) migrate -d tcp:127.0.0.1:4444
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state=0x5555566ac6f0, old_state=0, new_state=1) at ./migration/migration.c:1025
1025 ./migration/migration.c: No such file or directory.
(gdb) p (MigrationStatus) 0
$1 = MIGRATION_STATUS_NONE
(gdb) p (MigrationStatus) 1
$2 = MIGRATION_STATUS_SETUP
(gdb) c
Continuing.
[New Thread 0x7fffcf9ff700 (LWP 4909)]
[New Thread 0x7fffcf1fe700 (LWP 4910)]
[Thread 0x7fffcf9ff700 (LWP 4909) exited]
Thread 5 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1025
1025 in ./migration/migration.c
(gdb) p (MigrationStatus) 1
$3 = MIGRATION_STATUS_SETUP
(gdb) p (MigrationStatus) 4
$4 = MIGRATION_STATUS_ACTIVE
T3)
(qemu) info migrate
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 2, qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:604
604 in ./migration/migration.c
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) p info.status
$1 = MIGRATION_STATUS_NONE
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1cc0 (LWP 4916) "qemu-system-x86" qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:604
2 Thread 0x7fffdf7ff700 (LWP 4920) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 4921) "qemu-system-x86" (running)
5 Thread 0x7fffcf9ff700 (LWP 4924) "qemu-system-x86" migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1025
(gdb) thread 5
[Switching to thread 5 (Thread 0x7fffcf9ff700 (LWP 4924))]
#0 migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1025
1025 in ./migration/migration.c
(gdb) continue &
Continuing.
(gdb) info threads
Id Target Id Frame
1 Thread 0x7ffff7fc1cc0 (LWP 4916) "qemu-system-x86" qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:604
2 Thread 0x7fffdf7ff700 (LWP 4920) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 4921) "qemu-system-x86" (running)
* 5 Thread 0x7fffcf9ff700 (LWP 4924) "qemu-system-x86" (running)
(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff7fc1cc0 (LWP 4916))]
#0 qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:604
604 in ./migration/migration.c
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) c
T3)
(qemu) info migrate
info migrate
globals: store-global-state=1, only_migratable=0, send-configuration=1, send-section-footer=1
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off x-multifd: off
Migration status: active
total time: 0 milliseconds
Migration status is active, without any RAM statistics.
(gdb) b migrate_set_state
Breakpoint 1 at 0x58de30: file ./migration/migration.c, line 1026.
(gdb) b migration/migration.c:604
Breakpoint 2 at 0x58d748: file ./migration/migration.c, line 604.
(gdb) run -nodefaults -nographic -S -monitor tcp:0:3333,server,wait=off
T3)
nc 127.0.0.1 3333
(qemu) migrate -d tcp:127.0.0.1:4444
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state=0x5555566ac6f0, old_state=0, new_state=1) at ./migration/migration.c:1026
1026 ./migration/migration.c: No such file or directory.
(gdb) p (MigrationStatus) 0
$1 = MIGRATION_STATUS_NONE
(gdb) p (MigrationStatus) 1
$2 = MIGRATION_STATUS_SETUP
(gdb) c
Continuing.
[New Thread 0x7fffcf9ff700 (LWP 6525)]
[New Thread 0x7fffcf1fe700 (LWP 6526)]
[Thread 0x7fffcf9ff700 (LWP 6525) exited]
Thread 5 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1026
1026 in ./migration/migration.c
(gdb) p (MigrationStatus) 1
$3 = MIGRATION_STATUS_SETUP
(gdb) p (MigrationStatus) 4
$4 = MIGRATION_STATUS_ACTIVE
T3)
(qemu) info migrate
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 2, qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:605
605 in ./migration/migration.c
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) p info.status
$5 = MIGRATION_STATUS_NONE
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc1cc0 (LWP 6518) "qemu-system-x86" qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:605
2 Thread 0x7fffdf7ff700 (LWP 6522) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 6523) "qemu-system-x86" (running)
5 Thread 0x7fffcf1fe700 (LWP 6526) "qemu-system-x86" migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1026
(gdb) thread 5
[Switching to thread 5 (Thread 0x7fffcf1fe700 (LWP 6526))]
#0 migrate_set_state (state=0x5555566ac6f0, old_state=1, new_state=4) at ./migration/migration.c:1026
1026 in ./migration/migration.c
(gdb) continue &
Continuing.
(gdb) info threads
Id Target Id Frame
1 Thread 0x7ffff7fc1cc0 (LWP 6518) "qemu-system-x86" qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:605
2 Thread 0x7fffdf7ff700 (LWP 6522) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 6523) "qemu-system-x86" (running)
* 5 Thread 0x7fffcf1fe700 (LWP 6526) "qemu-system-x86" (running)
(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff7fc1cc0 (LWP 6518))]
#0 qmp_query_migrate (errp=errp@entry=0x0) at ./migration/migration.c:605
605 in ./migration/migration.c
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) c
T3)
(qemu) info migrate
info migrate
globals: store-global-state=1, only_migratable=0, send-configuration=1, send-section-footer=1
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-switchover: off x-multifd: off
Migration status: setup
total time: 0 milliseconds
Status is now still 'SETUP' (which is not expected to have RAM statistics), not 'ACTIVE' (which is, and caused the issue).
Verification done for bionic-proposed.
bionic-updates: FAIL (status: active)
(qemu) info migrate state=1, only_migratable=0, send-configurat ion=1, send-section- footer= 1 switchover: off x-multifd: off
info migrate
globals: store-global-
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-
Migration status: active
total time: 0 milliseconds
bionic-proposed: PASS (status: setup)
(qemu) info migrate state=1, only_migratable=0, send-configurat ion=1, send-section- footer= 1 switchover: off x-multifd: off
info migrate
globals: store-global-
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-
Migration status: setup
total time: 0 milliseconds
Details:
=======
$ lsb_release -cs
bionic
bionic-updates: FAIL
--------------
$ curl http:// ddebs.ubuntu. com/dbgsym- release- key.asc | sudo apt-key add - ddebs.ubuntu. com/ubuntu bionic-updates main'
OK
$ sudo add-apt-repository -y 'deb http://
$ sudo apt install --yes qemu-system-x86 qemu-system- x86-dbgsym
$ dpkg -s qemu-system-x86 | grep Version: dfsg-1ubuntu7. 41
Version: 1:2.11+
$ dpkg -s qemu-system- x86-dbgsym | grep Version: dfsg-1ubuntu7. 41
Version: 1:2.11+
...
$ sudo add-apt-repository -ys 'deb http:// archive. ubuntu. com/ubuntu bionic-updates main' debian/ changelog dfsg-1ubuntu7. 41) bionic-security; urgency=medium
$ apt source qemu
$ head -n1 qemu-*/
qemu (1:2.11+
$ vim qemu-*/ migration/ migration. c migrate( Error **errp) STATUS_ SETUP: total_time = false;
594 MigrationInfo *qmp_query_
...
603 case MIGRATION_
604 info->has_status = true;
605 info->has_
606 break;
...
T1)
$ qemu-system-x86_64 -nodefaults -nographic -S -incoming tcp:0:4444
T2)
(gdb) b migrate_set_state migration. c, line 1025.
Breakpoint 1 at 0x58dd60: file ./migration/
(gdb) b migration/ migration. c:603 migration. c, line 603.
Breakpoint 2 at 0x58d670: file ./migration/
# Using 603 vs 606 as the code didn't break on 606 for some reason.
(gdb) run -nodefaults -nographic -S -monitor tcp:0:3333, server, wait=off
T3)
$ nc 127.0.0.1 3333
(qemu) migrate -d tcp:127.0.0.1:4444
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state= 0x5555566ac6f0, old_state=0, new_state=1) at ./migration/ migration. c:1025 migration. c: No such file or directory. STATUS_ NONE STATUS_ SETUP
1025 ./migration/
(gdb) p (MigrationStatus) 0
$1 = MIGRATION_
(gdb) p (MigrationStatus) 1
$2 = MIGRATION_
(gdb) c
Continuing.
[New Thread 0x7fffcf9ff700 (LWP 4909)]
[New Thread 0x7fffcf1fe700 (LWP 4910)]
[Thread 0x7fffcf9ff700 (LWP 4909) exited]
Thread 5 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state= 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1025 migration. c STATUS_ SETUP STATUS_ ACTIVE
1025 in ./migration/
(gdb) p (MigrationStatus) 1
$3 = MIGRATION_
(gdb) p (MigrationStatus) 4
$4 = MIGRATION_
T3)
(qemu) info migrate
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 2, qmp_query_migrate (errp=errp@ entry=0x0) at ./migration/ migration. c:604 migration. c STATUS_ NONE
604 in ./migration/
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) p info.status
$1 = MIGRATION_
(gdb) info threads entry=0x0) at ./migration/ migration. c:604 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1025
Id Target Id Frame
* 1 Thread 0x7ffff7fc1cc0 (LWP 4916) "qemu-system-x86" qmp_query_migrate (errp=errp@
2 Thread 0x7fffdf7ff700 (LWP 4920) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 4921) "qemu-system-x86" (running)
5 Thread 0x7fffcf9ff700 (LWP 4924) "qemu-system-x86" migrate_set_state (state=
(gdb) thread 5 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1025 migration. c
[Switching to thread 5 (Thread 0x7fffcf9ff700 (LWP 4924))]
#0 migrate_set_state (state=
1025 in ./migration/
(gdb) continue &
Continuing.
(gdb) info threads entry=0x0) at ./migration/ migration. c:604
Id Target Id Frame
1 Thread 0x7ffff7fc1cc0 (LWP 4916) "qemu-system-x86" qmp_query_migrate (errp=errp@
2 Thread 0x7fffdf7ff700 (LWP 4920) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 4921) "qemu-system-x86" (running)
* 5 Thread 0x7fffcf9ff700 (LWP 4924) "qemu-system-x86" (running)
(gdb) thread 1 entry=0x0) at ./migration/ migration. c:604 migration. c
[Switching to thread 1 (Thread 0x7ffff7fc1cc0 (LWP 4916))]
#0 qmp_query_migrate (errp=errp@
604 in ./migration/
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) c
T3)
(qemu) info migrate state=1, only_migratable=0, send-configurat ion=1, send-section- footer= 1 switchover: off x-multifd: off
info migrate
globals: store-global-
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-
Migration status: active
total time: 0 milliseconds
Migration status is active, without any RAM statistics.
bionic-proposed: PASS
---------------
$ sudo add-apt-repository -ys 'deb http:// archive. ubuntu. com/ubuntu bionic-proposed main' ddebs.ubuntu. com/ubuntu bionic-proposed main'
$ sudo add-apt-repository -y 'deb http://
$ sudo apt install --yes qemu-system-x86 qemu-system- x86-dbgsym
$ dpkg -s qemu-system-x86 | grep Version: dfsg-1ubuntu7. 42
Version: 1:2.11+
$ dpkg -s qemu-system- x86-dbgsym | grep Version: dfsg-1ubuntu7. 42
Version: 1:2.11+
$ rm -rf qemu*
$ apt source qemu
$ head -n1 qemu-*/ debian/ changelog dfsg-1ubuntu7. 42) bionic; urgency=medium
qemu (1:2.11+
$ vim qemu-*/ migration/ migration. c migrate( Error **errp) STATUS_ SETUP: total_time = false;
594 MigrationInfo *qmp_query_
...
604 case MIGRATION_
605 info->has_status = true;
606 info->has_
607 break;
T1)
$ qemu-system-x86_64 -nodefaults -nographic -S -incoming tcp:0:4444
T2)
gdb \ system- x86_64
-ex 'set non-stop on' -ex 'set pagination off' -ex 'set confirm off' \
qemu-
(gdb) b migrate_set_state migration. c, line 1026.
Breakpoint 1 at 0x58de30: file ./migration/
(gdb) b migration/ migration. c:604 migration. c, line 604.
Breakpoint 2 at 0x58d748: file ./migration/
(gdb) run -nodefaults -nographic -S -monitor tcp:0:3333, server, wait=off
T3)
nc 127.0.0.1 3333
(qemu) migrate -d tcp:127.0.0.1:4444
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state= 0x5555566ac6f0, old_state=0, new_state=1) at ./migration/ migration. c:1026 migration. c: No such file or directory. STATUS_ NONE STATUS_ SETUP
1026 ./migration/
(gdb) p (MigrationStatus) 0
$1 = MIGRATION_
(gdb) p (MigrationStatus) 1
$2 = MIGRATION_
(gdb) c
Continuing.
[New Thread 0x7fffcf9ff700 (LWP 6525)]
[New Thread 0x7fffcf1fe700 (LWP 6526)]
[Thread 0x7fffcf9ff700 (LWP 6525) exited]
Thread 5 "qemu-system-x86" hit Breakpoint 1, migrate_set_state (state= 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1026 migration. c STATUS_ SETUP STATUS_ ACTIVE
1026 in ./migration/
(gdb) p (MigrationStatus) 1
$3 = MIGRATION_
(gdb) p (MigrationStatus) 4
$4 = MIGRATION_
T3)
(qemu) info migrate
T2)
Thread 1 "qemu-system-x86" hit Breakpoint 2, qmp_query_migrate (errp=errp@ entry=0x0) at ./migration/ migration. c:605 migration. c STATUS_ NONE
605 in ./migration/
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) p info.status
$5 = MIGRATION_
(gdb) info threads entry=0x0) at ./migration/ migration. c:605 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1026 0x5555566ac6f0, old_state=1, new_state=4) at ./migration/ migration. c:1026 migration. c entry=0x0) at ./migration/ migration. c:605
Id Target Id Frame
* 1 Thread 0x7ffff7fc1cc0 (LWP 6518) "qemu-system-x86" qmp_query_migrate (errp=errp@
2 Thread 0x7fffdf7ff700 (LWP 6522) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 6523) "qemu-system-x86" (running)
5 Thread 0x7fffcf1fe700 (LWP 6526) "qemu-system-x86" migrate_set_state (state=
(gdb) thread 5
[Switching to thread 5 (Thread 0x7fffcf1fe700 (LWP 6526))]
#0 migrate_set_state (state=
1026 in ./migration/
(gdb) continue &
Continuing.
(gdb) info threads
Id Target Id Frame
1 Thread 0x7ffff7fc1cc0 (LWP 6518) "qemu-system-x86" qmp_query_migrate (errp=errp@
2 Thread 0x7fffdf7ff700 (LWP 6522) "qemu-system-x86" (running)
3 Thread 0x7fffdcffe700 (LWP 6523) "qemu-system-x86" (running)
* 5 Thread 0x7fffcf1fe700 (LWP 6526) "qemu-system-x86" (running)
(gdb) thread 1 entry=0x0) at ./migration/ migration. c:605 migration. c
[Switching to thread 1 (Thread 0x7ffff7fc1cc0 (LWP 6518))]
#0 qmp_query_migrate (errp=errp@
605 in ./migration/
(gdb) p (MigrationStatus) s.state
value has been optimized out
(gdb) c
T3)
(qemu) info migrate state=1, only_migratable=0, send-configurat ion=1, send-section- footer= 1 switchover: off x-multifd: off
info migrate
globals: store-global-
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off pause-before-
Migration status: setup
total time: 0 milliseconds
Status is now still 'SETUP' (which is not expected to have RAM statistics), not 'ACTIVE' (which is, and caused the issue).
(qemu) quit
(gdb) quit
Terminal 1)
Ctrl-C