Bug 1988 - Synchronization group does not persist across server restart
: Synchronization group does not persist across server restart
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Sync
: 6.1.1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-16 10:19 UTC by Randy Horman
Modified: 2008-09-15 14:35 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
restoreSync for syncPower'd players (555 bytes, patch)
2005-08-22 14:30 UTC, KDF
Details | Diff
restore off players (963 bytes, patch)
2005-08-22 23:21 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Horman 2005-08-16 10:19:46 UTC
I have two SBs that I keep synchronized, including on/off, volume, and audio.
Prior to v6, stopping and then starting Slimserver would maintain the
synchronization group. In v6, the synchronization group is lost so I am forced
to re-establish synchronization between the two SBs every time I need to restart
the server.
Comment 1 KDF 2005-08-22 00:15:29 UTC
are the player's off when you restart the server?
Comment 2 KDF 2005-08-22 00:23:05 UTC
testing this myself, it seems to be ok if the players are on.  however, if they
are off during the restart, the players are left unsynced.  When a player is
off, I dont think the server checks on startup for sync groups.  Powering on
both players does restore the sync on my setup.
Comment 3 Randy Horman 2005-08-22 04:14:30 UTC
I leave my players on at all times. So, no, the player's aren't off when I
restart the server. 

I apologize, as I realize that I left out a potentially important piece of info.
The two players in a sync group are not the same version. One player is a SB1
and the other is SB2.
Comment 4 KDF 2005-08-22 08:39:06 UTC
that is the same combination that I tested. potentially there is something, then, that is at least partially 
fixed in the 6.2 builds..  

ow about d_sync logs from server startupl. they don't show much, but might help show a difference.
Comment 5 KDF 2005-08-22 09:01:10 UTC
sorry.  I cannot reproduce in 6.1 either.  however, on the first try I lost sync
becuase of the prefs write delay.  by default, this is 30s so restarting the
server too soon after setting the sync, restarted with nothing in the prefs file
to suggest a sync.

I'm not sure what else to suggest for this.  I'd be surprised if this is
windows-specific.

I suppose for the power off condition (which I do see), that the players should
resync if syncPower is selected, but only when syncPower is selected. i'll see
what I can do when i see some logs. Hopefully someone else is able to reproduce
this.

also, d_prefs log before the restart would confirm the "Writing out prefs".
Comment 6 Randy Horman 2005-08-22 09:25:38 UTC
Here is the --d_sync output on server startup:
==================================
C:\Program Files\SlimServer\server>slim --d_sync
2005-08-22 12:00:17.9043 Temporary Unsync 00:04:20:05:a4:43
2005-08-22 12:00:17.9045 00:04:20:05:a4:43: unsyncing
2005-08-22 12:00:17.9254 Temporary Unsync 00:04:20:05:a4:61
2005-08-22 12:00:17.9256 00:04:20:05:a4:61: unsyncing
2005-08-22 12:00:17.9432 Temporary Unsync 00:04:20:05:a4:5d
2005-08-22 12:00:17.9434 00:04:20:05:a4:5d: unsyncing
==================================
Neither of the three SBs listed here are the two that are supposed to remain
sync'd after server restart.

Re: the prefs write delay, not a possibility because the server runs for
literally days before it gets restarted ... for whatever reason.
Comment 7 KDF 2005-08-22 09:34:51 UTC
thanks.  prefs delay was a slim chance anyway :)
that log looks the way mine does when they are powered off.  There should be
some note of some kind in teh lgo for any player as it connects w/ power on. 
This is clearly hinting at something, but I'm not sure what. 

Some things to try looking for any different results:
1. on restart and loss of sync, try powering the 'synced' players on and off a
few times, see if the log says anything.
2. Try with both players on, synced, but no sync power.  restart serer.  
3. Same as 2, but no sync volume and no sync power
4. similar combinations with players off

