Question about upgrading cyrus-imapd in Kolab 3.3 Updates

Enrico Tagliavini enrico.tagliavini at gmail.com
Sat Jan 31 17:40:39 CET 2015


I think I found it. I fired up a test VM and copied over my mail
boxes, recompiled the kolab SRC RPM (without changes at first) and am
able to reproduce the segfault. Added quite a few printf here and
there and I think I understood the cause. At line 221 of file (from
the kolab SRPM cyrus imap tar archive) lib/ctl_mboxlist.c you can find
the following line:

acl = strconcat(dl_ace->name, "\t", tmp);

but this is a wrong use of the function strconcat which should be
terminated by (char *)NULL, as documented in lib/util.h ( and this
makes sense looking at the source code of strconcat and knowing the
use of stdarg). This can be fixed replacing said line with

acl = strconcat(dl_ace->name, "\t", tmp, NULL);

The commit fixing this (and at least a second segault and a memory
leak) problem in the upstream cyrus is from our Jeroen
http://git.cyrusimap.org/cyrus-imapd/commit/imap/ctl_mboxlist.c?id=8c0a23c20e40830f82c67b59d3bfcf27658296c8

Which is a way better solution overall. I'm going to rebuild
cyrus-imapd with said patch applied and report back, but I think we
can safely assume this is going to solve this and an update with said
patch should be issued.

Best regards!
Enrico

On 28 January 2015 at 20:39, Daniel Hoffend <dh at dotlan.net> wrote:
> Hello Enrico
>
> And that's exactly the reason why we haven't accepted the patch request (with the new upstream release) within the OBS system. If someone finds the exact commit that's fixes the initial problem we're willing to push it to the Updates Repo.
>
> Other then that the new upstream release is up for testing for hue upcoming release. Sure some TLS parameters have changed in the config (which should be documented for the upgrade guide) and I already found another segfault during testing ...
>
> @enrico: maybe a reconstruct can fix your quota issue
>
> --
> mfg
> Daniel Hoffend
>
>> Am 28.01.2015 um 19:37 schrieb Enrico Tagliavini <enrico.tagliavini at gmail.com>:
>>
>> Updated to the new package from the repo and now the quota looks
>> broken in roundcube, it is not displayed anymore, it says 0%. Also the
>> log file is full of warning now, a lot of deprecated options.
>>
>> That's a NAK for me sorry, this is something that should not happen
>> with a bugfix update. I can stand the warnings in the maillog, that's
>> straightforward, you just have to rename a bunch of options, but
>> breaking a previously working component is not.
>>
>> The correct way to solve this is by adding a single patch, fixing the
>> segfault to the current package, not bumping the version to next
>> release. At least with this scenario.
>>
>> Best regards and thank you for the try.
>> Enrico
>>
>>> On 25 January 2015 at 23:00, Cornelius Hald <hald at icandy.de> wrote:
>>> Thanks for that!
>>>
>>> I've tried the updated cyrus now on a system with a couple of real users
>>> and while ctl_mboxlist does not crash anymore, the ptloader crashes are
>>> still there. Also it seems that imapd now crashes as well :(
>>>
>>>> From my logs:
>>>
>>> Jan 25 22:43:45 mail kernel: ptloader[29990]: segfault at 18 ip
>>> 00007f485f0286c6 sp 00007fff2db7a600 error 4 in
>>> libc-2.17.so[7f485efaa000+1b6000]
>>> Jan 25 22:43:49 mail kernel: ptloader[29989]: segfault at 18 ip
>>> 00007f6f8b20545d sp 00007fff5fd57830 error 4 in
>>> libc-2.17.so[7f6f8b189000+1b6000]
>>> Jan 25 22:44:07 mail kernel: ptloader[30013]: segfault at 18 ip
>>> 00007f0566e0c45d sp 00007ffffe5fecc0 error 4 in
>>> libc-2.17.so[7f0566d90000+1b6000]
>>> Jan 25 22:44:42 mail kernel: ptloader[29988]: segfault at 18 ip
>>> 00007f69359c545d sp 00007fff2efb3170 error 4 in
>>> libc-2.17.so[7f6935949000+1b6000]
>>> Jan 25 22:44:57 mail kernel: ptloader[29992]: segfault at 18 ip
>>> 00007f732ac2645d sp 00007fff4dba1460 error 4 in
>>> libc-2.17.so[7f732abaa000+1b6000]
>>> Jan 25 22:45:00 mail kernel: ptloader[29991]: segfault at 18 ip
>>> 00007f9417e5745d sp 00007fff3115a150 error 4 in
>>> libc-2.17.so[7f9417ddb000+1b6000]
>>> Jan 25 22:45:33 mail kernel: ptloader[29984]: segfault at 18 ip
>>> 00007f74a26cc45d sp 00007fffd63e8130 error 4 in
>>> libc-2.17.so[7f74a2650000+1b6000]
>>> Jan 25 22:45:36 mail kernel: ptloader[29993]: segfault at 18 ip
>>> 00007f0adb0c345d sp 00007fff93faa410 error 4 in
>>> libc-2.17.so[7f0adb047000+1b6000]
>>> Jan 25 22:45:44 mail kernel: ptloader[30056]: segfault at 18 ip
>>> 00007f855e42e45d sp 00007fffcfe74f80 error 4 in
>>> libc-2.17.so[7f855e3b2000+1b6000]
>>> Jan 25 22:45:47 mail kernel: ptloader[30059]: segfault at 35 ip
>>> 00007fa62d88d7eb sp 00007fff37db5710 error 6 in
>>> libc-2.17.so[7fa62d811000+1b6000]
>>> Jan 25 22:48:42 mail kernel: imapd[29983]: segfault at c0 ip
>>> 00007fd89b494de7 sp 00007fff7ccd1d90 error 4 in
>>> libcyrus_imap.so.0.0.0[7fd89b471000+71000]
>>> Jan 25 22:53:42 mail kernel: imapd[29979]: segfault at c0 ip
>>> 00007f3cb41a1de7 sp 00007fffed82d820 error 4 in
>>> libcyrus_imap.so.0.0.0[7f3cb417e000+71000]
>>>
>>> Cheers,
>>> Conny
>>>
>>>
>>>> On Sun, 2015-01-25 at 21:13 +0100, Daniel Hoffend wrote:
>>>> The cyr_systemd_helper script is located within the OBS package.
>>>>
>>>> I've created a merge request within OBS to get the cvt_systemd_helper
>>>> script fixed. But i've added a note so some of the other kolab devs
>>>> should decided if that's the right way to go or changing the
>>>> cvt_cyrusdb_all script.
>>>>
>>>> Regards
>>>> Daniel
>>>>
>>>> Am 2015-01-25 20:50, schrieb Cornelius Hald:
>>>>> I've found the issue. It is in /usr/lib/cyrus-imapd/cyr_systemd_helper
>>>>>
>>>>> There on line 17 the parameter "import" is missing.
>>>>>
>>>>> The full line needs to be:
>>>>>
>>>>> runuser - cyrus -s /bin/sh -c "umask
>>>>> 166 ; /usr/lib/cyrus-imapd/cvt_cyrusdb_all import >
>>>>> ${CONFIGDIRECTORY}/rpm/db_import.log 2>&1" < /dev/null
>>>>>
>>>>> Now that I can start cyrus, I'll test some more. At least ctl_mboxlist
>>>>> now works without SEGV. I hope the ptloader issues are gone as well.
>>>>>
>>>>> Cheers,
>>>>> Conny
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at lists.kolab.org
>>> https://lists.kolab.org/mailman/listinfo/users


More information about the users mailing list