Ticket #884 (new task)

Opened 6 years ago

Last modified 5 years ago

[NEEDINFO] Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members

Reported by: savago Owned by: dgollub
Priority: high Milestone: OpenSync 0.40
Component: OpenSync: Engine Version: 0.38
Severity: normal Keywords: contacts, google, syncml
Cc: savago, bellmich

Description

Friends

Attached a detailed description of the condition plus logs. To put it simply, fast sync fails when google data plugin reports new entries as MODIFIED.

As in a previous discussion, opensync engine should be able to inspect the mapping table and report new entries as ADDED accordingly to other sync group members.

Attachments

gdata_syncml.tar.bz2 (305.2 KB) - added by savago 6 years ago.
Traces and sync group details
ticket884_handle_new_changes_with_type_modified.diff (10.9 KB) - added by dgollub 6 years ago.
Intrdouce testcase and fix. Introduce proper handing of UNMODIFIED and UNKNOWN changetypes
add_new_contacts.tar.bz2 (113.2 KB) - added by savago 6 years ago.
ticket884_handle_new_changes_with_type_modified_v2.diff (11.4 KB) - added by dgollub 6 years ago.
skip unmodified changes

Change History

Changed 6 years ago by savago

Traces and sync group details

comment:1 Changed 6 years ago by dgollub

  • Milestone changed from 0.40 to 0.39

comment:2 Changed 6 years ago by dgollub

  • Status changed from new to assigned
  • Summary changed from google-data plugin fails to fastsync with syncml plugin to Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members

We need a testcase for this.

Changed 6 years ago by dgollub

Intrdouce testcase and fix. Introduce proper handing of UNMODIFIED and UNKNOWN changetypes

comment:3 Changed 6 years ago by dgollub

  • Summary changed from Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members to [NEEDINFO] Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members

Please try attached patch.

This test has major impact on the OpenSync? mapping-engine (e.g. osync_mapping_engine_multiply). Needs further testing before committing to SVN.

comment:4 Changed 6 years ago by savago

Just checked the patch, I will test it now and report any new information about this issue.

Changed 6 years ago by savago

comment:5 Changed 6 years ago by savago

Sorry about the delay to answer. Just tested it and it fails with an assertion: /home/adenilson/osync/current/trunk/opensync/format/opensync_objformat.c:100:E:osync_objformat_get_name: Assertion "format" failed

Attached traces from the sync. I did this steps:

  • run a slow sync between google contacts X syncml
  • run a fast sync (I added new contacts in the google account). New contacts were reported as MODIFIED
  • assertion happens

comment:6 Changed 6 years ago by dgollub

Just a note, in a segfault/assert sometimes a backtrace (e.g. from gdb) is more helpful then trace-files.

comment:7 Changed 6 years ago by dgollub

  • Summary changed from [NEEDINFO] Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members to Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb7a78900 in raise () from /lib/libc.so.6
#2  0xb7a7a238 in abort () from /lib/libc.so.6
#3  0xb7f8551f in osync_objformat_get_name (format=0x0) at /home/dgollub/projects/OpenSync/opensync/opensync/format/opensync_objformat.c:100
#4  0xb7f7eb54 in osync_obj_engine_command (engine=0x80966e0, cmd=OSYNC_ENGINE_COMMAND_WRITE, error=0xb71d0178)
    at /home/dgollub/projects/OpenSync/opensync/opensync/engine/opensync_obj_engine.c:947
#5  0xb7f7866d in osync_engine_event (engine=0x810a858, event=OSYNC_ENGINE_EVENT_READ)
    at /home/dgollub/projects/OpenSync/opensync/opensync/engine/opensync_engine.c:1421
#6  0xb7f76afd in _osync_engine_generate_get_changes_event (engine=0x810a858)
    at /home/dgollub/projects/OpenSync/opensync/opensync/engine/opensync_engine.c:823
#7  0xb7f7730f in _osync_engine_get_changes_callback (proxy=0x8143310, userdata=0x810a858, error=0x0)
    at /home/dgollub/projects/OpenSync/opensync/opensync/engine/opensync_engine.c:960
#8  0xb7f6e2d7 in _osync_client_proxy_get_changes_handler (message=0x80957b8, user_data=0x807ecf0)
    at /home/dgollub/projects/OpenSync/opensync/opensync/client/opensync_client_proxy.c:586
#9  0xb7f93a16 in _incoming_dispatch (source=0x8082d00, callback=0, user_data=0x807c670)
    at /home/dgollub/projects/OpenSync/opensync/opensync/ipc/opensync_queue.c:215
#10 0xb7eaf2d9 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0xb7eb285b in ?? () from /usr/lib/libglib-2.0.so.0
#12 0xb7eb2d2a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0xb7ed939f in ?? () from /usr/lib/libglib-2.0.so.0
#14 0xb7a11175 in start_thread () from /lib/libpthread.so.0
#15 0xb7b1bdce in clone () from /lib/libc.so.6

Reproducible inside the testsutie...

Changed 6 years ago by dgollub

skip unmodified changes

comment:8 Changed 6 years ago by dgollub

  • Summary changed from Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members to [NEEDINFO] Adapted _new_ changes which got reported as MODIFIED to changetype ADDED when committed to counter members

Please, try 2nd version of the patch. This one skips "unmodified" changes and avoids the assert() you hit.

comment:9 Changed 6 years ago by tuju

  • Version changed from 0.37 to 0.38

comment:10 Changed 6 years ago by dgollub

  • Component changed from OpenSync to OpenSync: Engine

comment:11 Changed 5 years ago by savago

This patch doesn't apply to current trunk, is it possible to update it?

Best regards!

comment:12 Changed 5 years ago by dgollub

  • Milestone changed from OpenSync 0.39 to OpenSync 0.40

As discussed on IRC, this get move to 0.40 Milestone - no API blocker

comment:13 Changed 5 years ago by dgollub

  • Status changed from assigned to new

comment:14 Changed 5 years ago by dgollub

  • Type changed from defect to task
Note: See TracTickets for help on using tickets.