Ticket #495 (new defect)

Opened 1 year ago

Last modified 2 weeks ago

SyncML synchronization doesn't work with PPC

Reported by: xryl669 Assigned to: abauer
Priority: normal Milestone:
Component: Plugin: syncml Version: 0.22
Severity: major Keywords:
Cc:

Description (Last modified by felixmoeller)

Hi,

I've tried to synchronize with msynctool between a filesync and syncmlsync.

The mobile device is a PocketPC running WM5, with funambol SyncML client. I've set up settings correctly on the client and server part, and the synchronization starts. However, I'm getting an error with "devinf unknown". I've look at the code, and obviously, the expected devinfs were very limited. Funambol client sends "windowsmobile" as devinf, so I modified DEVTYPE_PDA "pda" in sml_defines.h to DEVTYPE_PDA "windowsmobile". After this change, the synchronization process got up further, but fails with:

Member 2 of type syncml-http-server had an error while getting changes: Received unwanted status reply

I've enabled the trace for the msynctool, and will post them as an attachment. Basically, it states that

[1179015140.828793]             >>>>>>>  _manager_event(0x8060648, 8, 0x806d1e0, 0x806c668, 0x805b9d8)
[1179015140.828922]                     There was an error in the session 1179008008: Received unwanted status reply
[1179015140.829005]                     >>>>>>>  osync_context_report_osyncerror(0x806d558, 0xbfc5ffa8:(Received unwanted status reply))
[1179015140.829055]                             >>>>>>>  message_callback(0x8058a68, 0x80682f0, 0xbfc5ffa8)
[1179015140.829148]                                     [CLI] WARNING: Member is replying with message 0x806e408 to message 0x806c378:"-629885577-1215524718" with error 1: Received unwanted status reply
[1179015140.829199]                                     >>>>>>>  osync_queue_send_message(0x8059378, (nil), 0x806e408, (nil))
[1179015140.829256]                                     <<<<<<<  osync_queue_send_message
[1179015140.829302]                             <<<<<<<  message_callback
[1179015140.829346]                     <<<<<<<  osync_context_report_osyncerror
[1179015140.829390]             <--- ERROR --- _manager_event: Received unwanted status reply

Attachments

Thread3081094848-28532.log (19.2 kB) - added by xryl669 on 05/13/07 00:27:37.
The log for the failing connection
synclog.txt (11.5 kB) - added by xryl669 on 05/13/07 00:38:05.
The funambol log (if of any use)
logfiles.tar.gz (28.0 kB) - added by matthias on 12/25/07 12:12:19.
Archive containing the wireshark capture file and the OpenSync? trace files
Message_2.xml (1.4 kB) - added by matthias on 12/25/07 12:17:13.
Second synchronization message
Message_3.xml (1.1 kB) - added by matthias on 12/25/07 12:18:41.
Third synchronization message
Message_1.xml (1.6 kB) - added by matthias on 12/25/07 12:26:08.
First synchronization message

Change History

05/13/07 00:27:37 changed by xryl669

  • attachment Thread3081094848-28532.log added.

The log for the failing connection

05/13/07 00:35:43 changed by xryl669

  • component changed from OpenSync to Plugin: syncml.
  • severity changed from normal to major.

05/13/07 00:38:05 changed by xryl669

  • attachment synclog.txt added.

The funambol log (if of any use)

10/28/07 17:29:49 changed by dgollub

Could you try to reproduce this with latest libsyncml SVN Revision. And provide both SYNCML_TRACE files...

Looks like there is an issue on the libsyncml side with providing devinf. Debugging might be easiert with syncml-http-server command line tool...

12/25/07 12:08:55 changed by matthias

I'm using a similar setup as xryl669 (PDA with Windows Mobile 2003 and Funambol Client 3.0.31, OpenSync 0.22, libsyncml 0.4.5), and I'm also getting the "Received unwanted status reply" error message, so I think I hitted the same bug:

Synchronizing group "PDA"
The previous synchronization was unclean. Slow-syncing
received contact dsession
Member 2 of type syncml-http-server just connected
Member 1 of type kdepim-sync just connected
All clients connected or error
Received an entry f0oP9ocMQc with data of size 4 from member 1 (kdepim-sync). Changetype ADDED
Member 1 of type kdepim-sync just sent all changes
Member 2 of type syncml-http-server had an error while getting changes: Received unwanted status reply
Member 1 of type kdepim-sync just disconnected

I captured the synchronization messages with wireshark and added some debug output to the SyncML library. I found out that this error is caused by the second status element in attachment:Message_3.xml, where the Funambol client refers to a non-existing Alert with MsgID 1 and CmdID 3. The correct Alert is probably the one with MsgID 2 and CmdID 3 in attachment:Message_2.xml. In the attachment:synclog.txt file provided by xryl669, line 135, the Funambol client also refers to MsgID 1, where it probably means MsgID 2.

So this appears to be a bug in the Funambol client. However, I think that the SyncML specification is inprecise on how the MsgIDs are to be created. According to syncml_represent_v11_20020215.pdf, section 5.1.12, "The message identifier MUST be unique to the device within the SyncML session. [...] The value is a monotonically increasing numeric value starting at one (1) for the first message in the SyncML session." Given a session

Client    Server
  | --id1-> |
  | <-id2-- |
  | --id3-> |
  | <-id4-- |

IMO there are - because of the "unique to the device" clause - two different interpretations of the restrictions for the MsgIDs:

1) 1 == id1 < id2 < id3 < id4
2) 1 == id1 < id3 and 1 == id2 < id4

While the libsyncml obviously implements interpretation (1), the example on pages 23 and 24 of syncml_sync_protocol_v11_20020215.pdf indicate that interpretation (2) is the intended one. So the reason for the Funambol client providing an incorrect MsgRef may be that it for some reason blindly relies on the first message sent from the server to the client having the MsgID 1.

attachment:Message_1.xml, attachment:Message_2.xml and attachment:Message_3.xml are the (formatted) sync messages. attachment:logfiles.tar.gz contains OpenSync's trace files, the wireshark capture file and Funambol's debug output.

12/25/07 12:12:19 changed by matthias

  • attachment logfiles.tar.gz added.

Archive containing the wireshark capture file and the OpenSync? trace files

12/25/07 12:17:13 changed by matthias

  • attachment Message_2.xml added.

Second synchronization message

12/25/07 12:18:41 changed by matthias

  • attachment Message_3.xml added.

Third synchronization message

12/25/07 12:26:08 changed by matthias

  • attachment Message_1.xml added.

First synchronization message

08/09/08 20:52:43 changed by felixmoeller

  • description changed.

08/09/08 20:53:35 changed by felixmoeller

  • description changed.