Bug 428648

Summary: mbsync double-free() or memory corruption
Product: [Fedora] Fedora Reporter: Jay Turner <jturner>
Component: isyncAssignee: Fabian Affolter <mail>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 11CC: maurizio.antillon, nicolas.mailhot, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-30 08:29:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lubomir Kundrak 2008-01-14 12:06:15 UTC
+++ This bug was initially created as a clone of Bug #420721 +++

-- Additional comment from nicolas.mailhot on 2008-01-13 07:27 EST --
Created an attachment (id=291499)
More mbsync messages after a few weeks of rawhide operation

I was also seeing this, though I am unable to reproduce.
The crashes always look like this:

Error: journal entry at /home/nim/.mbsync/:local:INBOX_:gmail:Archives!Courrier
entrant.journal:2 refers to non-existing sync state entry
*** glibc detected *** /usr/bin/mbsync: double free or corruption (fasttop):
0x00000000007568a0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3db287601c]
/lib64/libc.so.6(cfree+0x8c)[0x3db28797dc]
/usr/bin/mbsync[0x40d631]
/usr/bin/mbsync[0x40d680]
/usr/bin/mbsync[0x404adb]
/usr/bin/mbsync[0x4036f8]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3db281e2b4]
/usr/bin/mbsync[0x402769]

Comment 1 Lubomir Kundrak 2008-01-14 12:08:06 UTC
/usr/src/debug/isync-1.0.3/src/drv_maildir.c:141
/usr/src/debug/isync-1.0.3/src/drv_maildir.c:716
/usr/src/debug/isync-1.0.3/src/sync.c:487
/usr/src/debug/isync-1.0.3/src/main.c:584

Comment 2 Lubomir Kundrak 2008-01-14 12:13:39 UTC
Nicolas: Regarding the journal entry -- do you remember forcibly terminating
mbsync or running twice at the same time (e.g. by hand plus in cron, etc?)

Also, it would be awesome if we were able to get the core dump, preferrably at
the Error time, not when glibc terminates mbsync. I will compile a version with
abort() there. Would it be possible for you to get core dump from mbsync then?
(I am not going to ask for it then though, as it might contain sensitive
information, but it might be possible to get some clue from it with your help).

Comment 3 Nicolas Mailhot 2008-01-14 12:39:58 UTC
(In reply to comment #2)
> Nicolas: Regarding the journal entry -- do you remember forcibly terminating
> mbsync or running twice at the same time (e.g. by hand plus in cron, etc?)

I may have done so once upon a time but mbsync only ran in cron since
of course it's possible mbsync happened to be scheduled at a time the system
stopped for another reason (system stop, crash whatever), or that anacron tried
to launch mbsync just before cron started another instanced.

I dumped the raw cron logs since I don't have the time to investigate it a lot,
and almost every time I did a manual sync it worked (or failed once, then worked
when I added debug, probably because there was nothing left to sync or the state
server-side changed)
 
> Also, it would be awesome if we were able to get the core dump, preferrably at
> the Error time, not when glibc terminates mbsync. I will compile a version with
> abort() there.

Please propose something I can just put in cron since live system seems the only
way to reliably trigger the problems

> Would it be possible for you to get core dump from mbsync then?
> (I am not going to ask for it then though, as it might contain sensitive
> information, but it might be possible to get some clue from it with your help).

I won't put a core in bugzilla but I may send one encrypted directly to you if
you wish


Comment 4 Bug Zapper 2008-05-14 04:46:16 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2009-06-09 09:25:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Fabian Affolter 2009-07-18 10:04:24 UTC
Does this problem still occurs with isync-1.0.4?