[Dovecot] Segmentation fault running doveadm index (lucene) on a big mailbox

Florian Klink flokli at flokli.de
Tue Apr 15 18:18:46 UTC 2014


Am 15.04.2014 15:45, schrieb Teemu Huovila:
> On 04/15/2014 04:35 PM, Florian Klink wrote:
>> Hi,
>>
>> on a server running dovecot 2.2.12 I have a user with a quite big
>> mailbox (~37000 Mails in the INBOX).
>>
>> I tried to enable full text search using the fts_lucene backend (dovecot
>> 2.2.12).
> This patch (to be included in 2.2.13) addresses a different Lucene error, but might mitigate your issue as well.
> http://hg.dovecot.org/dovecot-2.2/rev/d63b209737be
> 
> If the issue remains and if possible, install dovecot dbg packages to get symbols and run a "bt full" instead of "bt".

Unfortunately, the patch didn't fix the problem. However, I attached a
full backtrace (with the applied patch, btw) including debug symbols.

It is attached, but I had to wipe some urls from the output. Hope thats
not a problem.

I hope this helps!

Florian
-------------- next part --------------
Starting program: /usr/bin/doveadm -v index -u <username> INBOX
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error
warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /lib64/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Program received signal SIGSEGV, Segmentation fault.
lucene_index_build_more (index=0x68d6d0, uid=<optimized out>, 
    data=data at entry=0x31975f0 "  <channel>    <title>------ ------------- ----------------- ------------- --- ---- - ---------------- -------</title>    <link>http://----------------/</link>    <description>RSS feed : http://------"..., size=size at entry=2995402, hdr_name=0x159f170 "<rss version=\"2.0\">")
    at lucene-wrapper.cc:539
539	lucene-wrapper.cc: Datei oder Verzeichnis nicht gefunden.
#0  lucene_index_build_more (index=0x68d6d0, uid=<optimized out>, 
    data=data at entry=0x31975f0 "  <channel>    <title>------ ------------- ----------------- ------------- --- ---- - ---------------- -------</title>    <link>http://----------------/</link>    <description>RSS feed : http://------"..., size=size at entry=2995402, hdr_name=0x159f170 "<rss version=\"2.0\">")
    at lucene-wrapper.cc:539
        id = L"\xffffdb50翿\024\000\024\000\xf73f3640翿𠨐\000\x35975f0\000\x129e1c0\000\xf70d46c2翿\024\000\xf76c79c0翿\024\000\xbfa4d8"
        namesize = <optimized out>
        datasize = 2991112
        dest = 0x7fffff4949c0 <error: Cannot access memory at address 0x7fffff4949c0>
#1  0x00007ffff66107ea in fts_backend_lucene_update_build_more (_ctx=0x692100, 
    data=0x31975f0 "  <channel>    <title>------ ------------- ----------------- ------------- --- ---- - ---------------- -------</title>    <link>http://----------------/</link>    <description>RSS feed : http://------"..., size=2995402) at fts-backend-lucene.c:407
        _data_stack_cur_id = 5
        ctx = 0x692100
        backend = 0x68d5d0
        ret = <optimized out>
#2  0x00007ffff6820c04 in fts_build_unstructured_header (ctx=<optimized out>, hdr=0xbfa4d8, 
    hdr=0xbfa4d8) at fts-build-mail.c:94
        data = <optimized out>
        buf = <optimized out>
        i = <optimized out>
#3  fts_build_mail_header (block=0x7fffffffdb70, block=0x7fffffffdb70, ctx=0x7fffffffdbb0)
    at fts-build-mail.c:121
        hdr = 0xbfa4d8
        key = {uid = 24238, type = FTS_BACKEND_BUILD_KEY_MIME_HDR, 
          hdr_name = 0x15cd990 "<rss version=\"2.0\">", body_content_type = 0x0, 
          body_content_disposition = 0x0}
#4  fts_build_mail_real (mail=0x69c1f0, update_ctx=0x692100) at fts-build-mail.c:341
        ctx = {mail = 0x69c1f0, update_ctx = 0x692100, content_type = 0x0, content_disposition = 0x0, 
          body_parser = 0x0, word_buf = 0x8281d0}
        parser = 0x1ce7820
        decoder = 0xbfa4c0
        raw_block = {part = 0x666128, hdr = 0x129e1c0, 
          data = 0x15555f0 "esearch:codesearch>\n      <codesearch:filetype>html</codesearch:filetype>\n    </codesearch:codesearch>\n  </url>\n  <url>\n    =\n<loc>http://----------------/----------------------/---------------------="..., size = 0}
        prev_part = 0x666128
        skip_body = false
        block = {part = 0x666128, hdr = 0xbfa4d8, data = 0x1d0a7f1 "6?\367\377\177", size = 0}
        binary_body = <optimized out>
        ret = <optimized out>
        input = 0x1caa788
        parts = 0x100005eae
        body_part = true
        body_added = true
#5  fts_build_mail (update_ctx=0x692100, mail=mail at entry=0x69c1f0) at fts-build-mail.c:378
        _data_stack_cur_id = 4
#6  0x00007ffff682567e in fts_mail_index (_mail=0x69c1f0) at fts-storage.c:451
        ft = 0x69a7b0
        flist = 0x67f688
#7  fts_mail_precache (_mail=0x69c1f0) at fts-storage.c:468
        _data_stack_cur_id = 3
        mail = 0x69c1f0
        fmail = <optimized out>
        ft = <optimized out>
#8  0x0000000000416621 in cmd_index_box_precache (box=<optimized out>) at doveadm-mail-index.c:69
        ctx = 0x69e4e0
        metadata = {guid = '\000' <repeats 15 times>, virtual_size = 0, cache_fields = 0x0, 
          precache_fields = (MAIL_FETCH_STREAM_HEADER | MAIL_FETCH_STREAM_BODY | MAIL_FETCH_RECEIVED_DATE | MAIL_FETCH_SAVE_DATE | MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE | MAIL_FETCH_UIDL_BACKEND | MAIL_FETCH_GUID), backend_ns_prefix = 0x0, backend_ns_type = (unknown: 0)}
        counter = 24237
        max = 37594
        status = {messages = 37594, recent = 0, unseen = 0, uidvalidity = 1362189120, uidnext = 38454, 
          first_unseen_seq = 0, first_recent_uid = 38454, last_cached_seq = 0, highest_modseq = 0, 
          highest_pvt_modseq = 0, keywords = 0x0, permanent_flags = 0, permanent_keywords = 0, 
          allow_new_keywords = 0, nonpermanent_modseqs = 0, no_modseq_tracking = 0, have_guids = 1, 
          have_save_guids = 1, have_only_guid128 = 0}
        mail = 0x69c1f0
        ret = 0
        trans = 0x6992a0
        search_args = 0x0
        seq = <optimized out>
#9  cmd_index_box (info=<optimized out>, info=<optimized out>, ctx=0x678e80) at doveadm-mail-index.c:118
        box = 0x693250
        status = {messages = 6697840, recent = 0, unseen = 4151399389, uidvalidity = 32767, 
          uidnext = 4294958416, first_unseen_seq = 32767, first_recent_uid = 6786912, 
          last_cached_seq = 0, highest_modseq = 558362525697, highest_pvt_modseq = 0, keywords = 0x0, 
          permanent_flags = 4151137592, permanent_keywords = 1, allow_new_keywords = 1, 
          nonpermanent_modseqs = 1, no_modseq_tracking = 1, have_guids = 1, have_save_guids = 1, 
          have_only_guid128 = 1}
        ret = 0
#10 cmd_index_run (_ctx=0x678e80, user=0x6883d0) at doveadm-mail-index.c:189
        _data_stack_cur_id = 2
        iter = 0x691b60
        info = <optimized out>
        ret = 0
        user = 0x6883d0
        _ctx = 0x678e80
        ctx = 0x678e80
        i = <optimized out>
#11 0x0000000000412473 in doveadm_mail_next_user (ctx=0x678e80, input=<optimized out>, 
    error_r=0x7fffffffde58) at doveadm-mail.c:314
        error = 0x7fffffffde58 ""
        ret = <optimized out>
        error_r = 0x7fffffffde58
        input = <optimized out>
        ctx = 0x678e80
        ip = <optimized out>
        ret = 0
#12 0x0000000000413107 in doveadm_mail_cmd (argv=0x66a3b8, argc=4, cmd=0x66ea48) at doveadm-mail.c:525
        input = {module = 0x0, service = 0x44a71b "doveadm", username = 0x66a3e5 "<username>", 
          session_id = 0x0, local_ip = {family = 0, u = {ip6 = {__in6_u = {
                  __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, 
                  __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {
              ip6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 
                    0, 0, 0}, __u6_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 = 0}
        ctx = 0x678e80
        getopt_args = 0x662658 "qn:AS:u:"
        ret = <optimized out>
        c = <optimized out>
        wildcard_user = 0x0
        error = 0x0
#13 doveadm_mail_try_run (cmd_name=cmd_name at entry=0x66a3dc "index", argc=argc at entry=4, 
    argv=argv at entry=0x66a3a0) at doveadm-mail.c:617
        cmd = 0x66ea48
#14 0x0000000000412068 in main (argc=4, argv=0x66a3a0) at doveadm.c:398
        cmd_name = 0x66a3dc "index"
        i = <optimized out>
        quick_init = false
        c = <optimized out>
A debugging session is active.

	Inferior 1 [process 23829] will be killed.

Quit anyway? (y or n) 


More information about the dovecot mailing list