kjonca@o2.pl (Kamil Jońca) writes:
I don't know if I did it properly (how to compile it with debug symbols?)
After sending previous post I realized that debug symbols should be in dovecot-dbg package. Below backtrace:
gdb -c ~/core /usr/lib/dovecot/dovecot-lda GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 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-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/lib/dovecot/dovecot-lda...Reading symbols from /usr/lib/debug/usr/lib/dovecot/dovecot-lda...done. done. [New LWP 25303]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/dovecot//dovecot-lda'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f99d591fe6f in mail_storage_try_copy (mail=0x198dbb0, _ctx=0x7fff8914fc28) at mail-copy.c:56
56 mail-copy.c: No such file or directory.
(gdb) bt full
#0 0x00007f99d591fe6f in mail_storage_try_copy (mail=0x198dbb0, _ctx=0x7fff8914fc28) at mail-copy.c:56
ctx = 0x19a6610
pmail = 0x198dbb0
from_envelope = 0x0
input = <optimized out>
guid = <optimized out>
received_date = -1
#1 mail_storage_copy (ctx=ctx@entry=0x19a6610, mail=mail@entry=0x198dbb0) at mail-copy.c:93
No locals.
#2 0x00007f99d58f1561 in maildir_copy (ctx=0x19a6610, mail=0x198dbb0) at maildir-copy.c:148
_t = <optimized out>
mbox = <optimized out>
__FUNCTION__ = "maildir_copy"
#3 0x00007f99d592723b in mailbox_copy (_ctx=_ctx@entry=0x7fff8914fd30, mail=mail@entry=0x198dbb0) at mail-storage.c:1721
ctx = 0x19a6610
box = 0x19942c0
keywords = 0x0
ret = <optimized out>
#4 0x00007f99d377c0c1 in act_store_execute (action=<optimized out>, aenv=0x1980960, tr_context=0x1980a88) at sieve-actions.c:551
trans = 0x1980a88
mail = 0x198dbb0
real_mail = <optimized out>
save_ctx = 0x0
keywords = 0x0
result = true
#5 0x00007f99d37724bb in _sieve_result_implicit_keep (result=result@entry=0x1980930, rollback=<optimized out>) at sieve-result.c:996
rac = <optimized out>
success = true
rsef = <optimized out>
rsef_first = 0x0
tr_context = 0x1980a88
act_keep = {def = 0x7f99d39b9500, ext = 0x0, location = 0x0, context = 0x0, mail = 0x198dbb0, executed = false}
#6 0x00007f99d377385f in sieve_result_execute (result=0x1980930, keep=keep@entry=0x0) at sieve-result.c:1230
implicit_keep = true
success = true
commit_ok = true
rac = 0x0
first_action = 0x1
#7 0x00007f99d3782f65 in sieve_execute (sbin=<optimized out>, msgdata=<optimized out>, senv=<optimized out>, ehandler=ehandler@entry=0x1975140, flags=flags@entry=SIEVE_RUNTIME_FLAG_NOGLOBAL,
keep=keep@entry=0x0) at sieve.c:508
result = 0x1980930
ret = 1
#8 0x00007f99d39c4112 in lda_sieve_singlescript_execute (srctx=0x7fff8914ffa0) at lda-sieve-plugin.c:436
sbin = 0x19782a0
rtflags = SIEVE_RUNTIME_FLAG_NOGLOBAL
debug = false
svinst = 0x1971440
script = 0x1974d30
user_script = <optimized out>
cpflags = SIEVE_COMPILE_FLAG_NOGLOBAL
ret = <optimized out>
ehandler = 0x1975140
error = <optimized out>
#9 lda_sieve_deliver_mail (mdctx=0x7fff891501b0, storage_r=0x7fff89150140) at lda-sieve-plugin.c:812
count = <optimized out>
i = <optimized out>
_data_stack_cur_id = 2
srctx = {svinst = 0x1971440, mdctx = 0x7fff891501b0, scripts = 0x1944ff0, script_count = 1, user_script = 0x1974d30, main_script = 0x1974d30, msgdata = 0x7fff8914ff70, scriptenv = 0x7fff89150000,
user_ehandler = 0x1975140, master_ehandler = 0x1974c20, userlog = 0x1945070 "/home/kjonca/.dovecot.sieve.log"}
svenv = {hostname = 0x194f2e0 "alfa.kjonca", base_dir = 0x195be78 "/var/run/dovecot", username = 0x195b440 "kjonca", home_dir = 0x195c4a8 "/home/kjonca", flags = SIEVE_FLAG_HOME_RELATIVE}
svinst = 0x1971440
msgdata = {mail = 0x196b010, return_path = 0x0, orig_envelope_to = 0x1944c90 "kjonca@alfa.kjonca", final_envelope_to = 0x1944c90 "kjonca@alfa.kjonca", auth_user = 0x195b440 "kjonca",
id = 0x196d660 "20000126133839.B2888@localhost.localdomain"}
scriptenv = {action_log_format = 0x194f358 "msgid=%m: %$", user = 0x195b380, default_mailbox = 0x403583 "INBOX", postmaster_address = 0x194f2d0 "root@localhost", mailbox_autocreate = false,
mailbox_autosubscribe = false, script_context = 0x7fff891501b0, smtp_open = 0x7f99d39c3030
-- http://blogdebart.pl/2012/06/24/hiena/ You can't carve your way to success without cutting remarks.