Re: [UPDATE]: Another Crash in service imap with version 2.2.13 - Debian Wheezy

2014-07-03 Thread Timo Sirainen
On 26.6.2014, at 16.10, Urban Loesch b...@enas.net wrote:

 #1  0x7fbf26650c44 in mailbox_save_cancel (_ctx=optimized out) at 
 mail-storage.c:2116
ctx = 0xa95500
keywords = 0x0
mail = optimized out
 #2  0x7fbf2665104f in mailbox_save_begin (ctx=ctx@entry=0x7fff64b53048, 
 input=0xaaaea0) at mail-storage.c:2041
box = 0xa6f800
ret = optimized out
 #3  0x7fbf26648bb6 in mail_storage_try_copy (mail=0xa90d20, 
 _ctx=0x7fff64b53048) at mail-copy.c:76
ctx = 0xa95500
pmail = 0xa90d20
input = 0xaaaea0
 #4  mail_storage_copy (ctx=0x0, mail=0xa90d20) at mail-copy.c:101
 No locals.
 #5  0x7fbf24f12679 in notify_copy (ctx=0xa95500, mail=0xa90d20) at 
 notify-storage.c:107
lt = 0xa8bdd0
lbox = 0xa70870
ret = optimized out
 #6  0x7fbf2573d06b in acl_copy (ctx=0xa95500, mail=0xa90d20) at 
 acl-mailbox.c:435
t = optimized out
abox = 0xa6fe48
 #7  0x7fbf26650e8d in mailbox_copy (_ctx=_ctx@entry=0x7fff64b53190, 
 mail=0xa90d20) at mail-storage.c:2152
ctx = 0xa95500
t = 0xa8de20
keywords = 0x0
pvt_flags = 0
backend_mail = 0xa90d20
ret = optimized out
__FUNCTION__ = mailbox_copy

The client is trying to use COPY or MOVE command, but the copying fails for 
some reason and the cleanup code crashes. I can't reproduce this though, so 
would be helpful to know what exactly it's doing. So getting the gdb output for 
these commands (instead of just bt full) would help:

p *ctx
p *ctx.dest_mail
f 7
p (*_ctx).transaction.box.vname
p (*_ctx).transaction.box.storage.error_string
p mail.box.vname


Re: [UPDATE]: Another Crash in service imap with version 2.2.13 - Debian Wheezy

2014-07-03 Thread Urban Loesch

Hi,

Am 03.07.2014 18:58, schrieb Timo Sirainen:

On 26.6.2014, at 16.10, Urban Loesch b...@enas.net wrote:




The client is trying to use COPY or MOVE command, but the copying fails for 
some reason and the cleanup code crashes. I can't reproduce this though, so 
would be helpful to know what exactly it's doing. So getting the gdb output for 
these commands (instead of just bt full) would help:

p *ctx
p *ctx.dest_mail
f 7
p (*_ctx).transaction.box.vname
p (*_ctx).transaction.box.storage.error_string
p mail.box.vname



After some days the customer begans to complain, that he is not able 
read his mails with his IPhone.


So I decided to delete his account and reinstalled it on the IPhone, 
since that it works without error.


Unfortunately now I switched to the latest hg version so I don't have 
the affected imap binary any more.


But I have the core file from the latest crash. If you would like I can 
send it to you off list.


Many Thanks
Urban


Another Crash in service imap with version 2.2.13 - Debian Wheezy

2014-06-26 Thread Urban Loesch
Hi,

yesterday I updated my second server from Debian Squeeze to Debian Wheezy.
Since todaay I get the followinig errors in my logs:

Error-Log:
...
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): Fatal: master: service(imap): child 28898 killed 
with
signal 11 (core dumped)
...

Mail-log
...
Jun 26 09:08:28 mailstore dovecot: imap-login: ID sent: 
x-session-id=iuMX3Lf8fACXLrFC, x-originating-ip=CLIENT_IP, 
x-originating-port=52092,
x-connected-ip=PROXY_IP, x-connected-port=143, x-proxy-ttl=4: user=, 
rip=CLIENT_IP, lip=PROXY_IP, secured, session=iuMX3Lf8fACXLrFC
Jun 26 09:08:28 mailstore dovecot: imap-login: Login: user=u...@domain.net, 
method=PLAIN, rip=CLIENT_IP, lip=PROXY_IP, mpid=28898, secured,
session=iuMX3Lf8fACXLrFC
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): ID sent: name=iPhone Mail, version=11D201, os=iOS,
os-version=7.1.1 (11D201)
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): Fatal: master: service(imap): child 28898 killed 
with
signal 11 (core dumped)
...

I made a backtrace:

