On Wed, 18 Nov 2009 11:55:40 -0500
Timo Sirainen <t...@iki.fi> wrote:

> On Wed, 2009-11-18 at 10:04 +0200, Nikita Koshikov wrote:
> 
> > #10 0x080d03d2 in buffer_write (_buf=0xb7e1a670, pos=67100436, 
> > data=0xbb53ae0, data_size=32824) at buffer.c:63
> > No locals.
> > #11 0x080d04f6 in buffer_append (buf=0xb7e1a670, data=0xbb53ae0, 
> > data_size=32824) at buffer.c:168
> > No locals.
> > #12 0x080b54cc in mail_transaction_log_append (t=0xb205218, 
> > log_file_seq_r=0xbf8541f0, log_file_offset_r=0xbf8541e0) at 
> > mail-transaction-log-append.c:333
> 
> Interesting. If you still have the core and do:
> 
> fr 12
> p *hdr
> p offset
> p hdrs[ext_id]
> 
With old core(not sure if it's exactly the same):

(gdb) fr 12
#12 0x080b54cc in mail_transaction_log_append (t=0xb205218, 
log_file_seq_r=0xbf8541f0, log_file_offset_r=0xbf8541e0) at 
mail-transaction-log-append.c:333
warning: Source file is more recent than executable.
333                     } else {
(gdb) p *hdr
No symbol "hdr" in current context.
(gdb) p offset
No symbol "offset" in current context.
(gdb) p hdrs[ext_id]
No symbol "hdrs" in current context.

> What does it print? Also could you try what it logs with the attached patch?
> 
Here is logs, from new crash:

Nov 19 08:57:34 IMAP(al...@domain.com): Warning: header rewrite: size=32824
Nov 19 08:57:34 IMAP(al...@domain.com): Warning: mail_index_update_header_ext: 
ext_id=2 offset=0 size=32824
Nov 19 08:57:34 IMAP(al...@domain.com): Warning: log_append_ext_hdr_update: 
size=65536
Nov 19 08:57:35 IMAP(al...@domain.com): Panic: data stack: Out of memory when 
allocating 268435472 bytes
Nov 19 08:57:35 IMAP(al...@agromat.ua): Error: Raw backtrace: imap [0x80d23e1] 
-> imap [0x80d2452] -> imap [0x80d1db9] -> imap [0x80d0b8d] -> imap [0x80d1007] 
-> imap [0x80db988] -> imap [0x80cff3a] -> imap(buffer_write+0xd2) [0x80d0432] 
-> imap(buffer_append+0x26) [0x80d0556] -> 
imap(mail_transaction_log_append+0x624) [0x80b5504] -> imap [0x80aa059] -> 
imap(mail_index_sync_commit+0xa5) [0x80ad555] -> 
/usr/lib/dovecot/imap/lib20_virtual_plugin.so [0xb7e6cc06] -> 
/usr/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x71c) 
[0xb7e6f71c] -> imap(mailbox_sync+0x35) [0x8097595] -> 
imap(cmd_select_full+0x3d8) [0x8062fb8] -> imap(cmd_select+0x19) [0x80636f9] -> 
imap [0x806597c] -> imap [0x8065a23] -> imap(client_handle_input+0x2d) 
[0x8065b7d] -> imap(client_input+0x5f) [0x80664bf] -> 
imap(io_loop_handler_run+0xe0) [0x80da540] -> imap(io_loop_run+0x20) 
[0x80d99e0] -> imap(main+0x5dc) [0x806ee4c] -> 
/lib/libc.so.6(__libc_start_main+0xe5) [0xb7eba725] -> imap [0x805e281]
Nov 19 08:57:36 dovecot: Error: child 16124 (imap) killed with signal 6 (core 
dumped)

From new core file:
(gdb) fr 12
#12 0x080b5504 in mail_transaction_log_append (t=0xb205218, 
log_file_seq_r=0xbf9162b0, log_file_offset_r=0xbf9162a0) at 
mail-transaction-log-append.c:337
337     mail-transaction-log-append.c: No such file or directory.
        in mail-transaction-log-append.c
(gdb) p *hdr
No symbol "hdr" in current context.
(gdb) p offset
No symbol "offset" in current context.
(gdb) p hdrs[ext_id]
No symbol "hdrs" in current context.

