[Dovecot] 2.0.beta4, Panic: stream doesn't support seeking backwards
Hi,
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards Mar 29 13:42:46 [dovecot] imap(juergen): Raw backtrace: /usr/lib/dovecot/libdovecot.so.0 [0xb76b7ec4] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76b7f2c] -> /usr/lib/dovecot/libdovecot.so.0(i_error+0) [0xb76b8193] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76c02cd] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_seek+0xbb) [0xb76be1db] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76c08a9] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x6e) [0xb76be27e] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x40) [0xb76be570] -> /usr/lib/dovecot/libdovecot.so.0(message_parse_header_next+0x6d) [0xb76a7b6d] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76a4302] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76a498f] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x6e) [0xb76be27e] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76a3f61] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76a4072] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_seek+0xbb) [0xb76be1db] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x52) [0xb76be262] -> /usr/lib/dovecot/libdovecot.so.0 [0xb76c246d] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x6e) [0xb76be27e] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_save_continue+0x4c) [0xb776ca6c] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_continue+0x14) [0xb7708964] -> dovecot/imap [0x804e32f] -> dovecot/imap [0x804ed31] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd1) [0xb76c38f1] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x29) [0xb76c29f9] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x25) [0xb76b1c45] -> dovecot/imap(main+0x1b3) [0x805da13] -> /lib/libc.so.6(__libc_start_main+0xdb) [0xb7559a3b] -> dovecot/imap [0x804e161] Mar 29 13:42:46 [dovecot] master: service(imap): child 21107 killed with signal 6 (core dumps disabled)
# dovecot -n
# 2.0.beta4: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.10 i686
listen = *
login_access_sockets = tcpwrap
passdb {
driver = shadow
}
service tcpwrap {
unix_listener login/tcpwrap {
mode = 0666
}
}
ssl_cert = </etc/ssl/certs/dovecot.crt
ssl_key = </etc/ssl/keys/dovecot.key
userdb {
driver = passwd
}
Greetings Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
attached a backtrace from gdb for the crash. Hope this is helpful.
Thanks Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
On Mon, Mar 29, 2010 at 02:14:28PM +0200, Juergen Daubert wrote:
Hi,
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards
FYI, got the same crash with a build from nightly 20100422. If you need further informations, please let me know.
Thanks Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
On Sat Apr 24 12:27:40 EEST 2010, Juergen Daubert wrote:
On Mon, Mar 29, 2010 at 02:14:28PM +0200, Juergen Daubert wrote:
Hi,
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards
FYI, got the same crash with a build from nightly 20100422. If you need further informations, please let me know.
I have started seeing apparently the same crash. I have a new android phone with K-9 imap client and I see this error in the log every time the phone polls the server.
I upgraded to 2.0.beta5 yesterday and the crash is still happening.
The phone logs an error "readQuotedString(): end of stream reached", but otherwise seems OK. I suspect this is a bug in the K-9, but it would be nice if dovecot didn't crash.
I have no problems with other imap clients.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Monday, May 10, Mark Sapiro wrote:
On Sat Apr 24 12:27:40 EEST 2010, Juergen Daubert wrote:
On Mon, Mar 29, 2010 at 02:14:28PM +0200, Juergen Daubert wrote:
Hi,
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards
FYI, got the same crash with a build from nightly 20100422. If you need further informations, please let me know.
I have started seeing apparently the same crash. I have a new android phone with K-9 imap client and I see this error in the log every time the phone polls the server.
I upgraded to 2.0.beta5 yesterday and the crash is still happening.
The phone logs an error "readQuotedString(): end of stream reached", but otherwise seems OK. I suspect this is a bug in the K-9, but it would be nice if dovecot didn't crash.
I am aware of <http://hg.dovecot.org/dovecot-2.0/rev/6e32dbc4cd8f> which is presumably the reason for the Panic.
What I don't understand is whether this is strictly the client's problem, or if there is some issue in Dovecot as well. If there is a Dovecot issue, I can try to collect and report more information about these Panics if that would be helpful.
On the other hand, if the comment:
file istream: If trying to seek backwards in unseekable stream, panic. The previous way of just setting an error flag was getting ignored too easily and causing silent corruption in such situations.
means getting ignored by buggy clients, and this is just Dovecot trying to cope with buggy clients as best as it can, then I can accept that, but it would be helpful to me to understand that that is the case.
I would appreciate knowing just what the situation is with these Panics.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 31.5.2010, at 22.41, Mark Sapiro wrote:
What I don't understand is whether this is strictly the client's problem, or if there is some issue in Dovecot as well. If there is a Dovecot issue, I can try to collect and report more information about these Panics if that would be helpful.
All Dovecot crashes are bugs. The problem with this panic is that I just can't reproduce it, so I don't really have much ideas what exactly causes it.. You mentioned just connecting with K9 can cause it, but that's not what Juergen's backtrace showed. Maybe the step you could do is to get gdb backtrace? http://dovecot.org/bugreport.html And hopefully manage to reproduce it somehow easily? Also rawlog from such crashing session could be helpful too (see my previous mail).
On 5/31/2010 2:47 PM, Timo Sirainen wrote:
On 31.5.2010, at 22.41, Mark Sapiro wrote:
What I don't understand is whether this is strictly the client's problem, or if there is some issue in Dovecot as well. If there is a Dovecot issue, I can try to collect and report more information about these Panics if that would be helpful.
All Dovecot crashes are bugs. The problem with this panic is that I just can't reproduce it, so I don't really have much ideas what exactly causes it.. You mentioned just connecting with K9 can cause it, but that's not what Juergen's backtrace showed. Maybe the step you could do is to get gdb backtrace? http://dovecot.org/bugreport.html And hopefully manage to reproduce it somehow easily? Also rawlog from such crashing session could be helpful too (see my previous mail).
Thanks Timo,
I saw your exchange with Juergen after I posted. I am working now on setting up rawlog, and I will try to get a gdb backtrace too.
I am having problems setting up rawlog. I need some help.
I tried
protocol imap { mail_executable = /usr/local/libexec/dovecot/rawlog /usr/local/libexec/dovecot/imap ...
and got a warning and I don't know if it was accepted or not, but it was not logging.
I then tried
service imap { executable = /usr/local/libexec/dovecot/rawlog /usr/local/libexec/dovecot/imap ...
Which is accepted, but it still doesn't log.
I then tried changing
passdb { driver = passwd-file args = /usr/local/etc/dovecot.passwd }
first to
passdb { driver = passwd-file args = home=/home/%u /usr/local/etc/dovecot.passwd }
and then to
passdb { driver = passwd-file args = home=/home/%u /usr/local/etc/dovecot.passwd home = /home/%u }
But neither of those work, but setting mail_debug = yes shows that the home directory is as expected:
May 31 15:34:21 sbh16 dovecot: imap(mark): Debug: Effective uid=501, gid=501, home=/home/mark
yet nothing gets written in /home/mark/dovecot.rawlog
drwxrwxr-x 2 mark mark 4096 May 31 14:46 /home/mark/dovecot.rawlog/
(mark is uid 501).
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 31.5.2010, at 23.45, Mark Sapiro wrote:
I am having problems setting up rawlog. I need some help.
Oh, right, I forgot. With v2.0 it's different. http://dovecot.org/list/dovecot/2009-December/045139.html (just remove the /tmp/test.sh from the example)
On 5/31/2010 3:54 PM, Timo Sirainen wrote:
On 31.5.2010, at 23.45, Mark Sapiro wrote:
I am having problems setting up rawlog. I need some help.
Oh, right, I forgot. With v2.0 it's different. http://dovecot.org/list/dovecot/2009-December/045139.html (just remove the /tmp/test.sh from the example)
That worked. The attached logs.txt contains maillog entries and the rawlog entries for two crashes (both the same), and dovecot -n. Unfortunately, I didn't get a core dump. By the time I figured out how to enable dumps, I had syncd the Sent folder on this account, which has avoided the problem for the moment.
The problem appeared to be because the phone had an old Sent message which was no longer if ever in the server's Sent folder and the phone client was trying to append that message.
Anyway, the crashes will return and then I will get the gdb backtrace.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On ma, 2010-03-29 at 14:14 +0200, Juergen Daubert wrote:
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards
Finally I've some time to look at this. Can you still reliably reproduce this every time? I think it happens only when some specific fields are cached. If the mailbox itself doesn't contain anything sensitive, could you send it to me along with its index files? Alternatively I'd like to see the cache fields output of "doveadm dump ~/mail/.imap/mailboxname", e.g.:
-- Cache fields -- # Name Type Size Dec Last used 0: flags bit 4 tmp 2010-05-31 19:53 1: date.sent fix 8 no 1970-01-01 01:00 ..
On Mon, May 31, 2010 at 07:55:48PM +0100, Timo Sirainen wrote:
On ma, 2010-03-29 at 14:14 +0200, Juergen Daubert wrote:
got the following with beta4 while uploading messages from a local mbox to the dovecot server in my LAN, tested with mutt and sylpheed, the same action works with 1.2.11:
Mar 29 13:42:46 [dovecot] imap(juergen): Panic: stream doesn't support seeking backwards
Finally I've some time to look at this. Can you still reliably reproduce this every time?
Yes, even if I upload the messages into a new mbox. Done some tests right now, one thing I've noticed is that the crash only happens if I try to copy more than one message at once. Looks like that the first message got uploaded and after that the imap process dies.
I'll send you the mbox + index files in a private mail.
Thanks Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
On ma, 2010-05-31 at 21:53 +0200, Juergen Daubert wrote:
Finally I've some time to look at this. Can you still reliably reproduce this every time?
Yes, even if I upload the messages into a new mbox. Done some tests right now, one thing I've noticed is that the crash only happens if I try to copy more than one message at once. Looks like that the first message got uploaded and after that the imap process dies.
Oh, should have read this mail first before replying privately :) What client do you do this with? Could you get a rawlog of the session that creates the mailbox, appends new mails and crashes? http://wiki.dovecot.org/Debugging/Rawlog
On Mon, May 31, 2010 at 09:17:35PM +0100, Timo Sirainen wrote:
On ma, 2010-05-31 at 21:53 +0200, Juergen Daubert wrote:
Finally I've some time to look at this. Can you still reliably reproduce this every time?
Yes, even if I upload the messages into a new mbox. Done some tests right now, one thing I've noticed is that the crash only happens if I try to copy more than one message at once. Looks like that the first message got uploaded and after that the imap process dies.
Oh, should have read this mail first before replying privately :) What client do you do this with? Could you get a rawlog of the session that creates the mailbox, appends new mails and crashes? http://wiki.dovecot.org/Debugging/Rawlog
Can reproduce the crash with mutt and sylpheed, I don't think that it is a client issue because it works well with 1.2.x
I'll try to summarize:
- the crash happens when I try to upload several message from my local mbox to my server running dovecot 2.0beta with mbox
- copying messages between mboxes on the server side works
- seems to be unrelated to clients, same behaviour with mutt and sylpheed
- looks like a timing problem to me, sometimes the crash happens after one message transfered, sometimes after two or three
Rawlog follows with private mail.
Thanks Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
Well, I can't reproduce this in a normal way. But by changing the code I managed to cause it. Does this fix it also for you? http://hg.dovecot.org/dovecot-2.0/rev/941608f8b3fb
Timo Sirainen wrote:
Well, I can't reproduce this in a normal way. But by changing the code I managed to cause it. Does this fix it also for you? http://hg.dovecot.org/dovecot-2.0/rev/941608f8b3fb
I've installed the patch. I'll let you know how it goes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
Timo Sirainen wrote:
Well, I can't reproduce this in a normal way. But by changing the code I managed to cause it. Does this fix it also for you? http://hg.dovecot.org/dovecot-2.0/rev/941608f8b3fb
I've installed the patch. I'll let you know how it goes.
I think this patched fixed it for me as well. I've seen no more occurrences despite doing many things with the K-9 client that caused the crash before.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, Jun 01, 2010 at 04:03:10PM +0100, Timo Sirainen wrote:
Well, I can't reproduce this in a normal way. But by changing the code I managed to cause it. Does this fix it also for you? http://hg.dovecot.org/dovecot-2.0/rev/941608f8b3fb
Yeah, that was it! Thanks, Timo.
Greetings Juergen
--
Juergen Daubert | mailto:jue@jue.li
Korb, Germany | http://jue.li/crux
participants (3)
-
Juergen Daubert
-
Mark Sapiro
-
Timo Sirainen