SlideShare a Scribd company logo
1 of 13
Download to read offline
Z-Push: advanced debugging
      Sebastian Kummer
Debugging Z-Push
Most of the time you don't see issues immediately!

    Debugging is not that easy:

    You need logs, they will be
What “usually” goes wrong – States
Problems with states
   •
     missing permissions
   •
     missing states after upgrading

States represent the synchronization state of mobile & folder on server

Missing states mean:
   •
     Server “does not know” what is already on the mobile, sends
     EVERYTHING again → duplications on mobile
   •
     Some stuff (like sending, creating & editing items) “works” somehow
   •
     Could cause loops

In Z-Push 2 a mobile will be fully resynchronized when states are missing
or invalid → missing states for many users could cause HIGH LOAD!
What “usually” goes wrong – Old versions

Old versions – especially 1.2.x and 1.3.x:
   •
     Compatibility issues
        •
          Fields not being synchronized
        •
          Some invitations/recurrences broken (also with 1.4.x)
   •
     Unimplemented features
   •
     Broken encodings - “Vielen Dank fÃŒr Ihre – Reservierung”
   •
     Nokia issues (duplicated folders)
What “usually” goes wrong – Loops

Loops
   •
     Creating 1000000(0000000000) duplicates
   •
     High load on server
   •
     High use of mobile bandwidth (could $$$$)

Loops are nasty and dynamic! Requests are triggered BY THE MOBILE.

Most common causes:
  •
    Broken items (most of times calendar, e.g. recurrences)
  •
    Timeouts (server takes to long to process request)
  •
    Fatal errors or Apache/PHP Segfaults (rarely)
  •
    Incompatibilities (mobile tries over and over again)
Approaching loops - I                              This is what you
                                                    see in the log


                   Mobile                                   Server

                     Idle                                Has a change


               Synch. request                      1. Reads state
                                                   2. calculates delta
                                                   3. exports change
       Retry
                                                   4. MAPI → ActiveSync
                                                   5. streams change
               Waits for answer                       to mobile
                                  Failure!
                       Timeout                     6. writes new state
                                                                      SEGFAULT
                     Idle
                                    Any step (1-6) can fail!
                                    Any step could take to long!
                                    Segfault could occur!
time
                                    Connection could fail (entering tunnel?)
Approaching loops - II                             This is what you
                                              see in the log – looks great!


                   Mobile                                      Server

                     Idle                            Has a 'broken' change


               Synch. request                       1. Reads state
                                                    2. calculates delta
                                                    3. exports change
       Retry
                                                    4. MAPI → ActiveSync
                                                    5. streams change
               Waits for answer                        to mobile
                                  Success!
                                                    6. writes new state

           Processes answer
                                   Faulty item is sent to the mobile!
                                   Mobile does not know how to
                   ERROR           interpret item → error!
time
Approaching loops - II                                 This is what you
                                                  see in the log – looks great!


                   Mobile                                          Server

                     Idle                                Has a 'broken' change

                                  'Broken' ...?        1. Reads state
               Synch. request
                                                       2. calculates delta
                                  Syntactical errors exports change
                                                       3.
       Retry                       - Missing elementary properties, like subject
                                                       4. MAPI → ActiveSync
                                   - Missing start or end date of change item
                                                       5. streams calendar
               Waits for answer                           to mobile
                                    Success! errors
                                  Semantic             6. writes new state
                                  - start date after end date
           Processes answer       - value not as expected (e.g. string vs. hex)
                                  - Recurrence exception: the mobile!
                                       Faulty item is sent to
                                     - Mobile does not know how to
                                        missing/faulty basedate
                                     - interpret item → error! (syntax)
                                        not a recurrence at all
time               ERROR
'Kamikaze loop' - III                                 This is what you
                                                 see in the log – looks great!


                   Mobile                                         Server

               Has NEW item                            Has a ('broken') change

                                                      1. Reads state
               Synch. request                         2. creates item on server
                                                      3. calculates delta
       Retry                                          4. exports changes
                                                      5. MAPI → ActiveSync
                                  Success/failure!
               Waits for answer                       6. streams new ID
                                  or timeout...       7. streams changes
               Doesn't really                         8. writes new state
                 matter...
                                           Anything after 2 fails..
                                           Anything else goes wrong
                                           (previous slides)
