6.0.0-git
2019-04-25

[#12531] Loopping sync when using ActiveSync
Summary Loopping sync when using ActiveSync
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester leena.heino (at) uta (dot) fi
Created 2013-08-03 (2091 days ago)
Due
Updated 2013-08-08 (2086 days ago)
Assigned 2013-08-03 (2091 days ago)
Resolved 2013-08-03 (2091 days ago)
Milestone
Patch No

History
2013-08-08 14:58:20 ivan (at) kouvykov (dot) com Comment #12 Reply to this comment
Fixed, both android and Outlook connected successfully on a clean 
installation.
2013-08-07 23:27:53 Michael Rubinsky Comment #11 Reply to this comment
I can't reproduce this.
I did, however, find an issue that would occur on pristine new 
installs (no history data available). It doesn't look like your issue 
based on your logs though (unless you removed some parts of the log 
from earlier).

Anyway, see if your issue is fixed now?
2013-08-07 23:26:02 Git Commit Comment #10 Reply to this comment
Changes have been made in Git (master):

commit 1b5bbeee8be65df2c3b1256b528a069c28035a6a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Aug 7 19:23:06 2013 -0400

     Fix sync loop when no history exists yet.

     History returns a boolean when no history at all is found (
     as would be the case on a new install). Need to cast $modseq to int
     to avoid the activesync server thinking it's a loss of state or
     change from timestamps to modseq.

     Related to Bug: 12531

  .../Core/lib/Horde/Core/ActiveSync/Driver.php      |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/1b5bbeee8be65df2c3b1256b528a069c28035a6a
2013-08-07 23:03:17 Michael Rubinsky Comment #9 Reply to this comment
I can't reproduce this.

Your logs show this occurs during a FOLDERSYNC. During a FOLDERSYNC, 
$_thisSyncStamp will NEVER be false. It should ALWAYS be a timestamp. 
The code in question is Horde_ActiveSync_State_Sql::getChanges(). 
$this->_collection is empty for FOLDERSYNC requests, so null will be 
passed as the first parameter to ::getSyncStamp(). You will see in 
Horde_Core_ActiveSync_Driver::getSyncStamp() that this will lead to 
time() being the returned value in this case.

You will need to find out why a FOLDERSYNC leads to some value in 
$collection['id'] for your situation. This should not happen in normal 
usage.
2013-08-07 10:14:39 ivan (at) kouvykov (dot) com Comment #8
New Attachment: 3D4801C2DCD74FE0934855F205B13021.txt Download
Reply to this comment
Log for Outlook 2013 ARM
2013-08-07 10:13:45 ivan (at) kouvykov (dot) com Comment #7
New Attachment: HTC775b17693f2a82d3f9648b65928a8.txt Download
Reply to this comment
After applying fix to ActiveSync/State/Sql.php new devices are unable 
to connect (logs attached for HTC One X and Outlook 2013 ARM)
2013-08-03 23:56:07 Michael Rubinsky Comment #6
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
2013-08-03 23:48:00 Michael Rubinsky Comment #5 Reply to this comment
Nevermind, found the issue.
2013-08-03 23:45:22 Michael Rubinsky Comment #4 Reply to this comment
I could not attach the sync log file because the log file is still 
growing and the sync has not yet ended. The sync has now lasted for 
over 55 minutes.
That's fine. Just attach what you have. I need to see what data is 
being used for the timestamps/modseq values.
2013-08-03 23:44:31 Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Did you by any chance delete entries from horde_histories?

2013-08-03 18:40:00 leena (dot) heino (at) uta (dot) fi Comment #2 Reply to this comment

[Show Quoted Text - 23 lines]
ActiveSync settings in the client: sync only addresses and calendar
ActiveSync settings in the server: Email support is disabled
Email message delete mode in the server: Move to folder Trash

2013-08-03 18:32:45 leena (dot) heino (at) uta (dot) fi Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Loopping sync when using ActiveSync
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
ActiveSync seems to get stuck in a loop when syncing contacts. This 
line appears in the sync log file again and again:
2013-08-03T20:34:00+03:00 INFO: [7450] Using MODSEQ 0 for @Contacts@.
2013-08-03T20:34:00+03:00 ERR: [7450] Force restting of state for 
@Contacts@: Detecting a change in timestamp or modification sequence. 
Reseting state.
2013-08-03T20:34:00+03:00 NOTICE: [7450] 
Horde_ActiveSync_State_Sql::loadState: clearing folder state.
2013-08-03T20:34:00+03:00 INFO: [7450] Resetting device state for 
device: APPLXXXX, user: a1234, and collection: @Contacts@.
...
2013-08-03T21:29:23+03:00 INFO: [7448] Using MODSEQ 0 for @Contacts@.
2013-08-03T21:29:23+03:00 ERR: [7448] Force restting of state for 
@Contacts@: Detecting a change in timestamp or modification sequence. 
Reseting state.
2013-08-03T21:29:23+03:00 NOTICE: [7448] 
Horde_ActiveSync_State_Sql::loadState: clearing folder state.
2013-08-03T21:29:23+03:00 INFO: [7448] Resetting device state for 
device: APPLXXXX, user: a1234, and collection: @Contacts@.

I could not attach the sync log file because the log file is still 
growing and the sync has not yet ended. The sync has now lasted for 
over 55 minutes.

Saved Queries