Re: [sipcore] UPDATE, reINVITE rejections, and session-state rollback

Gonzalo Camarillo <Gonzalo.Camarillo@ericsson.com> Thu, 14 October 2010 11:53 UTC

Return-Path: <gonzalo.camarillo@ericsson.com>
X-Original-To: sipcore@core3.amsl.com
Delivered-To: sipcore@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 4A5F83A68FC for <sipcore@core3.amsl.com>; Thu, 14 Oct 2010 04:53:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.446
X-Spam-Level:
X-Spam-Status: No, score=-106.446 tagged_above=-999 required=5 tests=[AWL=0.153, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ytvvAh3QPE1t for <sipcore@core3.amsl.com>; Thu, 14 Oct 2010 04:53:18 -0700 (PDT)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id BDB5F3A679C for <sipcore@ietf.org>; Thu, 14 Oct 2010 04:53:17 -0700 (PDT)
X-AuditID: c1b4fb3d-b7c3aae000000b22-39-4cb6ef7b49ac
Received: from esealmw128.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id E6.93.02850.B7FE6BC4; Thu, 14 Oct 2010 13:54:35 +0200 (CEST)
Received: from esealmw128.eemea.ericsson.se ([153.88.254.176]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 Oct 2010 13:54:35 +0200
Received: from [131.160.126.182] ([131.160.126.182]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 Oct 2010 13:54:34 +0200
Message-ID: <4CB6EF77.9040509@ericsson.com>
Date: Thu, 14 Oct 2010 14:54:31 +0300
From: Gonzalo Camarillo <Gonzalo.Camarillo@ericsson.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: Byron Campen <bcampen@estacado.net>
References: <4A3A728B-54C7-4E7D-B523-DC86D659A851@estacado.net>
In-Reply-To: <4A3A728B-54C7-4E7D-B523-DC86D659A851@estacado.net>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 14 Oct 2010 11:54:34.0144 (UTC) FILETIME=[918DB200:01CB6B96]
X-Brightmail-Tracker: AAAAAA==
Cc: "shinji.okumura@softfront.jp" <shinji.okumura@softfront.jp>, SIPCORE <sipcore@ietf.org>, "gao.yang2@zte.com.cn" <gao.yang2@zte.com.cn>
Subject: Re: [sipcore] UPDATE, reINVITE rejections, and session-state rollback
X-BeenThere: sipcore@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: SIP Core Working Group <sipcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sipcore>
List-Post: <mailto:sipcore@ietf.org>
List-Help: <mailto:sipcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Oct 2010 11:53:19 -0000

Hi Byron,

> Would it be appropriate to say that if a UA "feels" this way, it is responsible for re-syncing?

yes, that is what the re-INVITE draft says:

http://tools.ietf.org/html/draft-ietf-sipcore-reinvite-06#section-3.4

Figure 5 shows a message flow with a race condition similar to the ones
you are referring to:

http://tools.ietf.org/html/draft-ietf-sipcore-reinvite-06#page-16

Thanks,

Gonzalo

On 11/10/2010 8:43 PM, Byron Campen wrote:
> 
> 	Sending to the authors of the offeranswer and reinvite drafts, since I am not sure which bucket this would fall in:
> 
> 	Consider the following. In all cases, this is within a reINVITE transaction, after an offer/answer exchange has completed using 100rel (which kind is not important), that is being rejected by the server side due to some unspecified error:
> 
>                  A          B
>                  |<---------| INVITE/500
>                  |          |
>                  |          |
>   UPDATE (offer) |--------->|
>                  |          |
>                  |<---------| UPDATE/200 (answer)
> 
>                  A          B
>   UPDATE (offer) |---\  /---| INVITE/500
>                  |    \/    |
>                  |    /\    |
>                  |<--/  \-->|
>                  |          |
>                  |<---------| UPDATE/200 (answer)
> 
>                  A          B
>                  |        /-| INVITE/500
>                  |       /  |
>   UPDATE (offer) |------/-->|
>                  |     /    |
>                  |<---/-----| UPDATE/200 (answer)
>                  |   /      |
>                  |<-/       |
> 
> 	All of these look identical to B; UPDATE offer/answer completes after the end of the INVITE transaction. However, A sees them very differently. B cannot know that something unusual has happened. Also consider the following cases:
> 
>                  A          B
>   UPDATE (offer) |--------->|
>                  |          |
>                  |<---------| UPDATE/200 (answer)
>                  |          |
>                  |<---------| INVITE/500
> 
>                  A          B
>   UPDATE (offer) |--------->|
>                  |          |
>                  |       /--| UPDATE/200 (answer)
>                  |      /   |
>                  |<----/----| INVITE/500
>                  |    /     |
>                  |<--/      |
> 
> 	Again, these look the same to B, but different to A. What is the best approach to ensuring that session-state is consistent on both ends in all of these cases? It seems to me that one way would be to specify that rollback of a reINVITE does not invalidate session-state established with an UPDATE, regardless of whether that UPDATE transaction occurred (or appeared to have occurred) during the reINVITE transaction. If we insist that session-state established with an in-reINVITE UPDATE be rolled back (the current language says that both sides must roll back to the session-state in use prior to the reINVITE), then there is no way to ensure consistent rollback on both ends, even if everything has the same rollback logic, because what appears to be an in-reINVITE UPDATE on one end may appear to be after the reINVITE transaction on the other end. If any portion of the UPDATE transaction appeared to have happened within the reINVITE transaction, then the observing UA must send a 
subsequent UPDATE to re-sync (since there is no guarantee that the other end saw the UPDATE within the reINVITE transaction). This is likely to cause glare, unless we put asymmetric timers on the re-sync, and even then there will be a delay similar to that caused by glare.
> 
> 	My gut says that it would be better to not rollback session-state established by an UPDATE, under any circumstances. But, there may be situations where the session-state established in an UPDATE is contingent on the reINVITE succeeding it. Would it be appropriate to say that if a UA "feels" this way, it is responsible for re-syncing? Or is there something I am missing here?
> 
> Best regards,
> Byron Campen
> 
> 
>