time               ERROR
Kamikaze user
How an iPhone receives an email
  “ I can see the first lines of the mail in the preview, but when I open it
                      just says 'no body available'.....! “
                iPhone                                           Server

                  Idle                                        Has a change

                                Only 1K of plain email
            Synch. request
                                                         Retrieving and processing
                                       Success
         Waits and processes

                                   Fetch with HTML
           Fetch entire mail                             1. Retrieving
                                       Failure           2. Processing as RFC822
              Processing
                                                                          SEGFAULT

                  Idle
time
How to fix?


Error checking in loops
   •
     some syntax checking
   •
     only few semantics checks possible
   •
     Force lower maxItems

•
  Logging on user level
•
  New log levels, incl. Deviceid (when synching
  several devices with same account
Questions?

       Thank you for your attention!
More information at:
           http://z-push.sf.net/forums
           http://z-push.sf.net/tracker
           http://z-push.sf.net/download
           http://z-push.sf.net/compatibility

Contact:   sebastian@zarafa.com

More Related Content

More from Zarafa

Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa
 
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdfZararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
Zarafa
 
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-pushZararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
Zarafa
 
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
Zarafa
 
Zararfa SummerCamp 2012 - Community update and Zarafa Development Process
Zararfa SummerCamp 2012 - Community update and Zarafa Development ProcessZararfa SummerCamp 2012 - Community update and Zarafa Development Process
Zararfa SummerCamp 2012 - Community update and Zarafa Development Process
Zarafa
 
Zararfa summer camp 2012 interesting tips & tricks when migrating to zarafa
Zararfa summer camp 2012   interesting tips & tricks when migrating to zarafaZararfa summer camp 2012   interesting tips & tricks when migrating to zarafa
Zararfa summer camp 2012 interesting tips & tricks when migrating to zarafa
Zarafa
 
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovationsZarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
Zarafa
 
Zarafa SummerCamp 2012 - Deploying Zarafa Archiver
Zarafa SummerCamp 2012 - Deploying Zarafa ArchiverZarafa SummerCamp 2012 - Deploying Zarafa Archiver
Zarafa SummerCamp 2012 - Deploying Zarafa Archiver
Zarafa
 
Zarafa SummerCamp 2012 - Open Generation Gap
Zarafa SummerCamp 2012 - Open Generation GapZarafa SummerCamp 2012 - Open Generation Gap
Zarafa SummerCamp 2012 - Open Generation Gap
Zarafa
 
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxyZarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
Zarafa
 
Zarafa SummerCamp 2012 - Zarafa 7.1 features
Zarafa SummerCamp 2012 - Zarafa 7.1 featuresZarafa SummerCamp 2012 - Zarafa 7.1 features
Zarafa SummerCamp 2012 - Zarafa 7.1 features
Zarafa
 
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administratorsZarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
Zarafa
 
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zarafa
 
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on ZarafaZarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa
 
Zarafa SummerCamp 2012 - Communication - how engineers can outperform
Zarafa SummerCamp 2012 - Communication - how engineers can outperformZarafa SummerCamp 2012 - Communication - how engineers can outperform
Zarafa SummerCamp 2012 - Communication - how engineers can outperform
Zarafa
 
Zararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
Zararfa SummerCamp 2012 - From RHEL to RHEV to CloudZararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
Zararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
Zarafa
 
Zararfa SummerCamp 2012 - One solution of two vendors solves plenty needs
Zararfa SummerCamp 2012  - One solution of two vendors solves plenty needsZararfa SummerCamp 2012  - One solution of two vendors solves plenty needs
Zararfa SummerCamp 2012 - One solution of two vendors solves plenty needs
Zarafa
 
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open CloudZarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
Zarafa
 
Zarafa SummerCamp 2012 - DMS ECM - simply for everyone
Zarafa SummerCamp 2012 - DMS ECM - simply for everyoneZarafa SummerCamp 2012 - DMS ECM - simply for everyone
Zarafa SummerCamp 2012 - DMS ECM - simply for everyone
Zarafa
 
Zarafa SummerCamp 2012 - WebApp introduction and roadmap
Zarafa SummerCamp 2012 - WebApp introduction and roadmapZarafa SummerCamp 2012 - WebApp introduction and roadmap
Zarafa SummerCamp 2012 - WebApp introduction and roadmap
Zarafa
 

More from Zarafa (20)

Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
 
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdfZararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
Zararfa SummerCamp 2012 - HA, multi-tenancy and SSO in Zentyal 2 and 3.pdf
 
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-pushZararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
Zararfa SummerCamp 2012 - Debian packaging Giraffe and D-push
 
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
Zararfa SummerCamp 2012 - Fedora update & PAM-MAPI Zarafa Ready certified com...
 
Zararfa SummerCamp 2012 - Community update and Zarafa Development Process
Zararfa SummerCamp 2012 - Community update and Zarafa Development ProcessZararfa SummerCamp 2012 - Community update and Zarafa Development Process
Zararfa SummerCamp 2012 - Community update and Zarafa Development Process
 
Zararfa summer camp 2012 interesting tips & tricks when migrating to zarafa
Zararfa summer camp 2012   interesting tips & tricks when migrating to zarafaZararfa summer camp 2012   interesting tips & tricks when migrating to zarafa
Zararfa summer camp 2012 interesting tips & tricks when migrating to zarafa
 
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovationsZarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
Zarafa SummerCamp 2012 - Keynote Steve Hardy - 3 Cool innovations
 
Zarafa SummerCamp 2012 - Deploying Zarafa Archiver
Zarafa SummerCamp 2012 - Deploying Zarafa ArchiverZarafa SummerCamp 2012 - Deploying Zarafa Archiver
Zarafa SummerCamp 2012 - Deploying Zarafa Archiver
 
Zarafa SummerCamp 2012 - Open Generation Gap
Zarafa SummerCamp 2012 - Open Generation GapZarafa SummerCamp 2012 - Open Generation Gap
Zarafa SummerCamp 2012 - Open Generation Gap
 
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxyZarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
Zarafa SummerCamp 2012 - Zarafa Cluster using a reverse proxy
 
Zarafa SummerCamp 2012 - Zarafa 7.1 features
Zarafa SummerCamp 2012 - Zarafa 7.1 featuresZarafa SummerCamp 2012 - Zarafa 7.1 features
Zarafa SummerCamp 2012 - Zarafa 7.1 features
 
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administratorsZarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
Zarafa SummerCamp 2012 - Z-push 2.0 changes for administrators
 
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
 
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on ZarafaZarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
 
Zarafa SummerCamp 2012 - Communication - how engineers can outperform
Zarafa SummerCamp 2012 - Communication - how engineers can outperformZarafa SummerCamp 2012 - Communication - how engineers can outperform
Zarafa SummerCamp 2012 - Communication - how engineers can outperform
 
Zararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
Zararfa SummerCamp 2012 - From RHEL to RHEV to CloudZararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
Zararfa SummerCamp 2012 - From RHEL to RHEV to Cloud
 
Zararfa SummerCamp 2012 - One solution of two vendors solves plenty needs
Zararfa SummerCamp 2012  - One solution of two vendors solves plenty needsZararfa SummerCamp 2012  - One solution of two vendors solves plenty needs
Zararfa SummerCamp 2012 - One solution of two vendors solves plenty needs
 
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open CloudZarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
Zarafa SummerCamp 2012 - Zarafa in the Capgemini Open Cloud
 
Zarafa SummerCamp 2012 - DMS ECM - simply for everyone
Zarafa SummerCamp 2012 - DMS ECM - simply for everyoneZarafa SummerCamp 2012 - DMS ECM - simply for everyone
Zarafa SummerCamp 2012 - DMS ECM - simply for everyone
 
Zarafa SummerCamp 2012 - WebApp introduction and roadmap
Zarafa SummerCamp 2012 - WebApp introduction and roadmapZarafa SummerCamp 2012 - WebApp introduction and roadmap
Zarafa SummerCamp 2012 - WebApp introduction and roadmap
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Z-Push debugging

  • 1. Z-Push: advanced debugging Sebastian Kummer
  • 2. Debugging Z-Push Most of the time you don't see issues immediately! Debugging is not that easy: You need logs, they will be
  • 3. What “usually” goes wrong – States Problems with states • missing permissions • missing states after upgrading States represent the synchronization state of mobile & folder on server Missing states mean: • Server “does not know” what is already on the mobile, sends EVERYTHING again → duplications on mobile • Some stuff (like sending, creating & editing items) “works” somehow • Could cause loops In Z-Push 2 a mobile will be fully resynchronized when states are missing or invalid → missing states for many users could cause HIGH LOAD!
  • 4. What “usually” goes wrong – Old versions Old versions – especially 1.2.x and 1.3.x: • Compatibility issues • Fields not being synchronized • Some invitations/recurrences broken (also with 1.4.x) • Unimplemented features • Broken encodings - “Vielen Dank fÃŒr Ihre – Reservierung” • Nokia issues (duplicated folders)
  • 5. What “usually” goes wrong – Loops Loops • Creating 1000000(0000000000) duplicates • High load on server • High use of mobile bandwidth (could $$$$) Loops are nasty and dynamic! Requests are triggered BY THE MOBILE. Most common causes: • Broken items (most of times calendar, e.g. recurrences) • Timeouts (server takes to long to process request) • Fatal errors or Apache/PHP Segfaults (rarely) • Incompatibilities (mobile tries over and over again)
  • 6. Approaching loops - I This is what you see in the log Mobile Server Idle Has a change Synch. request 1. Reads state 2. calculates delta 3. exports change Retry 4. MAPI → ActiveSync 5. streams change Waits for answer to mobile Failure! Timeout 6. writes new state SEGFAULT Idle Any step (1-6) can fail! Any step could take to long! Segfault could occur! time Connection could fail (entering tunnel?)
  • 7. Approaching loops - II This is what you see in the log – looks great! Mobile Server Idle Has a 'broken' change Synch. request 1. Reads state 2. calculates delta 3. exports change Retry 4. MAPI → ActiveSync 5. streams change Waits for answer to mobile Success! 6. writes new state Processes answer Faulty item is sent to the mobile! Mobile does not know how to ERROR interpret item → error! time
  • 8. Approaching loops - II This is what you see in the log – looks great! Mobile Server Idle Has a 'broken' change 'Broken' ...? 1. Reads state Synch. request 2. calculates delta Syntactical errors exports change 3. Retry - Missing elementary properties, like subject 4. MAPI → ActiveSync - Missing start or end date of change item 5. streams calendar Waits for answer to mobile Success! errors Semantic 6. writes new state - start date after end date Processes answer - value not as expected (e.g. string vs. hex) - Recurrence exception: the mobile! Faulty item is sent to - Mobile does not know how to missing/faulty basedate - interpret item → error! (syntax) not a recurrence at all time ERROR
  • 9. 'Kamikaze loop' - III This is what you see in the log – looks great! Mobile Server Has NEW item Has a ('broken') change 1. Reads state Synch. request 2. creates item on server 3. calculates delta Retry 4. exports changes 5. MAPI → ActiveSync Success/failure! Waits for answer 6. streams new ID or timeout... 7. streams changes Doesn't really 8. writes new state matter... Anything after 2 fails.. Anything else goes wrong (previous slides) time ERROR
  • 11. How an iPhone receives an email “ I can see the first lines of the mail in the preview, but when I open it just says 'no body available'.....! “ iPhone Server Idle Has a change Only 1K of plain email Synch. request Retrieving and processing Success Waits and processes Fetch with HTML Fetch entire mail 1. Retrieving Failure 2. Processing as RFC822 Processing SEGFAULT Idle time
  • 12. How to fix? Error checking in loops • some syntax checking • only few semantics checks possible • Force lower maxItems • Logging on user level • New log levels, incl. Deviceid (when synching several devices with same account
  • 13. Questions? Thank you for your attention! More information at: http://z-push.sf.net/forums http://z-push.sf.net/tracker http://z-push.sf.net/download http://z-push.sf.net/compatibility Contact: sebastian@zarafa.com