Skip to contentSkip to conversation

argo: Remove reachable ASSERT_UNREACHABLE

PATCH In review Jason Andryuk 4 participants 8 messages Oct 7, 2022 – Oct 14, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 argo: Remove reachable ASSERT_UNREACHABLE

I observed this ASSERT_UNREACHABLE in partner_rings_remove consistently trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

---
 xen/common/argo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/argo.c +2 -1
index 748b8714d6..973e1e9956 100644
@@ -1298,7 +1298,8 @@ partner_rings_remove(struct domain *src_d)
                     ASSERT_UNREACHABLE();
             }
             else
-                ASSERT_UNREACHABLE();
+                argo_dprintk("%pd has entry for stale partner domid %d\n",
+                             src_d, send_info->id.domain_id);
 
             if ( dst_d )
                 rcu_unlock_domain(dst_d);
Signature · 1 line
2.37.3
#1 lore raw
Quoted 7 lines · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove consistently trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

Quoted 5 lines

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

We're into the 4.17 release process now.  A bugfix like this obviously should be considered, but will need approval from the release manager. CC Henry.

~Andrew

Quoted 18 lines
---
 xen/common/argo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/argo.c +2 -1
index 748b8714d6..973e1e9956 100644
@@ -1298,7 +1298,8 @@ partner_rings_remove(struct domain *src_d)
                     ASSERT_UNREACHABLE();
             }
             else
-                ASSERT_UNREACHABLE();
+                argo_dprintk("%pd has entry for stale partner domid %d\n",
+                             src_d, send_info->id.domain_id);
 
             if ( dst_d )
                 rcu_unlock_domain(dst_d);
#2 lore raw

Hi Andrew and Jason,

Quoted 17 lines

-----Original Message-----
From: Andrew Cooper <[email protected]>
Subject: Re: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Quoted 1 line · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove

consistently

Quoted 10 lines

trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

Quoted 5 lines
Quoted 1 line

We're into the 4.17 release process now.  A bugfix like this obviously should be considered, but will need approval from the release manager. CC Henry.

Andrew: Thanks for the information!

Jason: Would you mind adding a "Fixes:" tag following the rule described in [1]? Thanks very much! With this tag and proper review/ack from maintainers:

[1] https://xenbits.xen.org/docs/unstable/process/sending-patches.html#fixes

Kind regards,
Henry

Quoted 21 lines

~Andrew

Quoted 18 lines
---
 xen/common/argo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/argo.c +2 -1
index 748b8714d6..973e1e9956 100644
@@ -1298,7 +1298,8 @@ partner_rings_remove(struct domain *src_d)
                     ASSERT_UNREACHABLE();
             }
             else
-                ASSERT_UNREACHABLE();
+                argo_dprintk("%pd has entry for stale partner domid %d\n",
+                             src_d, send_info->id.domain_id);
 
             if ( dst_d )
                 rcu_unlock_domain(dst_d);
#3 lore raw
Quoted 15 lines · Henry Wang

Hi Andrew and Jason,

Quoted 12 lines

-----Original Message-----
From: Andrew Cooper <[email protected]>
Subject: Re: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Quoted 1 line · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove

consistently

Quoted 5 lines

trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

dom7 used a wildcard ring, and dom10 connected to it with a (driver level) stream socket.

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

We're into the 4.17 release process now. A bugfix like this obviously should be considered, but will need approval from the release manager. CC Henry.

Thanks, Andrew.

Quoted 5 lines

Andrew: Thanks for the information!

Jason: Would you mind adding a "Fixes:" tag following the rule described in [1]? Thanks very much! With this tag and proper review/ack from maintainers:

Of course. It would be:

Fixes 82a817307c5b "argo: init, destroy and soft-reset, with enable

command line opt"

Quoted 1 line

Thanks, Henry. We'll see what feedback Christopher provides.

Regards,
Jason

#4 lore raw

Ping: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Hi Christopher,

Quoted 42 lines

-----Original Message-----
From: Jason Andryuk <[email protected]>
Subject: Re: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Quoted 15 lines · Henry Wang

Hi Andrew and Jason,

Quoted 12 lines

-----Original Message-----
From: Andrew Cooper <[email protected]>
Subject: Re: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Quoted 1 line · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove

consistently

Quoted 5 lines

trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

