Skip to contentSkip to conversation

xen-unstable: commit commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c leaves HVM guest dangling after shutdown or destroy.

DISCUSSION Sander Eikelenboom 5 participants 9 messages Apr 20, 2013 – May 1, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:

(null)                                      16     0     4     --p--d      11.5
(null)                                      17     0     1     --ps-d      12.0

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore. It returns immediately, probably due to the "nullified" name ?

--

Sander

#1 lore raw
Quoted 13 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

Quoted 8 lines

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

Quoted 4 lines

--

Sander

Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
#2 lore raw
Quoted 17 lines · you
Quoted 15 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

(first was destroyed, second shutdown)

Quoted 8 lines
Quoted 6 lines

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

Errr good guess .. yes it seems so, destroying linux guest ends up with the "(null)" entry in xl list. With a windows guest it destroys ok.

Quoted 4 lines
Quoted 4 lines

--

Sander

#3 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 19 lines · Konrad Rzeszutek Wilk
Quoted 15 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

(first was destroyed, second shutdown)

Quoted 8 lines
Quoted 6 lines

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Quoted 5 lines
Quoted 4 lines

--

Sander

#4 lore raw
Quoted 23 lines · Roger Pau Monné
Quoted 22 lines · Konrad Rzeszutek Wilk
Quoted 18 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Are we leaving a reference to a page dangling around somewhere?
-George

#5 lore raw
Quoted 28 lines · George Dunlap
Quoted 27 lines · Roger Pau Monné
Quoted 26 lines · Konrad Rzeszutek Wilk
Quoted 21 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Is this only happening with Linux guests?

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Are we leaving a reference to a page dangling around somewhere?

<nods> That is my thinking. George, if you would not mind - could you add this to the list of bugs for Xen 4.3 I am responsible for.

Thanks.

#6 lore raw
Quoted 31 lines · Konrad Rzeszutek Wilk
Quoted 30 lines · George Dunlap
Quoted 29 lines · Roger Pau Monné
Quoted 27 lines · Konrad Rzeszutek Wilk
Quoted 13 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

Quoted 8 lines

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Are we leaving a reference to a page dangling around somewhere?

<nods> That is my thinking. George, if you would not mind - could you add this to the list of bugs for Xen 4.3 I am responsible for.

Done.

-George

#7 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 32 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
Quoted 30 lines · George Dunlap
Quoted 29 lines · Roger Pau Monné
Quoted 27 lines · Konrad Rzeszutek Wilk
Quoted 13 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

Quoted 8 lines

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Are we leaving a reference to a page dangling around somewhere?

<nods> That is my thinking. George, if you would not mind - could you add this to the list of bugs for Xen 4.3 I am responsible for.

Perhaps you can take this off the list again right away: A brief look at the code shows that unmap_vcpu_info() is being called only for PV guests. Patch below/attached (compile tested only).

Jan

x86: call unmap_vcpu_info() regardless of guest type

This fixes a regression from 63753b3e ("x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests").

xen/arch/x86/domain.c +4 -2
@@ -2013,7 +2013,11 @@ int domain_relinquish_resources(struct d
 
         /* Drop the in-use references to page-table bases. */
         for_each_vcpu ( d, v )
+        {
             vcpu_destroy_pagetables(v);
+
+            unmap_vcpu_info(v);
+        }
 
         if ( !is_hvm_domain(d) )
         {
@@ -2025,8 +2029,6 @@ int domain_relinquish_resources(struct d
                  * mappings.
                  */
                 destroy_gdt(v);
-
-                unmap_vcpu_info(v);
             }
 
             if ( d->arch.pv_domain.pirq_eoi_map != NULL )

x86: call unmap_vcpu_info() regardless of guest type

This fixes a regression from 63753b3e ("x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests").

xen/arch/x86/domain.c +4 -2
@@ -2013,7 +2013,11 @@ int domain_relinquish_resources(struct d
 
         /* Drop the in-use references to page-table bases. */
         for_each_vcpu ( d, v )
+        {
             vcpu_destroy_pagetables(v);
+
+            unmap_vcpu_info(v);
+        }
 
         if ( !is_hvm_domain(d) )
         {
@@ -2025,8 +2029,6 @@ int domain_relinquish_resources(struct d
                  * mappings.
                  */
                 destroy_gdt(v);
-
-                unmap_vcpu_info(v);
             }
 
             if ( d->arch.pv_domain.pirq_eoi_map != NULL )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw
Quoted 37 lines · you
Quoted 37 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
Quoted 34 lines · George Dunlap
Quoted 23 lines · Roger Pau Monné
Quoted 22 lines · Konrad Rzeszutek Wilk
Quoted 18 lines · Sander Eikelenboom

Hi,

Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests

Leaves HVM guests dangling after shutdown or destroy:

xl list gives:
(null) 16 0 4 --p--d
11.5
(null) 17 0 1 --ps-d
12.0

(first was destroyed, second shutdown)

The actual xl and qemu processes are gone, so guest only seem to be still registered in the hypervisor.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Another thing this seems to trigger (and that perhaps needs fixing) is that a "xl shutdown --all --wait" doesn't wait anymore.
It returns immediately, probably due to the "nullified" name ?

Is this only happening with Linux guests?

AFAIK this seems to happen with guests that use VCPUOP_register_vcpu_info (I'm seeing the same on FreeBSD).

Are we leaving a reference to a page dangling around somewhere?

Quoted 8 lines
Quoted 2 lines

<nods> That is my thinking. George, if you would not mind - could you add this to the list of bugs for Xen 4.3 I am responsible for.

Perhaps you can take this off the list again right away: A brief look at the code shows that unmap_vcpu_info() is being called only for PV guests. Patch below/attached (compile tested only).

Jan

Works for me (tm)

Thx

Sander

Quoted 22 lines

x86: call unmap_vcpu_info() regardless of guest type

This fixes a regression from 63753b3e ("x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests").

xen/arch/x86/domain.c +4 -0
@@ -2013,7 +2013,11 @@ int domain_relinquish_resources(struct d
 
         /* Drop the in-use references to page-table bases. */
         for_each_vcpu ( d, v )
+        {
             vcpu_destroy_pagetables(v);
+
+            unmap_vcpu_info(v);
+        }
 
         if ( !is_hvm_domain(d) )
         {

xen/arch/x86/domain.c int domain_relinquish_resources(struct d · line 2034

Quoted 8 lines
xen/arch/x86/domain.c +0 -2
@@ -2025,8 +2029,6 @@ int domain_relinquish_resources(struct d
                  * mappings.
                  */
                 destroy_gdt(v);
-
-                unmap_vcpu_info(v);
             }
 
             if ( d->arch.pv_domain.pirq_eoi_map != NULL )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel