Sieve redirect is broken in 2.3.7.2 - signal 11

Demonhost maillist-dovecot at demonhost.hu
Mon Oct 7 12:19:55 EEST 2019


Thank you Stephan ! That was it.

It works fine with the proper pigeonhole version.

Let me write to the package maintainer to fix.

Regards,
   Laszlo

On 2019. 10. 07. 11:09, Demonhost wrote:
> That's a good thought.
>
> I'm building from the alpine repo and I indeed see pigeonhole is 0.5.5
>
> https://git.alpinelinux.org/aports/tree/main/dovecot/APKBUILD?h=3.8-stable 
>
>
>
> Let me build it with 0.5.7.2
>
> Regards,
>   Laszlo
>
> On 2019. 10. 07. 10:45, Stephan Bosch via dovecot wrote:
>>
>>
>> On 07/10/2019 10:17, Demonhost via dovecot wrote:
>>> Hi Stephan,
>>>
>>> Here it is:
>>>
>>
>> We still can't reproduce it here.
>>
>> First of all, did you update Pigeonhole along with Dovecot? This kind 
>> of weirdness can happen when Pigeonhole was compiled against a 
>> different version of Dovecot. You could compile Pigeonhole manually 
>> as well to make sure, which also gives you the opportunity to get 
>> debug symbols for Pigeonhole as well.
>>
>> Do you also have your configuration for me (output from `dovecot -n`) ?
>>
>> Also, can you issue in GDB after it crashed (as you did `bt full` 
>> before):
>>
>> f 1
>> p src
>>
>> Regards,
>>
>> Stephan.
>>
>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> p_strdup (pool=pool at entry=0x55555579bc20, str=0x6d65642e6c69616d 
>>> <error: Cannot access memory at address 0x6d65642e6c69616d>) at 
>>> strfuncs.c:51
>>> 51      strfuncs.c: No such file or directory.
>>> (gdb) bt full
>>> #0  p_strdup (pool=pool at entry=0x55555579bc20, str=0x6d65642e6c69616d 
>>> <error: Cannot access memory at address 0x6d65642e6c69616d>) at 
>>> strfuncs.c:51
>>>         mem = <optimized out>
>>>         len = <optimized out>
>>> #1  0x00007ffff757dd1a in ssl_iostream_settings_init_from 
>>> (pool=pool at entry=0x55555579bc20, dest=dest at entry=0x55555579bcf8, 
>>> src=0x555555764038) at iostream-ssl.c:298
>>>         offset = 0
>>>         src_str = 0x555555764038
>>>         dest_str = 0x55555579bcf8
>>> #2  0x00007ffff7522545 in smtp_submit_session_init 
>>> (input=0x555555764008, set=0x7fffffffe378) at smtp-submit.c:84
>>>         pool = 0x55555579bc20
>>> #3  0x00007ffff752265a in smtp_submit_init_simple (input=<optimized 
>>> out>, set=<optimized out>, mail_from=0x555555759b80) at 
>>> smtp-submit.c:134
>>>         session = <optimized out>
>>>         subm = 0x0
>>> #4  0x00007ffff687e923 in ?? () from 
>>> /usr/lib/dovecot/lib90_sieve_plugin.so
>>> No symbol table info available.
>>> #5  0x00007ffff65fe761 in sieve_smtp_start () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #6  0x00007ffff65fe869 in sieve_smtp_start_single () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #7  0x00007ffff661c71e in ?? () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #8  0x00007ffff660e8a8 in ?? () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #9  0x00007ffff66100d1 in sieve_result_execute () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #10 0x00007ffff661e9fc in ?? () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #11 0x00007ffff661f638 in sieve_multiscript_run () from 
>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>> No symbol table info available.
>>> #12 0x00007ffff687f7cb in ?? () from 
>>> /usr/lib/dovecot/lib90_sieve_plugin.so
>>> No symbol table info available.
>>> #13 0x00007ffff7b69960 in mail_deliver (ctx=0x7fffffffe9e0, 
>>> storage_r=0x7fffffffe9a8) at mail-deliver.c:498
>>>         muser = 0x555555777ef8
>>>         ret = <optimized out>
>>>         __func__ = "mail_deliver"
>>> #14 0x0000555555556fd2 in lda_deliver (stderr_rejection=false, 
>>> rcpt_to_source=<optimized out>, rcpt_to=<optimized out>, 
>>> path=<optimized out>, user=<optimized out>,
>>>     service_user=<optimized out>, ctx=0x7fffffffe9e0) at main.c:253
>>>         storage = 0x0
>>>         errstr = 0x0
>>>         ret = <optimized out>
>>>         var_table = <optimized out>
>>>         lda_set = <optimized out>
>>>         smtp_set = <optimized out>
>>> #15 main (argc=<optimized out>, argv=<optimized out>) at main.c:517
>>>         t = 0x0
>>>         box = 0x0
>>>         set_roots = {0x555555758ae0 
>>> <smtp_submit_setting_parser_info>, 0x555555758a80 
>>> <lda_setting_parser_info>, 0x0}
>>>         ctx = {pool = 0x555555759b40, set = 0x555555764078, smtp_set 
>>> = 0x555555764008, session = 0x555555759b68, session_time_msecs = 0, 
>>> delivery_time_started = {
>>> ---Type <return> to continue, or q <return> to quit---
>>>             tv_sec = 1570435973, tv_usec = 126295}, dup_db = 
>>> 0x55555578e040, session_id = 0x0, src_mail = 0x555555790c68, 
>>> mail_from = 0x555555759b80, mail_params = {
>>>             auth = 0x0, body = {type = 
>>> SMTP_PARAM_MAIL_BODY_TYPE_UNSPECIFIED, ext = 0x0}, envid = 0x0, ret 
>>> = SMTP_PARAM_MAIL_RET_UNSPECIFIED, size = 0, extra_params = {
>>>               arr = {buffer = 0x0, element_size = 0}, v = 0x0, 
>>> v_modifiable = 0x0}}, rcpt_to = 0x555555759bb0, rcpt_params = {orcpt 
>>> = {addr_type = 0x0,
>>>               addr = 0x555555759bb0, addr_raw = 0x0}, notify = 
>>> SMTP_PARAM_RCPT_NOTIFY_UNSPECIFIED, extra_params = {arr = {buffer = 
>>> 0x0, element_size = 0}, v = 0x0,
>>>               v_modifiable = 0x0}}, rcpt_user = 0x555555777168, 
>>> rcpt_default_mailbox = 0x55555555763f "INBOX", dest_mail = 0x0, 
>>> cache = 0x0, tempfail_error = 0x0,
>>>           tried_default_save = false, saved_mail = false, 
>>> save_dest_mail = false, mailbox_full = false, dsn = false}
>>>         service_flags = <optimized out>
>>>         user = <optimized out>
>>>         errstr = 0x0
>>>         path = 0x0
>>>         rcpt_to = 0x0
>>>         final_rcpt_to = 0x0
>>>         mail_from = 0x555555759b80
>>>         storage_service = 0x7ffff7d6c5a8
>>>         service_user = 0x555555763198
>>>         service_input = {parent_event = 0x0, module = 0x55555555763b 
>>> "lda", service = 0x55555555763b "lda", username = 0x7ffff7832f31 
>>> "testaaaaaa at xxxxxxxxx.xx",
>>>           session_id = 0x0, session_id_prefix = 0x0, 
>>> session_create_time = 0, local_ip = {family = 0, u = {ip6 = 
>>> {__in6_union = {__s6_addr = '\000' <repeats 15 times>,
>>>                   __s6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, 
>>> __s6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = 
>>> {family = 0, u = {ip6 = {__in6_union = {
>>>                   __s6_addr = '\000' <repeats 15 times>, __s6_addr16 
>>> = {0, 0, 0, 0, 0, 0, 0, 0}, __s6_addr32 = {0, 0, 0, 0}}}, ip4 = 
>>> {s_addr = 0}}}, local_port = 0,
>>>           remote_port = 0, userdb_fields = 0x0, flags_override_add = 
>>> (unknown: 0), flags_override_remove = (unknown: 0), no_userdb_lookup 
>>> = false, debug = false,
>>>           conn_secured = false, conn_ssl_secured = false}
>>>         user_source = <optimized out>
>>>         rcpt_to_source = <optimized out>
>>>         process_euid = <optimized out>
>>>         stderr_rejection = false
>>>         ret = <optimized out>
>>>         c = <optimized out>
>>>
>>> On 2019. 10. 06. 23:28, Stephan Bosch via dovecot wrote:
>>>>
>>>>
>>>> On 06/10/2019 23:14, Demonhost wrote:
>>>>> I think alpine does not have that
>>>>>
>>>>> https://pkgs.alpinelinux.org/packages?name=dovecot*&branch=v3.8&repo=main&arch=x86_64 
>>>>>
>>>>>
>>>>> https://git.alpinelinux.org/aports/tree/main/dovecot/APKBUILD?h=3.8-stable 
>>>>>
>>>>>
>>>>> What else would help? strace?
>>>>
>>>> Do you have the opportunity to build Dovecot yourself, thereby 
>>>> including the debug symbols?
>>>>
>>>> Regards,
>>>>
>>>> Stephan.
>>>>>
>>>>> On 2019. 10. 06. 23:05, Stephan Bosch via dovecot wrote:
>>>>>>
>>>>>>
>>>>>> On 06/10/2019 23:03, Demonhost wrote:
>>>>>>> Hi Stephan,
>>>>>>>
>>>>>>> I managed to get GDB, I hope this one helps. If not I can send 
>>>>>>> the config too, but exactly same config works with 2.3.6.
>>>>>>
>>>>>> You don't have the debug symbols for Dovecot installed. Usually, 
>>>>>> your system will have a separate package for that. On Debian, it 
>>>>>> is called dovecot-dbg.
>>>>>>
>>>>>>>
>>>>>>> 92b9d3412dc8:/$ gdb /usr/libexec/dovecot/dovecot-lda -f 
>>>>>>> root at xxxxxxxx -d test at xxxxxxxxx
>>>>>>> GNU gdb (GDB) 8.0.1
>>>>>>> Copyright (C) 2017 Free Software Foundation, Inc.
>>>>>>> License GPLv3+: GNU GPL version 3 or later 
>>>>>>> <http://gnu.org/licenses/gpl.html>
>>>>>>> This is free software: you are free to change and redistribute it.
>>>>>>> There is NO WARRANTY, to the extent permitted by law. Type "show 
>>>>>>> copying"
>>>>>>> and "show warranty" for details.
>>>>>>> This GDB was configured as "x86_64-alpine-linux-musl".
>>>>>>> Type "show configuration" for configuration details.
>>>>>>> For bug reporting instructions, please see:
>>>>>>> <http://www.gnu.org/software/gdb/bugs/>.
>>>>>>> Find the GDB manual and other documentation resources online at:
>>>>>>> <http://www.gnu.org/software/gdb/documentation/>.
>>>>>>> For help, type "help".
>>>>>>> Type "apropos word" to search for commands related to "word"...
>>>>>>> Warning: //test at xxxxxxxxx: No such file or directory.
>>>>>>> Reading symbols from /usr/libexec/dovecot/dovecot-lda...(no 
>>>>>>> debugging symbols found)...done.
>>>>>>> //root at xxxxxxxx: No such file or directory.
>>>>>>> (gdb) r -f root at xxxxxxxx -d test at xxxxxxxxx < message
>>>>>>> Starting program: /usr/libexec/dovecot/dovecot-lda -f 
>>>>>>> root at xxxxxxxx -d test at xxxxxxxxx < message
>>>>>>> process 359 is executing new program: /usr/bin/doveconf
>>>>>>> process 359 is executing new program: 
>>>>>>> /usr/libexec/dovecot/dovecot-lda
>>>>>>>
>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>> 0x00007ffff75b74f7 in p_strdup () from 
>>>>>>> /usr/lib/dovecot/libdovecot.so.0
>>>>>>> (gdb) bt full
>>>>>>> #0  0x00007ffff75b74f7 in p_strdup () from 
>>>>>>> /usr/lib/dovecot/libdovecot.so.0
>>>>>>> No symbol table info available.
>>>>>>> #1  0x00007ffff757dd1a in ssl_iostream_settings_init_from () 
>>>>>>> from /usr/lib/dovecot/libdovecot.so.0
>>>>>>> No symbol table info available.
>>>>>>> #2  0x00007ffff7522545 in smtp_submit_session_init () from 
>>>>>>> /usr/lib/dovecot/libdovecot.so.0
>>>>>>> No symbol table info available.
>>>>>>> #3  0x00007ffff752265a in smtp_submit_init_simple () from 
>>>>>>> /usr/lib/dovecot/libdovecot.so.0
>>>>>>> No symbol table info available.
>>>>>>> #4  0x00007ffff687e923 in ?? () from 
>>>>>>> /usr/lib/dovecot/lib90_sieve_plugin.so
>>>>>>> No symbol table info available.
>>>>>>> #5  0x00007ffff65fe761 in sieve_smtp_start () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #6  0x00007ffff65fe869 in sieve_smtp_start_single () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #7  0x00007ffff661c71e in ?? () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #8  0x00007ffff660e8a8 in ?? () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #9  0x00007ffff66100d1 in sieve_result_execute () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #10 0x00007ffff661e9fc in ?? () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #11 0x00007ffff661f638 in sieve_multiscript_run () from 
>>>>>>> /usr/lib/dovecot/libdovecot-sieve.so.0
>>>>>>> No symbol table info available.
>>>>>>> #12 0x00007ffff687f7cb in ?? () from 
>>>>>>> /usr/lib/dovecot/lib90_sieve_plugin.so
>>>>>>> No symbol table info available.
>>>>>>> #13 0x00007ffff7b69960 in mail_deliver () from 
>>>>>>> /usr/lib/dovecot/libdovecot-lda.so.0
>>>>>>> No symbol table info available.
>>>>>>> #14 0x0000555555556fd2 in main ()
>>>>>>> No symbol table info available.
>>>>>>>
>>>>>>> On 2019. 10. 04. 14:42, Stephan Bosch wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Op 4-10-2019 om 12:10 schreef Demonhost via dovecot:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> If we use sieve redirect under dovecot 2.3.7.2 we end up with
>>>>>>>>>
>>>>>>>>> Oct 04 03:30:31 dockerhost docker[12154]: 2019-10-04T03:30:31 
>>>>>>>>> 53ac2ae27650 postfix: 0605F207B0F36: to=<xxxx at xxxx.xx>, 
>>>>>>>>> relay=127.0.0.1[127.0.0.1]:10024, delay=1.5, 
>>>>>>>>> delays=0.36/0/0/1.1, dsn=2.0.0, status=sent (250 2.0.0 from 
>>>>>>>>> MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 
>>>>>>>>> 6FC89207B0F38)
>>>>>>>>> Oct 04 03:30:31 dockerhost docker[12154]: 2019-10-04T03:30:31 
>>>>>>>>> 53ac2ae27650 postfix: 6FC89207B0F38: to=<xxxx at xxxx.xx>, 
>>>>>>>>> relay=dovecot, delay=0.31, delays=0.05/0/0/0.26, dsn=4.3.0, 
>>>>>>>>> status=deferred (Command died with signal 11: 
>>>>>>>>> "/usr/libexec/dovecot/dovecot-lda")
>>>>>>>>>
>>>>>>>>> Using docker with official alpine image.
>>>>>>>>>
>>>>>>>>> / # cat /etc/alpine-release
>>>>>>>>> 3.8.4
>>>>>>>>>
>>>>>>>>> / # apk info -v | grep dovecot
>>>>>>>>> WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or 
>>>>>>>>> directory
>>>>>>>>> WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or 
>>>>>>>>> directory
>>>>>>>>> dovecot-2.3.7.2-r0
>>>>>>>>> dovecot-fts-solr-2.3.7.2-r0
>>>>>>>>> dovecot-ldap-2.3.7.2-r0
>>>>>>>>> dovecot-pigeonhole-plugin-2.3.7.2-r0
>>>>>>>>> dovecot-pigeonhole-plugin-ldap-2.3.7.2-r0
>>>>>>>>>
>>>>>>>>> Sieve rule is:
>>>>>>>>> # rule:[test]
>>>>>>>>> if header :contains "subject" "test"
>>>>>>>>> {
>>>>>>>>>         redirect "testemail at gmail.com";
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> In host's dmesg we found the following:
>>>>>>>>> [213184.882341] traps: dovecot-lda[6128] general protection 
>>>>>>>>> ip:7ff6cf8144f7 sp:7fff5f800b30 error:0 in 
>>>>>>>>> libdovecot.so.0.0.0[7ff6cf724000+360000]
>>>>>>>>>
>>>>>>>>> Sorry, not knowledgeable enough on how to do the GBD debug.
>>>>>>>>> -----------------
>>>>>>>>> We went back to previous version and issue disappeared.
>>>>>>>>>
>>>>>>>>> 8b45bb255b67:/# cat /etc/alpine-release
>>>>>>>>> 3.8.4
>>>>>>>>> 8b45bb255b67:/# apk info -v | grep dovecot
>>>>>>>>> WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or 
>>>>>>>>> directory
>>>>>>>>> WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or 
>>>>>>>>> directory
>>>>>>>>> dovecot-2.3.6-r0
>>>>>>>>> dovecot-fts-solr-2.3.6-r0
>>>>>>>>> dovecot-ldap-2.3.6-r0
>>>>>>>>> dovecot-pigeonhole-plugin-2.3.6-r0
>>>>>>>>> dovecot-pigeonhole-plugin-ldap-2.3.6-r0
>>>>>>>>>
>>>>>>>>> Anyone else already had this problem or you know how to fix it?
>>>>>>>>
>>>>>>>> I can't readily reproduce it with the information available so 
>>>>>>>> far. Do you have the opportunity to obtain a GDB backtrace? You 
>>>>>>>> can e.g. run LDA manually at the command line with the same 
>>>>>>>> arguments and message input Postfix provides and wrap it in GDB 
>>>>>>>> if you can reproduce the crash.
>>>>>>>>
>>>>>>>> Your configuration may also help (output from `dovecot -n`)
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Stephan.
>>>>>>>>
>>>>>>
>>>>
>>


More information about the dovecot mailing list