Hi

Michael Banck wrote:
On Mon, Feb 16, 2009 at 04:13:41PM +0900, Vsevolod Sipakov wrote:
valgrind caught some more, see attachment

Hrm, this log has symbol names and line numbers, but no longer the

glibc detected *** /usr/lib/opensync/osplugin: free(): invalid pointer: 
0x00000000020ae280 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f055f9a2948]

I think this part might be the more important information, as it
contains info about irmc_sync.so.  If you make msynctool crash, do you
still get the above backtrace with the debug symbols, and if so, can you
send them?  If not, does a run without valgrind succeed now?

msynctool crashes about one time in ten runs (when I get backtrace info right to xterm - and to valgrind logs). All other msynctool/multisync sessions unsuccessfully terminate with "Member 2 of type irmc-sync had an error while calling sync done: Broken Pipe"

but ALL these uncatched crashes get "kernel: [ 2376.494033] osplugin[4623]: segfault at 0 ip 7fb3cf360785 sp 7fffd98cd450 error 4 in irmc_sync.so[7fb3cf358000+d000]" in the syslog

Also, can you maybe try two file-sync members first, (just two different
empty directories, and then add e.g. a random vcard to one of them) to
see whether that works fine for you.

Two file-sync plugins always sync well:

Member 2 of type file-sync just connected
Member 1 of type file-sync just connected
All clients connected or error
Received an entry 0002000000A7 with data of size 8 from member 1. Changetype ADDED
Member 1 of type file-sync just sent all changes
Member 2 of type file-sync just sent all changes
All clients sent changes or error
All conflicts have been reported
Member 1 of type file-sync committed all changes.
Sent an entry 0002000000A7 of size 40 to member 2. Changetype ADDED
Member 2 of type file-sync committed all changes.
All clients have written
Member 2 of type file-sync just disconnected
Member 1 of type file-sync just disconnected
All clients have disconnected
The sync was successful
--------------------------------

Attached: console and valgrind log of "foreground" crash (with Nokia3110 and irmc-plugin)

Best regards,
 Vsevolod Sipakov