My apologies if this is a bit involved.  
Comment 8 Randy Horman 2005-08-22 12:48:34 UTC
I tried #1 below, and powering 00:04:20:05:75:52, the SB1 player, OFF and ON
after  restart and loss of sync had no effect. But powering 00:04:20:05:a0:d1,
the SB2 player, OFF and then ON re-established sync. Here's the --d_sync output:
======================================
C:\Program Files\SlimServer\server>slim --d_sync
2005-08-22 15:32:36.2910 Temporary Unsync 00:04:20:05:a4:43
2005-08-22 15:32:36.2912 00:04:20:05:a4:43: unsyncing
2005-08-22 15:32:36.3132 Temporary Unsync 00:04:20:05:a4:61
2005-08-22 15:32:36.3133 00:04:20:05:a4:61: unsyncing
2005-08-22 15:32:36.3520 Temporary Unsync 00:04:20:05:a4:5d
2005-08-22 15:32:36.3521 00:04:20:05:a4:5d: unsyncing
2005-08-22 15:34:00.2713 00:04:20:05:a0:d1: syncing
2005-08-22 15:34:00.2715 00:04:20:05:a0:d1: unsyncing
2005-08-22 15:34:00.2717 Saving 00:04:20:05:a0:d1 as a slave to 941589354
2005-08-22 15:34:00.2719 Idling Sync for 00:04:20:05:a0:d1
======================================

15:34:00 was when I turned the SB2 off and then on again. But wait!!!  The
really bizarro thing is that when I now restart the server the sync group for
SB1 and SB2 is re-established on startup!  Huh!?!?!  Here's the output when I
restart the server now:

========================================
C:\Program Files\SlimServer\server>slim --d_sync
2005-08-22 15:43:32.1100 Temporary Unsync 00:04:20:05:a4:61
2005-08-22 15:43:32.1102 00:04:20:05:a4:61: unsyncing
2005-08-22 15:43:32.1297 Temporary Unsync 00:04:20:05:a4:5d
2005-08-22 15:43:32.1298 00:04:20:05:a4:5d: unsyncing
2005-08-22 15:43:32.1472 Temporary Unsync 00:04:20:05:a4:43
2005-08-22 15:43:32.1473 00:04:20:05:a4:43: unsyncing
2005-08-22 15:43:33.2314 00:04:20:05:75:52: syncing
2005-08-22 15:43:33.2315 00:04:20:05:75:52: unsyncing
2005-08-22 15:43:33.2317 Saving 00:04:20:05:75:52 as a slave to 941589354
2005-08-22 15:43:33.2319 Idling Sync for 00:04:20:05:75:52
2005-08-22 15:43:33.2737 00:04:20:05:75:52: syncing
2005-08-22 15:43:33.2839 00:04:20:05:75:52 checking buffer fullness: 0
==============================================

Needless to say I'm pleased it now works, but am not at all comfortable about
the bug that still lies within and may reappear at some unknown future time.

Does this help nail this bug?
Comment 9 KDF 2005-08-22 13:10:09 UTC
oddly, something like this was what I was hoping would happen. I was guessing
that the power state somehow slipped (even tho players were clearly on). 
Hopefully this keeps working for you now.  If is starts to get mixed up again,
please report any details that you can.  Will leave this open as it might still
be a good plan to always re-establish if the syncPower is selected.  Dean may
choose to re-target this if it seems its no longer a pressing issue for 6.1.2

Comment 10 Randy Horman 2005-08-22 13:11:45 UTC
Okay, some further useful info. These two players are power-sync'd as well. When
I have them both ON and sync'd, then restarting the server re-establishes the
sync group. But if they are both OFF and sync'd, then restarting the server does
NOT re-establish the sync group.
Comment 11 Randy Horman 2005-08-22 13:15:43 UTC
Sorry, kdf!  I read back to the beginning of this thread and realized that I
fibbed and said that my players were ON all the time. Oops!  Not true. They were
OFF, as my previous post indicates, when sync was lost on restart.
Comment 12 KDF 2005-08-22 13:39:59 UTC
ah ok :))

So, that explains it then.  Currently, if a player is off, then the server does
nothing with it.  Normally, this would be the proper thing to do.  The exception
is syncPower.

thanks for getting back on that. Its a big help :)
Comment 13 KDF 2005-08-22 14:30:44 UTC
Created attachment 754 [details]
restoreSync for syncPower'd players

This patch will restore sync when players are off and have syncPower set. 
However, there is still a quirk on startup.  Softsqueeze seems to default to
power on after starting the server, no matter what.  This means one of the
players will be out of sync in mode.  I have to see if this affects SB1 or SB2
hardware and will try to find the source of this quirk.
Comment 14 KDF 2005-08-22 23:21:51 UTC
Created attachment 756 [details]
restore off players

ok, seems the power on after restart is a softsqueeze thing.  This patch will
check off players and sync with other off players if syncPower is set.
Comment 15 Randy Horman 2005-08-23 18:11:53 UTC
I did a quick test with the newest patch, and it seems to work.

Thx, kdf!
Comment 16 KDF 2005-08-23 21:19:53 UTC
committed to 6.2 at change 4038
committed to 6.1.x at change 4039