And attached current gdb-trace.
(gdb) bt full
#0  0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ece660 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0xb7ecfe98 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0x080d23f5 in default_fatal_finish (type=<value optimized out>, status=0) at failures.c:160
        backtrace = 0x92700478 "imap [0x80d23e1] -> imap [0x80d2452] -> imap [0x80d1db9] -> imap [0x80d0b8d] -> imap [0x80d1007] -> imap [0x80db988] -> imap [0x80cff3a] -> imap(buffer_write+0xd2) [0x80d0432] -> imap(buffer_append+0x"...
#4  0x080d2452 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x80f9b9c "data stack: Out of memory when allocating %u bytes", 
    args=0xbf915fb4 "\020") at failures.c:443
No locals.
#5  0x080d1db9 in i_panic (format=0x80f9b9c "data stack: Out of memory when allocating %u bytes") at failures.c:207
No locals.
#6  0x080d0b8d in mem_block_alloc (min_size=134217728) at data-stack.c:291
        block = (struct stack_block *) 0x0
        prev_size = <value optimized out>
        alloc_size = 268435456
#7  0x080d1007 in t_malloc_real (size=<value optimized out>, permanent=true) at data-stack.c:352
        block = (struct stack_block *) 0x6
        ret = <value optimized out>
        alloc_size = 134217728
#8  0x080db988 in pool_data_stack_realloc (pool=0xbb4c808, mem=0xb28b4018, old_size=67108857, new_size=134217728) at mempool-datastack.c:127
No locals.
#9  0x080cff3a in buffer_alloc (buf=0xbb4c818, size=134217728) at buffer.c:32
        __PRETTY_FUNCTION__ = "buffer_alloc"
#10 0x080d0432 in buffer_write (_buf=0xbb4c818, pos=67100436, data=0xbb711d0, data_size=32824) at buffer.c:63
No locals.
#11 0x080d0556 in buffer_append (buf=0xbb4c818, data=0xbb711d0, data_size=32824) at buffer.c:168
No locals.
#12 0x080b5504 in mail_transaction_log_append (t=0xb205218, log_file_seq_r=0xbf9162b0, log_file_offset_r=0xbf9162a0) at mail-transaction-log-append.c:337
        index = (struct mail_index *) 0x8125118
        ret = <value optimized out>
        __PRETTY_FUNCTION__ = "mail_transaction_log_append"
#13 0x080aa059 in mail_index_transaction_commit_v (t=0x0, log_file_seq_r=0xbf9162b0, log_file_offset_r=0xbf9162a0) at mail-index-transaction.c:585
        ret = <value optimized out>
        __PRETTY_FUNCTION__ = "mail_index_transaction_commit_v"
#14 0x080ad555 in mail_index_sync_commit (_ctx=0xb20468c) at mail-index-sync.c:763
        ctx = (struct mail_index_sync_ctx *) 0x6
        index = (struct mail_index *) 0x8125118
        seq = 0
        next_uid = 1
        offset = 0
        want_rotate = <value optimized out>
(gdb) bt full
#0  0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ece660 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0xb7ecfe98 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0x080d23f5 in default_fatal_finish (type=<value optimized out>, status=0) at failures.c:160
        backtrace = 0x92700478 "imap [0x80d23e1] -> imap [0x80d2452] -> imap [0x80d1db9] -> imap [0x80d0b8d] -> imap [0x80d1007] -> imap [0x80db988] -> imap [0x80cff3a] -> imap(buffer_write+0xd2) [0x80d0432] -> imap(buffer_append+0x"...
#4  0x080d2452 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x80f9b9c "data stack: Out of memory when allocating %u bytes", 
    args=0xbf915fb4 "\020") at failures.c:443
No locals.
#5  0x080d1db9 in i_panic (format=0x80f9b9c "data stack: Out of memory when allocating %u bytes") at failures.c:207
No locals.
#6  0x080d0b8d in mem_block_alloc (min_size=134217728) at data-stack.c:291
        block = (struct stack_block *) 0x0
        prev_size = <value optimized out>
        alloc_size = 268435456
#7  0x080d1007 in t_malloc_real (size=<value optimized out>, permanent=true) at data-stack.c:352
        block = (struct stack_block *) 0x6
        ret = <value optimized out>
        alloc_size = 134217728
#8  0x080db988 in pool_data_stack_realloc (pool=0xbb4c808, mem=0xb28b4018, old_size=67108857, new_size=134217728) at mempool-datastack.c:127
No locals.
#9  0x080cff3a in buffer_alloc (buf=0xbb4c818, size=134217728) at buffer.c:32
        __PRETTY_FUNCTION__ = "buffer_alloc"
#10 0x080d0432 in buffer_write (_buf=0xbb4c818, pos=67100436, data=0xbb711d0, data_size=32824) at buffer.c:63
No locals.
#11 0x080d0556 in buffer_append (buf=0xbb4c818, data=0xbb711d0, data_size=32824) at buffer.c:168
No locals.
#12 0x080b5504 in mail_transaction_log_append (t=0xb205218, log_file_seq_r=0xbf9162b0, log_file_offset_r=0xbf9162a0) at mail-transaction-log-append.c:337
        index = (struct mail_index *) 0x8125118
        ret = <value optimized out>
        __PRETTY_FUNCTION__ = "mail_transaction_log_append"
#13 0x080aa059 in mail_index_transaction_commit_v (t=0x0, log_file_seq_r=0xbf9162b0, log_file_offset_r=0xbf9162a0) at mail-index-transaction.c:585
        ret = <value optimized out>
        __PRETTY_FUNCTION__ = "mail_index_transaction_commit_v"
#14 0x080ad555 in mail_index_sync_commit (_ctx=0xb20468c) at mail-index-sync.c:763
        ctx = (struct mail_index_sync_ctx *) 0x6
        index = (struct mail_index *) 0x8125118
        seq = 0
        next_uid = 1
        offset = 0
        want_rotate = <value optimized out>
        ret = <value optimized out>
#15 0xb7e6cc06 in virtual_sync_finish (ctx=0xb204688, success=true) at virtual-sync.c:1424
---Type <return> to continue, or q <return> to quit---
        ret = 0
#16 0xb7e6f71c in virtual_storage_sync_init (box=0x8126a58, flags=65) at virtual-sync.c:1489
        sync_ctx = <value optimized out>
        ret = <value optimized out>
#17 0x08097595 in mailbox_sync (box=0x8126a58, flags=65, status_items=239, status_r=0xbf916488) at mail-storage.c:593
        ctx = <value optimized out>
#18 0x08062fb8 in cmd_select_full (cmd=0x8116e00, readonly=false) at cmd-select.c:273
        client = (struct client *) 0x8116b70
        box = (struct mailbox *) 0xbf9164f8
        ctx = (struct imap_select_context *) 0x8116e98
        args = (const struct imap_arg *) 0x8119680
        mailbox = 0x8109338 "all"
        ret = <value optimized out>
        __PRETTY_FUNCTION__ = "cmd_select_full"
#19 0x080636f9 in cmd_select (cmd=0x8116e00) at cmd-select.c:389
No locals.
#20 0x0806597c in client_command_input (cmd=0x8116e00) at client.c:612
        client = (struct client *) 0x8116b70
        command = <value optimized out>
        __PRETTY_FUNCTION__ = "client_command_input"
#21 0x08065a23 in client_command_input (cmd=0x8116e00) at client.c:661
        client = (struct client *) 0x8116b70
        command = <value optimized out>
        __PRETTY_FUNCTION__ = "client_command_input"
#22 0x08065b7d in client_handle_input (client=0x8116b70) at client.c:702
        _data_stack_cur_id = 3
        ret = false
        remove_io = <value optimized out>
        handled_commands = false
        __PRETTY_FUNCTION__ = "client_handle_input"
#23 0x080664bf in client_input (client=0x8116b70) at client.c:753
        cmd = <value optimized out>
        output = (struct ostream *) 0x8116d24
        bytes = <value optimized out>
        __PRETTY_FUNCTION__ = "client_input"
#24 0x080da540 in io_loop_handler_run (ioloop=0x81119b0) at ioloop-epoll.c:208
        ctx = (struct ioloop_handler_context *) 0x8111ab8
        event = (const struct epoll_event *) 0x8111af8
        list = (struct io_list *) 0x8116da8
        io = (struct io_file *) 0x8116d80
        tv = {tv_sec = 4, tv_usec = 994964}
        t_id = 2
        msecs = <value optimized out>
        ret = 1
        i = 0
        j = 0
---Type <return> to continue, or q <return> to quit---
        call = <value optimized out>
#25 0x080d99e0 in io_loop_run (ioloop=0x81119b0) at ioloop.c:335
No locals.
#26 0x0806ee4c in main (argc=Cannot access memory at address 0x3efc
) at main.c:327
No locals.

Reply via email to