[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Improper handling of fast-resumed domains by O/Cxenstored


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrii Sultanov <andriy.sultanov@xxxxxxxxxx>
  • Date: Tue, 7 Jul 2026 14:07:41 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:Feedback-ID"
  • Delivery-date: Tue, 07 Jul 2026 13:08:04 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Both Oxenstored and Cxenstored don't properly handle a shutdown domain
(even if shutdown_code == SHUTDOWN_suspend) coming back because of
xc_domain_resume(fast=1).

Cxenstored correctly sends @introduceDomain watch events on the
initial INTRODUCE call:

     IN 0x1f78610 20260619 15:45:37 INTRODUCE (1 1044476 2 )
     CREATE connection 0x1f75870
     OUT 0x1f76f00 20260619 15:45:37 WATCH_EVENT (@introduceDomain domlist )
     OUT 0x1f76ce0 20260619 15:45:37 WATCH_EVENT (@introduceDomain 
squeezed )
     OUT 0x1f77c40 20260619 15:45:37 WATCH_EVENT (@introduceDomain  )
     OUT 0x1f78610 20260619 15:45:37 WATCH_EVENT (@introduceDomain  )
     OUT 0x1f78610 20260619 15:45:37 INTRODUCE (OK )

And it sends @releaseDomain when it notices dominfo.shutdown (without
checking for shutdown_code):

     OUT 0x1f76f00 20260619 15:46:56 WATCH_EVENT (@releaseDomain domlist )
     OUT 0x1f76ce0 20260619 15:46:56 WATCH_EVENT (@releaseDomain squeezed )
     OUT 0x1f77c40 20260619 15:46:56 WATCH_EVENT (@releaseDomain )
     OUT 0x1f78610 20260619 15:46:56 WATCH_EVENT (@releaseDomain )

But after fast resume, even though INTRODUCE returns successfully,
@introduceDomain watch events are not re-sent:

     IN 0x1f78610 20260619 15:47:06 INTRODUCE (1 1044476 2 )
     <----- no watch events
     OUT 0x1f78610 20260619 15:47:06 INTRODUCE (OK )

Oxenstored likewise avoids sending @introduceDomain for "re-connecting"
domains (which is what it thinks a domain coming back like this looks like).

RESUME does not re-send @introduceDomain either, it just marks the domain as
live internally in Cxenstored and is a no-op for Oxenstored.

This missing notification leads to all kinds of issues since the toolstacks
don't notice the resumed domain is back (at least on the XAPI side).

Is this a real issue or is the toolstack holding xenstored wrong here?

If it is, I see two possible options for handling this:

1) Don't consider SHUTDOWN_suspend domains as dead, only drop them when they
    are definitively gone. This avoids the @releaseDomain notification
    and hence doesn't require another @introduceDomain

2) Do actually send out @introduceDomain for thought-to-be-shutdown domains
    on INTRODUCE

Thoughts?



--
 | Vates

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.