dom7 used a wildcard ring, and dom10 connected to it with a (driver level) stream socket.

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

We're into the 4.17 release process now. A bugfix like this obviously should be considered, but will need approval from the release manager. CC Henry.

Thanks, Andrew.

Quoted 5 lines

Andrew: Thanks for the information!

Jason: Would you mind adding a "Fixes:" tag following the rule described in [1]? Thanks very much! With this tag and proper review/ack from maintainers:

Quoted 7 lines

Of course. It would be:

Fixes 82a817307c5b "argo: init, destroy and soft-reset, with enable

command line opt"

Quoted 1 line

Thanks, Henry. We'll see what feedback Christopher provides.

Since we are in the process of 4.17 release and the release is supposed to happen after 2 weeks, may I have your feedback here for the patch? Thank you very much for your time.

Kind regards,
Henry

Quoted 3 lines

Regards,
Jason

Reviewed-by
#5 lore raw
In reply to Jason Andryuk
Quoted 11 lines · Jason Andryuk
Quoted 10 lines · Henry Wang

Hi Andrew and Jason,

Quoted 7 lines

-----Original Message-----
From: Andrew Cooper <[email protected]>
Subject: Re: [PATCH] argo: Remove reachable ASSERT_UNREACHABLE

Quoted 1 line · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove

consistently

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

dom7 used a wildcard ring, and dom10 connected to it with a (driver level) stream socket.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

I follow this - thanks for the explanation.

Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines

We're into the 4.17 release process now. A bugfix like this obviously should be considered, but will need approval from the release manager. CC Henry.

Thanks, Andrew.

Quoted 5 lines

Andrew: Thanks for the information!

Jason: Would you mind adding a "Fixes:" tag following the rule described in [1]? Thanks very much! With this tag and proper review/ack from maintainers:

Quoted 8 lines

Of course. It would be:

Fixes 82a817307c5b "argo: init, destroy and soft-reset, with enable

command line opt"

Quoted 1 line

Thanks, Henry. We'll see what feedback Christopher provides.

I agree - include for 4.17.

thanks

Christopher

Quoted 4 lines

Regards,
Jason

#6 lore raw
In reply to Jason Andryuk
Quoted 21 lines · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove consistently trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

---
 xen/common/argo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/argo.c +0 -0
index 748b8714d6..973e1e9956 100644

xen/common/argo.c partner_rings_remove(struct domain *src_d) · line 1302

Quoted 6 lines
xen/common/argo.c +2 -1
@@ -1298,7 +1298,8 @@ partner_rings_remove(struct domain *src_d)
                     ASSERT_UNREACHABLE();
             }
             else
-                ASSERT_UNREACHABLE();
+                argo_dprintk("%pd has entry for stale partner domid %d\n",
+                             src_d, send_info->id.domain_id);

I was just about to commit this, but it ought to be

"%pd has entry for stale partner d%u\n"

so the two domains are rendered alike in the message.

Can fix on your behalf if you agree.

~Andrew

#7 lore raw
Quoted 32 lines · Andrew Cooper
Quoted 21 lines · Jason Andryuk

I observed this ASSERT_UNREACHABLE in partner_rings_remove consistently trip. It was in OpenXT with the viptables patch applied.

dom10 shuts down.
dom7 is REJECTED sending to dom10.
dom7 shuts down and this ASSERT trips for dom10.

The argo_send_info has a domid, but there is no refcount taken on the domain. Therefore it's not appropriate to ASSERT that the domain can be looked up via domid. Replace with a debug message.

---
 xen/common/argo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/common/argo.c +0 -0
index 748b8714d6..973e1e9956 100644

xen/common/argo.c partner_rings_remove(struct domain *src_d) · line 1302

Quoted 6 lines
xen/common/argo.c +2 -1
@@ -1298,7 +1298,8 @@ partner_rings_remove(struct domain *src_d)
                     ASSERT_UNREACHABLE();
             }
             else
-                ASSERT_UNREACHABLE();
+                argo_dprintk("%pd has entry for stale partner domid %d\n",
+                             src_d, send_info->id.domain_id);

I was just about to commit this, but it ought to be

Quoted 5 lines

"%pd has entry for stale partner d%u\n"

so the two domains are rendered alike in the message.

Can fix on your behalf if you agree.

Yes, that sounds better.

Thank you.

-Jason