Bug 6957 - jive behavior after SC restart
: jive behavior after SC restart
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: Macintosh Other
: P1 critical (vote)
: 7.0
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-05 09:33 UTC by Ben Klaas
Modified: 2009-09-08 09:21 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
debug output from jive when this problem occurs (20.19 KB, text/plain)
2008-02-05 14:48 UTC, Ben Klaas
Details
comet debug output from SC when this problem occurrs (12.56 KB, text/plain)
2008-02-05 14:50 UTC, Ben Klaas
Details
Jive patch to seperate /meta/connect for re-subscriptions (2.05 KB, patch)
2008-02-06 01:42 UTC, Richard Titmuss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2008-02-05 09:33:37 UTC
I've seen a number of issues with Jive behavior when SC is stopped and/or restarted

I get a full-screen spinny "Connecting to player" that never goes away even after SC is back up and running

If you are on the NowPlaying browse screen (smaller artwork), this window should close when the player goes away

I've seen the home menu lose all of its SC-driven menu items and not recover them

I've seen the NowPlaying menu item (this item is jive-driven) go away, after some delay, after the SC items go away.


I will spend some time trying to characterize these issues today, and hopefully a set of instructions to effectively reproduce it.
Comment 1 Ben Klaas 2008-02-05 13:31:11 UTC
this is really easy to reproduce.

One SB3 connected wirelessly to SC. Restart SC. If it's still okay, restart it again. Jive typically gets to an unrecoverable state within the first 3 SC restarts for me.


Comment 2 Blackketter Dean 2008-02-05 13:32:56 UTC
easy to reproduce, yes, but easy to fix?  :)
Comment 3 Ben Klaas 2008-02-05 13:36:13 UTC
I'm afraid that question is probably going to end up being answered by Richard. I will try to add some debug on the Jive side to see where things are going awry.

The behavior seems pretty variable as well. Sometimes instead of "Choose Player" under the never-exiting "Connecting to ..." popup I get "Choose Music Source". Sometimes "Choose Player" disappears from the home menu, sometimes not.

Typically I see the home menu lose all of its SC items before it goes into the "Connecting to..." spinny.

Comment 4 Ben Klaas 2008-02-05 14:48:38 UTC
Created attachment 2823 [details]
debug output from jive when this problem occurs

this is with comet debug turned on and a debug.dump(event, -1) added on line 771 of Comet.lua
Comment 5 Ben Klaas 2008-02-05 14:50:13 UTC
Created attachment 2824 [details]
comet debug output from SC when this problem occurrs
Comment 6 Ben Klaas 2008-02-05 14:57:36 UTC
Looks to me is that there are two serverstatus messages going out-- the first has a playercount of 2 (and those 2 players are my two SB1s) and the second has a playercount of 5, and includes the player my Jive has selected as current.

this, right below the first serverstatus response, also looks bad
[08-02-05 16:49:21.9907] Slim::Web::Cometd::handleRequest (697) Treating request as plain subscription: [["menustatus"]]
[08-02-05 16:49:21.9911] Slim::Web::Cometd::handleRequest (714) Subscribed for /4f3693b1/slim/menustatus/00:04:20:16:02:3f, callback CODE(0xb841d98)
[08-02-05 16:49:21.9922] Slim::Web::Cometd::sendHTTPResponse (650) Sending Cometd chunk:
[{"error":"invalid request: Missing client!","id":"4","channel":"/slim/subscribe","successful":false}]
[08-02-05 16:49:23.0834] Slim::Networking::SqueezeNetwork::PrefSync::_syncDown_error (260) Sync Down failed: No such player: 00:04:20:07:92:f2, will retry in 10110
Comment 7 Andy Grundman 2008-02-05 16:44:11 UTC
At least part of the problem seems to be that Jive reconnects and tries to re-subscribe to everything without knowing if the player is actually connected there.  That's what the 'missing client' error is from.
Comment 8 Richard Titmuss 2008-02-06 01:41:12 UTC
I don't think it should be a problem for Jive to try and re-subscribe to a player that is not connected, the 'missing client' error is fine. Does SC stop processing a batch of requests on a single failure, it would seem to me that is the problem here?

I'll attach a Jive patch that separates the /meta/connect from the re-subscriptions/re-requests. This makes sure the Jive comet connection is in the correct state. If SC is not processing all requests in the batch on an error then I suspect that other problems may be seen at some stage.

Ben please try the patch, Andy please comment.
Comment 9 Richard Titmuss 2008-02-06 01:42:51 UTC
Created attachment 2827 [details]
Jive patch to seperate /meta/connect for re-subscriptions
Comment 10 Andy Grundman 2008-02-06 05:19:07 UTC
SC shouldn't stop on an error.  I'm going to try to reproduce this morning.
Comment 11 Richard Titmuss 2008-02-06 05:21:50 UTC
I should mention the easy to to reproduce is to stop SC, unplug your player then restart SC, then plug in your player. It means you don't have to wait for the race condition.
Comment 12 Andy Grundman 2008-02-06 06:12:19 UTC
OK, turns out SC's cometd code was aborting if any error was encountered in a batched request.  This should be fixed in change 17266, please test.  I don't think we need a patch to Jive for this.
Comment 13 Ben Klaas 2008-02-06 06:32:56 UTC
Andy's checkin, SC change 17266 fixes the issue. Moving to RESOLVED
Comment 14 James Richardson 2008-05-15 13:03:10 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html