Re: [Dovecot] imap-login: memory corruption

2009-01-22 Thread Ralf Hildebrandt
* Ralf Hildebrandt : > * Ralf Hildebrandt : > > > Did that and recompiled, deactivated valgrind, let's see what happens. > > Right now I don't see any more libc related crashes. Still no crashes. Your fix seems to be working -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...@c

Re: [Dovecot] imap-login: memory corruption

2009-01-19 Thread Ralf Hildebrandt
* Ralf Hildebrandt : > Did that and recompiled, deactivated valgrind, let's see what happens. Right now I don't see any more libc related crashes. -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 5

Re: [Dovecot] imap-login: memory corruption

2009-01-16 Thread Ralf Hildebrandt
* Timo Sirainen : > I did find that pool_system_clean_realloc() didn't handle shrinking the > memory area, fixed: http://hg.dovecot.org/dovecot-1.1/rev/17c73b14ed9d I checked that out > - default_pool = system_clean_pool; > - data_stack_set_clean_after_pop(TRUE); > + /*default

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Timo Sirainen
On Jan 15, 2009, at 7:28 PM, Ralf Hildebrandt wrote: Well.. ==10780== Invalid write of size 1 ==10780==at 0x402499E: memcpy (mc_replace_strmem.c:402) ==10780==by 0x805B000: pool_system_clean_realloc (mempool-system- clean.c:149) ==10780==by 0x804FC09: ssl_clean_realloc (ssl-proxy-

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Ralf Hildebrandt
* Ralf Hildebrandt : > > Are you also looking at what errors are in the valgrind log? It might > > prevent the crashes. Does grep find any of: > > > > Invalid free() / delete / delete[] > > Invalid read of size > > Invalid write of size > > bytes inside a block of size > > r...@postamt:/tmp# egr

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Ralf Hildebrandt
* Timo Sirainen : > On Wed, 2009-01-14 at 17:04 +0100, Ralf Hildebrandt wrote: > > Jan 14 16:59:05 postamt dovecot: Dovecot v1.1.8 starting up > > Jan 14 16:59:07 postamt dovecot: Fatal: imap-login: epoll_create(): Too > > many open files > > Wonder if these patches fix this: > > http://hg.dovec

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Timo Sirainen
On Wed, 2009-01-14 at 17:04 +0100, Ralf Hildebrandt wrote: > Jan 14 16:59:05 postamt dovecot: Dovecot v1.1.8 starting up > Jan 14 16:59:07 postamt dovecot: Fatal: imap-login: epoll_create(): Too many > open files Wonder if these patches fix this: http://hg.dovecot.org/dovecot-1.1/rev/66687cb6951

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Ralf Hildebrandt
* Timo Sirainen : > On Thu, 2009-01-15 at 16:42 +0100, Ralf Hildebrandt wrote: > > * Timo Sirainen : > > > > > valgrind --log-file=/tmp/imap.%p could be helpful there then. But does > > > it keep logging something? With me it logs one error when the process > > > starts: > > > > A watched kettle

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Timo Sirainen
On Thu, 2009-01-15 at 16:42 +0100, Ralf Hildebrandt wrote: > * Timo Sirainen : > > > valgrind --log-file=/tmp/imap.%p could be helpful there then. But does > > it keep logging something? With me it logs one error when the process > > starts: > > A watched kettle never boils. No incidents so far.

Re: [Dovecot] imap-login: memory corruption

2009-01-15 Thread Ralf Hildebrandt
* Timo Sirainen : > valgrind --log-file=/tmp/imap.%p could be helpful there then. But does > it keep logging something? With me it logs one error when the process > starts: A watched kettle never boils. No incidents so far. -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...@cha

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 15:31 -0500, Timo Sirainen wrote: > Oh, right, libcrypto stuff isn't very valgrind-friendly. I think it's > possible to disable these with: > >--suppressions= [default: $PREFIX/lib/valgrind/default.supp] > Specifies an extra file from which to read desc

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 21:26 +0100, Ralf Hildebrandt wrote: > I get: .. > ==9769== Conditional jump or move depends on uninitialised value(s) > ==9769==at 0x40F09F7: BN_mod_inverse (in > /usr/lib/i686/cmov/libcrypto.so.0.9.8) > ==9769==by 0x40F48E0: BN_MONT_CTX_set (in > /usr/lib/i686/cmov

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > Implemented: http://hg.dovecot.org/dovecot-1.1/rev/2146e1963b79 I rebuild dovecot just now with that -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkre

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > valgrind --log-file=/tmp/imap.%p could be helpful there then. Yes, done that now. Better > But does it keep logging something? With me it logs one error when the > process > starts: > > ==6036== Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to > uninitialised byte(s

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 11:01 -0500, Timo Sirainen wrote: > I was also thinking about adding some code that would attach IP address > to the "killed with signal n" error (with > login_process_per_connection=no it would be the last IP that started > logging in). Implemented: http://hg.dovecot.org/dov

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 21:06 +0100, Ralf Hildebrandt wrote: > * Timo Sirainen : > > > Ah, this is easy. Set login_process_size=0 > Ah, ok. Now it's very talkativ and clutters my log... valgrind --log-file=/tmp/imap.%p could be helpful there then. But does it keep logging something? With me it logs

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > Ah, this is easy. Set login_process_size=0 Ah, ok. Now it's very talkativ and clutters my log... -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 20:51 +0100, Ralf Hildebrandt wrote: > * Timo Sirainen : > > > login_executable = /usr/bin/valgrind /usr/local/libexec/dovecot/imap-login > > > > It logs to Dovecot's error log (or use valgrind --log-file=/tmp/imap.%p). > > I remember last time: > > Jan 14 20:44:05 postam

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > login_executable = /usr/bin/valgrind /usr/local/libexec/dovecot/imap-login > > It logs to Dovecot's error log (or use valgrind --log-file=/tmp/imap.%p). I remember last time: Jan 14 20:44:05 postamt dovecot: imap-login: Valgrind's memory management: out of memory: Jan

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 18:25 +0100, Ralf Hildebrandt wrote: > * Timo Sirainen : > > > For non-SSL connections I think it would be usable (my machine handles > > 600 logins/sec fine with valgrind), but I suppose with many SSL > > connections it's too slow. > > How would I run imap-login from valgri

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > For non-SSL connections I think it would be usable (my machine handles > 600 logins/sec fine with valgrind), but I suppose with many SSL > connections it's too slow. How would I run imap-login from valgrind? -- Ralf Hildebrandt (ralf.hildebra...@charite.de) snick...

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > How soon after upgrading to 1.1.8 did this happen? it always happened, even befor 1.1.8 :) > There was one login process change done for 1.1.8, but it was supposed > to fix a crash. And I don't really see how it could cause memory > corruption. I guess you haven't seen these

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 16:46 +0100, Ralf Hildebrandt wrote: > * Timo Sirainen : > > > > Jan 14 08:42:52 postamt dovecot: imap-login: *** glibc detected *** > > > imap-login: malloc(): memory corruption: 0x0844e778 *** > > > Jan 14 08:42:52 postamt dovecot: child 15380 (login) killed with signal 6

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
* Timo Sirainen : > > Jan 14 08:42:52 postamt dovecot: imap-login: *** glibc detected *** > > imap-login: malloc(): memory corruption: 0x0844e778 *** > > Jan 14 08:42:52 postamt dovecot: child 15380 (login) killed with signal 6 > > The annoying thing is that these are pretty much impossible to f

Re: [Dovecot] imap-login: memory corruption

2009-01-14 Thread Timo Sirainen
On Wed, 2009-01-14 at 14:50 +0100, Ralf Hildebrandt wrote: > >From my logs (dovecot-1.1.8) > > Jan 14 08:42:52 postamt dovecot: imap-login: *** glibc detected *** > imap-login: malloc(): memory corruption: 0x0844e778 *** > Jan 14 08:42:52 postamt dovecot: child 15380 (login) killed with signal 6

[Dovecot] imap-login: memory corruption

2009-01-14 Thread Ralf Hildebrandt
>From my logs (dovecot-1.1.8) Jan 14 08:42:52 postamt dovecot: imap-login: *** glibc detected *** imap-login: malloc(): memory corruption: 0x0844e778 *** Jan 14 08:42:52 postamt dovecot: child 15380 (login) killed with signal 6 Jan 14 10:06:42 postamt dovecot: Panic: imap-login: file ioloop.c: l