- start backtrace -
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `dovecot/imap'.
Program terminated with signal 11, Segmentation fault.
#0  0x in ?? ()
(gdb) bt full
#0  0x in ?? ()
No symbol table info available.
#1  0x7fbf26650c44 in mailbox_save_cancel (_ctx=optimized out) at 
mail-storage.c:2116
ctx = 0xa95500
keywords = 0x0
mail = optimized out
#2  0x7fbf2665104f in mailbox_save_begin (ctx=ctx@entry=0x7fff64b53048, 
input=0xaaaea0) at mail-storage.c:2041
box = 0xa6f800
ret = optimized out
#3  0x7fbf26648bb6 in mail_storage_try_copy (mail=0xa90d20, 
_ctx=0x7fff64b53048) at mail-copy.c:76
ctx = 0xa95500
pmail = 0xa90d20
input = 0xaaaea0
#4  mail_storage_copy (ctx=0x0, mail=0xa90d20) at mail-copy.c:101
No locals.
#5  0x7fbf24f12679 in notify_copy (ctx=0xa95500, mail=0xa90d20) at 
notify-storage.c:107
lt = 0xa8bdd0
lbox = 0xa70870
ret = optimized out
#6  0x7fbf2573d06b in acl_copy (ctx=0xa95500, mail=0xa90d20) at 
acl-mailbox.c:435
t = optimized out
abox = 0xa6fe48
#7  0x7fbf26650e8d in mailbox_copy (_ctx=_ctx@entry=0x7fff64b53190, 
mail=0xa90d20) at mail-storage.c:2152
ctx = 0xa95500
t = 0xa8de20
keywords = 0x0
pvt_flags = 0
backend_mail = 0xa90d20
ret = optimized out
__FUNCTION__ = mailbox_copy
#8  0x0040dd34 in fetch_and_copy (copy_count_r=synthetic pointer, 
src_uidset_r=synthetic pointer, search_args=optimized out,
src_trans_r=0x7fff64b53168, t=0xa8de20, move=false, client=0xa00f40) at 
cmd-copy.c:70
search_ctx = 0xa90a80
src_trans = 0xa8f3f0
srcset_ctx = {str = 0x9d4318, first_uid = 0, last_uid = 4294967295}
ret = 1
save_ctx = 0x0
mail = 0xa90d20
copy_count = 1
src_uidset = 0x9d4318
#9  cmd_copy_full (cmd=0xa01a50, move=false) at cmd-copy.c:123
client = 0xa00f40
dest_storage = optimized out
destbox = 0xa6f800
t = 0xa8de20
src_trans = optimized out
search_args = 0xa6e7f0
messageset = 0xa04410 1309,1310
mailbox = 0xa04420 [rolmail]/Unseen
src_uidset = optimized out
sync_flags = 0
imap_flags = 0
changes = {pool = 0x7fff64b53290, uid_validity = 1689596352, saved_uids 
= {arr = {buffer = 0x9dd0f0, element_size = 10492496}, v = 0x9dd0f0,
v_modifiable = 0x9dd0f0}, ignored_modseq_changes = 10492496, changed = false,
  no_read_perm = false}
copy_count = optimized out
msg = optimized out
ret = optimized out
__FUNCTION__ = cmd_copy_full
#10 0x0041841c in command_exec (cmd=cmd@entry=0xa01a50) at 
imap-commands.c:158
hook = 0x9dd100
ret = optimized out
#11 0x00417480 in client_command_input (cmd=cmd@entry=0xa01a50) at 
imap-client.c:778
client = 0xa00f40
---Type return to continue, or q return to quit---
command = optimized out
__FUNCTION__ = client_command_input
#12 0x00417514 in client_command_input (cmd=0xa01a50) at 
imap-client.c:839
client = 0xa00f40
command = optimized out
__FUNCTION__ = client_command_input
#13 0x004177f5 in client_handle_next_command (remove_io_r=synthetic 
pointer, client=0xa00f40) at imap-client.c:877
No locals.
#14 client_handle_input (client=client@entry=0xa00f40) at imap-client.c:889
_data_stack_cur_id = 3
ret = 2
remove_io = false
handled_commands = false
__FUNCTION__ = client_handle_input
#15 0x00417ba2 in client_input (client=0xa00f40) at imap-client.c:931
cmd = optimized out
   

[UPDATE]: Another Crash in service imap with version 2.2.13 - Debian Wheezy

2014-06-26 Thread Urban Loesch
Hi,

short update.
I switched back to Debian Squeeze. Same Dovecot Version 2.2.13.
The crash happens also on Squeeze.

Very strange is that the crash don't happened yesterday.
And it happens only to one certain user. Other users with the same iOS 
os-version=7.1.1 (11D201) aren't affected.

Also very strange is, that the crash doens't happen every time (I don't saw 
that before).

Logs in cronological order from the last attempt:
...
Jun 26 15:00:07 mailstore dovecot: imap-login: ID sent: 
x-session-id=1ji1xbz8fACXEq4b, x-originating-ip=CLIENT_IP, 
x-originating-port=51580,
x-connected-ip=PROXY_IP, x-connected-port=143, x-proxy-ttl=4: user=, 
rip=CLIENT_IP, lip=PROXY_IP, secured, session=1ji1xbz8fACXEq4b
Jun 26 15:00:08 mailstore dovecot: imap-login: Login: user=u...@domain.net, 
method=PLAIN, rip=CLIENT_IP, lip=PROXY_IP, mpid=6407, secured,
session=1ji1xbz8fACXEq4b
Jun 26 15:00:08 mailstore dovecot: imap(u...@domain.net pid:6407 
session:1ji1xbz8fACXEq4b): ID sent: name=iPhone Mail, version=11D201, os=iOS,
os-version=7.1.1 (11D201)
Jun 26 15:00:09 mailstore dovecot: imap(u...@domain.net pid:6407 
session:1ji1xbz8fACXEq4b): Fatal: master: service(imap): child 6407 killed 
with
signal 11 (core dumped)

Jun 26 15:00:09 mailstore dovecot: imap-login: ID sent: 
x-session-id=hWTKxbz8gACXEq4b, x-originating-ip=CLIENT_IP, 
x-originating-port=51584,
x-connected-ip=PROXY_IP, x-connected-port=143, x-proxy-ttl=4: user=, 
rip=CLIENT_IP, lip=PROXY_IP, secured, session=hWTKxbz8gACXEq4b
Jun 26 15:00:09 mailstore dovecot: imap-login: Login: user=u...@domain.net, 
method=PLAIN, rip=CLIENT_IP, lip=PROXY_IP, mpid=46064, secured,
session=hWTKxbz8gACXEq4b
Jun 26 15:00:09 mailstore dovecot: imap(u...@domain.net pid:46064 
session:hWTKxbz8gACXEq4b): ID sent: name=iPhone Mail, version=11D201, os=iOS,
os-version=7.1.1 (11D201)
Jun 26 15:00:09 mailstore dovecot: imap(u...@domain.net pid:46064 
session:hWTKxbz8gACXEq4b): Fatal: master: service(imap): child 46064 killed 
with
signal 11 (core dumped)

Jun 26 15:00:18 mailstore dovecot: imap-login: ID sent: 
x-session-id=M7BRxrz8iQCXEq4b, x-originating-ip=CLIENT_IP, 
x-originating-port=51593,
x-connected-ip=PROXY_IP, x-connected-port=143, x-proxy-ttl=4: user=, 
rip=CLIENT_IP, lip=PROXY_IP, secured, session=M7BRxrz8iQCXEq4b
Jun 26 15:00:18 mailstore dovecot: imap-login: Login: user=u...@domain.net, 
method=PLAIN, rip=CLIENT_IP, lip=PROXY_IP, mpid=41143, secured,
session=M7BRxrz8iQCXEq4b
Jun 26 15:00:18 mailstore dovecot: imap(u...@domain.net pid:41143 
session:M7BRxrz8iQCXEq4b): ID sent: name=iPhone Mail, version=11D201, os=iOS,
os-version=7.1.1 (11D201)
Jun 26 15:02:17 mailstore dovecot: imap(u...@domain.net pid:41143 
session:M7BRxrz8iQCXEq4b): Connection closed bytes=341/1991 
session=M7BRxrz8iQCXEq4b
...

The last session has been endet normallly. Very strange to me.

I think this is a problem only with that specific user and his Iphone.
On the other hand, the crash isn't fine at all.

Thanks
Urban Loesch



 Original-Nachricht 
Betreff: Another Crash in service imap with version 2.2.13 - Debian Wheezy
Datum: Thu, 26 Jun 2014 09:25:27 +0200
Von: Urban Loesch b...@enas.net
Antwort an: Dovecot Mailing List dovecot@dovecot.org
An: Dovecot Mailing List dovecot@dovecot.org

Hi,

yesterday I updated my second server from Debian Squeeze to Debian Wheezy.
Since todaay I get the followinig errors in my logs:

Error-Log:
...
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): Fatal: master: service(imap): child 28898 killed 
with
signal 11 (core dumped)
...

Mail-log
...
Jun 26 09:08:28 mailstore dovecot: imap-login: ID sent: 
x-session-id=iuMX3Lf8fACXLrFC, x-originating-ip=CLIENT_IP, 
x-originating-port=52092,
x-connected-ip=PROXY_IP, x-connected-port=143, x-proxy-ttl=4: user=, 
rip=CLIENT_IP, lip=PROXY_IP, secured, session=iuMX3Lf8fACXLrFC
Jun 26 09:08:28 mailstore dovecot: imap-login: Login: user=u...@domain.net, 
method=PLAIN, rip=CLIENT_IP, lip=PROXY_IP, mpid=28898, secured,
session=iuMX3Lf8fACXLrFC
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): ID sent: name=iPhone Mail, version=11D201, os=iOS,
os-version=7.1.1 (11D201)
Jun 26 09:08:28 mailstore dovecot: imap(u...@domain.net pid:28898 
session:iuMX3Lf8fACXLrFC): Fatal: master: service(imap): child 28898 killed 
with
signal 11 (core dumped)
...

I made a backtrace:

- start backtrace -
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
Core was generated by `dovecot/imap'.
Program terminated with signal 11, Segmentation fault.
#0  0x in ?? ()
(gdb) bt full
#0  0x in ?? ()
No symbol table info available.
#1  0x7fbf26650c44 in mailbox_save_cancel (_ctx=optimized out) at 
mail-storage.c:2116
ctx = 0xa95500
keywords = 0x0
mail = optimized out
#2  0x7fbf2665104f in mailbox_save_begin (ctx=ctx@entry