Ticket #1207 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

bug with shared changes and conversion path cached

Reported by: prahal Owned by: dgollub
Priority: high Milestone: OpenSync 0.40
Component: OpenSync Version: 0.39
Severity: critical Keywords:
Cc:

Description

There is a segfault if a change that is not the first on a member that is not the first and if the memebr have different objformat for the same sink. This in PREPARE_WRITE. Ie the first member to prepare write the change will convert it to its sink format (here vcard21 for my phone). Then the second member (evolution) will try have a cached conversion path (as the change is not the first) of xmlformat-contact to vcard21. Thus when preparing the change that has already been converted by the phone member as vard21 the cached conversion path will tell osync_sink_engine_convert_to_dest to convert what is already vcard21 from xmlformat-contact to vcard21.

This segfault as the xmlformat assembler is not liking the plain vard21 as input.

Attached is a testcase (quite convoluted as it does not detect the issue in the order described above but the opposite . Ie the shared change is first and caching of the conversion path is done on first change which is the shared one. As the second entry_engine is to be written and will use the shared one conversion path (which tells the wrong conversion as corrupted by the previous members) I can detect that the second entry written to file is not in sync with its origin.

Attachments

testcase_for_sharedchange_multibuggyconversion.diff Download (13.3 KB) - added by prahal 2 years ago.
testcase
fix_for_sharedchange_multibuggyconversion.diff Download (479 bytes) - added by prahal 2 years ago.
patch for osync_sink_engine_convert_to_dest
testdata_to_sync Download (3.0 KB) - added by prahal 2 years ago.
tests/data/multisync_multiformats/data1/testdata_to_sync
testdata Download (3.0 KB) - added by prahal 2 years ago.
tests/data/multisync_multiformats/data1/testdata
testdata.2 Download (3.0 KB) - added by prahal 2 years ago.
tests/data/multisync_multiformats/data2/testdata
testdata.3 Download (3.0 KB) - added by prahal 2 years ago.
tests/data/multisync_multiformats/data3/testdata

Change History

Changed 2 years ago by prahal

testcase

Changed 2 years ago by prahal

patch for osync_sink_engine_convert_to_dest

Changed 2 years ago by prahal

tests/data/multisync_multiformats/data1/testdata_to_sync

Changed 2 years ago by prahal

tests/data/multisync_multiformats/data1/testdata

Changed 2 years ago by prahal

tests/data/multisync_multiformats/data2/testdata

Changed 2 years ago by prahal

tests/data/multisync_multiformats/data3/testdata

comment:1 Changed 2 years ago by prahal

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.