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

Gonzalo Camarillo <Gonzalo.Camarillo@ericsson.com> Thu, 14 October 2010 13: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 70A9A3A6A0A for <sipcore@core3.amsl.com>; Thu, 14 Oct 2010 06:53:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.447
X-Spam-Level:
X-Spam-Status: No, score=-106.447 tagged_above=-999 required=5 tests=[AWL=0.152, 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 RriUOuMp8-qk for <sipcore@core3.amsl.com>; Thu, 14 Oct 2010 06:53:18 -0700 (PDT)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id C64E63A68FA for <sipcore@ietf.org>; Thu, 14 Oct 2010 06:53:17 -0700 (PDT)
X-AuditID: c1b4fb39-b7c6dae000006ad7-54-4cb70b9bd83a
Received: from esealmw126.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 67.D1.27351.B9B07BC4; Thu, 14 Oct 2010 15:54:36 +0200 (CEST)
Received: from esealmw128.eemea.ericsson.se ([153.88.254.172]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 Oct 2010 15: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 15:54:35 +0200
Message-ID: <4CB70B9A.9000309@ericsson.com>
Date: Thu, 14 Oct 2010 16:54:34 +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> <4CB6EF77.9040509@ericsson.com> <C2488A11-8C58-467E-8580-855BB46705A1@estacado.net>
In-Reply-To: <C2488A11-8C58-467E-8580-855BB46705A1@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 13:54:35.0641 (UTC) FILETIME=[55FAEE90:01CB6BA7]
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 13:53:19 -0000

Hi,

the condition for resynching given in the draft is when the UA "receives
an error response to a re-INVITE that undoes already-executed changes
within the re-INVITE". The draft talks about several situation where UAs
can go out of synch.

In any case, as you suggest in your email, we are talking about corner
cases.

Cheers,

Gonzalo

On 14/10/2010 4:46 PM, Byron Campen wrote:
> 
> 	Perhaps I phrased my question poorly. My question wasn't so much about what a UA should do when it thinks the session is out of sync, but whether it thinks the session is out of sync in the specific case I posed. But, I suppose that any time we get a reINVITE that is rejected after an offer/answer exchange has been completed, whether or not there had been an UPDATE thrown into the mix, we should assume the worst and re-sync. This will lead to glare fairly often, but we are already in a relatively rare corner-case, so I can see this being acceptable.
> 
> Best regards,
> Byron Campen
> 
>> 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
>>>
>>>
>>>
>>
>