ver...@vs-work:~$ valgrind msynctool --sync Nokia3110 2>vlgrnd.log
Synchronizing group "Nokia3110" 
The previous synchronization was unclean. Slow-syncing
Member 1 of type file-sync just connected
Member 2 of type irmc-sync just connected
All clients connected or error
Received an entry 000200000123 with data of size 8 from member 1 (file-sync). Changetype ADDED
Received an entry 0002000000A7 with data of size 8 from member 1 (file-sync). Changetype ADDED
Member 1 of type file-sync just sent all changes
Member 2 of type irmc-sync just sent all changes
All clients sent changes or error
All conflicts have been reported
*** glibc detected *** /usr/lib/opensync/osplugin: free(): invalid pointer: 0x0000000001270280 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f939d41f948]
/lib/libc.so.6(cfree+0x76)[0x7f939d421a56]
/usr/lib/libopensync.so.0(osync_error_free+0x2e)[0x7f939d933cce]
/usr/lib/libopensync.so.0(osync_error_set_vargs+0xd8)[0x7f939d933df8]
/usr/lib/libopensync.so.0(osync_error_set+0x83)[0x7f939d933eb3]
/usr/lib/libopenobex.so.1[0x7f939c8d6b53]
/usr/lib/libopenobex.so.1[0x7f939c8d6da4]
/usr/lib/libopenobex.so.1[0x7f939c8d8489]
/usr/lib/opensync/plugins/irmc_sync.so(irmc_obex_put+0x1fd)[0x7f939cae120d]
/usr/lib/opensync/plugins/irmc_sync.so(irmcGenericCommitChange+0x25a)[0x7f939cae299a]
/usr/lib/opensync/plugins/irmc_sync.so[0x7f939cae2e11]
/usr/lib/libopensync.so.0(osync_member_commit_change+0x208)[0x7f939d930a08]
/usr/lib/opensync/osplugin(message_handler+0x3ed)[0x402a6d]
/usr/lib/libopensync.so.0[0x7f939d93a8bd]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x23b)[0x7f939e15578b]
/usr/lib/libglib-2.0.so.0[0x7f939e158f5d]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1cd)[0x7f939e15948d]
/usr/lib/opensync/osplugin(main+0x413)[0x403173]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f939d3ca1a6]
/usr/lib/opensync/osplugin[0x402439]
======= Memory map: ========
00400000-00404000 r-xp 00000000 fd:01 345477                             /usr/lib/opensync/osplugin
00604000-00605000 rw-p 00004000 fd:01 345477                             /usr/lib/opensync/osplugin
0125e000-012b8000 rw-p 0125e000 00:00 0                                  [heap]
4011f000-40120000 ---p 4011f000 00:00 0 
40120000-40920000 rw-p 40120000 00:00 0 
40caf000-40cb0000 ---p 40caf000 00:00 0 
40cb0000-414b0000 rw-p 40cb0000 00:00 0 
414b0000-414b1000 ---p 414b0000 00:00 0 
414b1000-41cb1000 rw-p 414b1000 00:00 0 
41e52000-41e53000 ---p 41e52000 00:00 0 
41e53000-42653000 rw-p 41e53000 00:00 0 
7f9394000000-7f9394021000 rw-p 7f9394000000 00:00 0 
7f9394021000-7f9398000000 ---p 7f9394021000 00:00 0 
7f939a843000-7f939a859000 r-xp 00000000 fd:01 213170                     /lib/libgcc_s.so.1
7f939a859000-7f939aa59000 ---p 00016000 fd:01 213170                     /lib/libgcc_s.so.1
7f939aa59000-7f939aa5a000 rw-p 00016000 fd:01 213170                     /lib/libgcc_s.so.1
7f939aa5a000-7f939aa5b000 r-xp 00000000 fd:01 345468                     /usr/lib/opensync/formats/xmldoc.so
7f939aa5b000-7f939ac5b000 ---p 00001000 fd:01 345468                     /usr/lib/opensync/formats/xmldoc.so
7f939ac5b000-7f939ac5c000 rw-p 00001000 fd:01 345468                     /usr/lib/opensync/formats/xmldoc.so
7f939ac5c000-7f939ac5e000 r-xp 00000000 fd:01 345469                     /usr/lib/opensync/formats/contact.so
7f939ac5e000-7f939ae5d000 ---p 00002000 fd:01 345469                     /usr/lib/opensync/formats/contact.so
7f939ae5d000-7f939ae5e000 rw-p 00001000 fd:01 345469                     /usr/lib/opensync/formats/contact.so
7f939ae5e000-7f939ae5f000 r-xp 00000000 fd:01 345467                     /usr/lib/opensync/formats/note.so
7f939ae5f000-7f939b05f000 ---p 00001000 fd:01 345467                     /usr/lib/opensync/formats/note.so
7f939b05f000-7f939b060000 rw-p 00001000 fd:01 345467                     /usr/lib/opensync/formats/note.so
7f939b060000-7f939b062000 r-xp 00000000 fd:01 345473                     /usr/lib/opensync/formats/todo.so
7f939b062000-7f939b261000 ---p 00002000 fd:01 345473                     /usr/lib/opensync/formats/todo.so
7f939b261000-7f939b262000 rw-p 00001000 fd:01 345473                     /usr/lib/opensync/formats/todo.so
7f939b262000-7f939b26d000 r-xp 00000000 fd:01 345464                     /usr/lib/opensync/formats/xml-kde.so
7f939b26d000-7f939b46c000 ---p 0000b000 fd:01 345464                     /usr/lib/opensync/formats/xml-kde.so
7f939b46c000-7f939b46d000 rw-p 0000a000 fd:01 345464                     /usr/lib/opensync/formats/xml-kde.so
7f939b46d000-7f939b46f000 r-xp 00000000 fd:01 345465                     /usr/lib/opensync/formats/event.so
7f939b46f000-7f939b66e000 ---p 00002000 fd:01 345465                     /usr/lib/opensync/formats/event.so
7f939b66e000-7f939b66f000 rw-p 00001000 fd:01 345465          Error writing entry 000200000123 to member 2 (irmc-sync): Broken Pipe
Mapping Write Error: Broken Pipe
Error writing entry 0002000000A7 to member 2 (irmc-sync): Broken Pipe
Mapping Write Error: Broken Pipe
Member 2 of type irmc-sync had an error while commiting changes: Broken Pipe
Member 2 of type irmc-sync had an error while calling sync done: Broken Pipe
Member 2 of type irmc-sync had an error while disconnecting: Broken Pipe
Member 1 of type file-sync committed all changes.
All clients have written
Member 1 of type file-sync just disconnected
All clients have disconnected
The sync failed: Unable to finish the sync for one of the members
Error while synchronizing: Unable to finish the sync for one of the members

