Bug 1058183

Summary: mbsync segfaults: Socket error: secure read from <mailserver>: unhandled SSL error 6
Product: [Fedora] Fedora Reporter: Jan Synacek <jsynacek>
Component: isyncAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: mail
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: isync-1.1.1-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-21 02:56:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Synacek 2014-01-27 07:49:22 UTC
Description of problem:
Running 'mbsync <account>' sometimes segfaults. It doesn't happen all the time, but very frequently.

$ mbsync <account>
...
Selecting master Archives...
Selecting slave Archives...
Loading master...
master: 49979 messages, 0 recent
Loading slave...
slave: 49320 messages, 0 recent
Synchronizing...
M: +0/0 *558/659 #0/0  S: +0/0 *0/0 #0/0
Socket error: secure read from <mailserver>: unhandled SSL error 6

Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x4a4a4a4a4a4a4a4a) at malloc.c:2892
2892	  if (chunk_is_mmapped(p))                       /* release mmapped memory. */
Missing separate debuginfos, use: debuginfo-install xz-libs-5.1.2-6alpha.fc20.x86_64

(gdb) bt full
#0  __GI___libc_free (mem=0x4a4a4a4a4a4a4a4a) at malloc.c:2892
        ar_ptr = <optimized out>
        p = <optimized out>
        hook = 0x0
#1  0x0000000000404ef1 in sync_bail3 (svars=0x74fca0) at sync.c:1919
No locals.
#2  0x0000000000405901 in cancel_sync (svars=0x74fca0) at sync.c:486
        other_state = 1589
        t = 1
#3  0x000000000040ba22 in socket_fail (conn=0x620e18, conn=0x620e18) at socket.c:57
No locals.
#4  ssl_return (func=func@entry=0x4174d9 "read from", conn=conn@entry=0x620e18, ret=0) at socket.c:94
        err = <optimized out>
#5  0x000000000040bdfe in socket_fill (sock=sock@entry=0x620e18) at socket.c:532
        buf = <optimized out>
        n = <optimized out>
        len = 69212
        __PRETTY_FUNCTION__ = "socket_fill"
#6  0x000000000040c3ff in socket_fd_cb (events=<optimized out>, aux=0x620e18) at socket.c:728
        conn = 0x620e18
#7  0x000000000040b875 in event_wait () at util.c:598
        m = <optimized out>
        n = 0
        timeout = <optimized out>
#8  main_loop () at util.c:655
No locals.
#9  0x000000000040368c in main (argc=3, argv=0x7fffffffdd98) at main.c:501
        mvars = {{t = {0, 1}, chan = 0x620be0, drv = {0x61d4e0 <imap_driver>, 0x61d580 <maildir_driver>}, ctx = {0x620ce0, 0x63b0a0}, 
            boxes = {0x0, 0x0}, cboxes = 0x0, chanptr = 0x0, names = {0x74fa98 "Archives", 0x74fa98 "Archives"}, argv = 0x7fffffffdd98, 
            oind = 2, ret = 0, multiple = 0, all = 0, list = 0, ops = {271, 0}, state = {1, 1}, done = 0 '\000', skip = 0 '\000', 
            cben = 1 '\001', boxlist = 1 '\001'}}
        group = <optimized out>
        config = 0x0
        opt = <optimized out>
        ochar = <optimized out>
        cops = 64
        op = <optimized out>
        pseudo = 0

My ~/.mbsyncrc (sensitive information taken out):
 IMAPAccount account1
 Host host1
 User user1
 UseIMAPS yes
 CertificateFile ~/cert1.crt
 CertificateFile ~/cert2.crt

 IMAPStore account1-remote
 Account account1

 MaildirStore account1-local
 Path ~/.mail/account1/
 Inbox ~/.mail/account1/Inbox

 Channel account1
 Master :account1-remote:
 Slave :account1-local:
 Pattern INBOX Sent Archives
 Create Slave
 Sync PushFlags Pull
 Expunge Slave
 SyncState *


Version-Release number of selected component (if applicable):
isync-1.1.0-1.fc20.x86_64


Steps to Reproduce:
1. Use configuration from Description
2. mbsync account1
3. If necessary, repeat 2.


Actual results:
mbsync segfaults.


Expected results:
mbsync finishes without any errors.

Comment 2 Fedora Update System 2014-06-06 11:01:26 UTC
isync-1.1.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/isync-1.1.1-1.fc20

Comment 3 Fedora Update System 2014-06-10 02:54:41 UTC
Package isync-1.1.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing isync-1.1.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7124/isync-1.1.1-1.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-06-21 02:56:05 UTC
isync-1.1.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.