==4798== Memcheck, a memory error detector.
==4798== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==4798== Using LibVEX rev 1854, a library for dynamic binary translation.
==4798== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==4798== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
==4798== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==4798== For more details, rerun with: -v
==4798== 
==4798== Thread 8:
==4798== Invalid read of size 1
==4798==    at 0x4E6E8BA: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E6F700: g_pattern_match (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x50F64D0: osync_pattern_match (opensync_env.c:949)
==4798==    by 0x510300D: osync_change_detect_objformat (opensync_changecmds.c:543)
==4798==    by 0x510320D: osync_change_detect_objformat_full (opensync_changecmds.c:595)
==4798==    by 0x51032A8: osync_change_detect_objtype_full (opensync_changecmds.c:512)
==4798==    by 0x53215E0: _new_change_receiver (osengine_engine.c:90)
==4798==    by 0x5321C9A: engine_message_handler (osengine_engine.c:285)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E62F5C: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E6348C: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==  Address 0x7287185 is 0 bytes after a block of size 357 alloc'd
==4798==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==4798==    by 0x50F684F: osync_try_malloc0 (opensync_env.c:798)
==4798==    by 0xECD75A2: demarshall_file (file.c:182)
==4798==    by 0x510924A: osync_demarshal_changedata (opensync_serializer.c:117)
==4798==    by 0x5109309: osync_demarshal_change (opensync_serializer.c:150)
==4798==    by 0x5321C67: engine_message_handler (osengine_engine.c:279)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E62F5C: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E6348C: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E88453: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x6AD6FC6: start_thread (in /lib/libpthread-2.7.so)
==4798== 
==4798== Invalid read of size 1
==4798==    at 0x4E6E8BA: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E6F700: g_pattern_match (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x50F64D0: osync_pattern_match (opensync_env.c:949)
==4798==    by 0x51026EC: get_next_vertice_neighbour (opensync_convert.c:263)
==4798==    by 0x5102A6D: osync_conv_find_path_fn (opensync_convert.c:392)
==4798==    by 0x5102C37: osync_conv_convert_fn (opensync_convert.c:452)
==4798==    by 0x510340A: osync_change_convert_extension (opensync_changecmds.c:366)
==4798==    by 0x510352D: osync_change_convert_to_common (opensync_changecmds.c:417)
==4798==    by 0x5321869: _new_change_receiver (osengine_engine.c:170)
==4798==    by 0x5321C9A: engine_message_handler (osengine_engine.c:285)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==  Address 0x7287ecd is 0 bytes after a block of size 357 alloc'd
==4798==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==4798==    by 0x4E67B29: g_malloc0 (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0xECD7724: copy_file (file.c:237)
==4798==    by 0x51036C0: osync_change_copy_data (opensync_changecmds.c:284)
==4798==    by 0x50FFEFE: osync_change_update (opensync_change.c:598)
==4798==    by 0x53230DE: osengine_mappingentry_update (osengine_mapping.c:600)
==4798==    by 0x5323D40: osengine_mappingview_store_change (osengine_mapping.c:516)
==4798==    by 0x5324154: osengine_mappingtable_store_change (osengine_mapping.c:147)
==4798==    by 0x53216D6: _new_change_receiver (osengine_engine.c:157)
==4798==    by 0x5321C9A: engine_message_handler (osengine_engine.c:285)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798== 
==4798== Invalid read of size 1
==4798==    at 0x4E6E98D: (within /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x4E6F700: g_pattern_match (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0x50F64D0: osync_pattern_match (opensync_env.c:949)
==4798==    by 0x51026EC: get_next_vertice_neighbour (opensync_convert.c:263)
==4798==    by 0x5102A6D: osync_conv_find_path_fn (opensync_convert.c:392)
==4798==    by 0x5102C37: osync_conv_convert_fn (opensync_convert.c:452)
==4798==    by 0x510340A: osync_change_convert_extension (opensync_changecmds.c:366)
==4798==    by 0x510352D: osync_change_convert_to_common (opensync_changecmds.c:417)
==4798==    by 0x5321869: _new_change_receiver (osengine_engine.c:170)
==4798==    by 0x5321C9A: engine_message_handler (osengine_engine.c:285)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==  Address 0x7287ecd is 0 bytes after a block of size 357 alloc'd
==4798==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==4798==    by 0x4E67B29: g_malloc0 (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798==    by 0xECD7724: copy_file (file.c:237)
==4798==    by 0x51036C0: osync_change_copy_data (opensync_changecmds.c:284)
==4798==    by 0x50FFEFE: osync_change_update (opensync_change.c:598)
==4798==    by 0x53230DE: osengine_mappingentry_update (osengine_mapping.c:600)
==4798==    by 0x5323D40: osengine_mappingview_store_change (osengine_mapping.c:516)
==4798==    by 0x5324154: osengine_mappingtable_store_change (osengine_mapping.c:147)
==4798==    by 0x53216D6: _new_change_receiver (osengine_engine.c:157)
==4798==    by 0x5321C9A: engine_message_handler (osengine_engine.c:285)
==4798==    by 0x51078BC: _incoming_dispatch (opensync_queue.c:107)
==4798==    by 0x4E5F78A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
==4798== 
==4798== ERROR SUMMARY: 32 errors from 3 contexts (suppressed: 408 from 2)
==4798== malloc/free: in use at exit: 227,348 bytes in 1,782 blocks.
==4798== malloc/free: 6,191 allocs, 4,409 frees, 1,471,358 bytes allocated.
==4798== For counts of detected errors, rerun with: -v
==4798== searching for pointers to 1,782 not-freed blocks.
==4798== checked 1,570,800 bytes.
==4798== 
==4798== LEAK SUMMARY:
==4798==    definitely lost: 14,093 bytes in 244 blocks.
==4798==      possibly lost: 2,496 bytes in 4 blocks.
==4798==    still reachable: 210,759 bytes in 1,534 blocks.
==4798==         suppressed: 0 bytes in 0 blocks.
==4798== Rerun with --leak-check=full to see details of leaked memory.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to