[Dbmail-dev] dbmail 2.1.7 minor memory leak in db.c and other questions

2006-07-26 Thread Leif Jackson
Paul  Aaron,


 It seems that there is a minor memory leak in the 2.1.7 release. Sorry.
see minor patch below.

diff -urNab dbmail-2.1.7.orig/db.c dbmail-2.1.7/db.c
--- dbmail-2.1.7.orig/db.c  2006-07-24 11:35:41.0 -0400
+++ dbmail-2.1.7/db.c   2006-07-26 02:04:47.596208079 -0400
@@ -2885,6 +2885,9 @@
*mailboxes = g_list_reverse(*mailboxes);
*errmsg = Everything is peachy keen;

+   g_strfreev(chunks);
+   dm_free(cpy);
+
return DM_SUCCESS;

 equery:


I am also wondering about the dm_strnesc in misc.c (line 452) any guesses
if the valgrind error:

==10854== Invalid read of size 1
==10854==at 0x40392E9: dm_strnesc (misc.c:452)
==10854==by 0x4029FF4: _header_cache (dbmail-message.c:942)
==10854==by 0xC9FEE8: (within /usr/lib/libglib-2.0.so.0.902.0)
==10854==by 0xC9FECB: (within /usr/lib/libglib-2.0.so.0.902.0)
==10854==by 0xC9FF22: (within /usr/lib/libglib-2.0.so.0.902.0)
==10854==by 0xC9FF22: (within /usr/lib/libglib-2.0.so.0.902.0)
==10854==by 0x4029D44: dbmail_message_headers_cache
(dbmail-message.c:857)
==10854==by 0x4029A22: dbmail_message_store (dbmail-message.c:778)
==10854==by 0x404075C: insert_messages (pipe.c:581)
==10854==by 0x80496C1: main (main.c:325)
...

is dangerous, I was thinking that since this is dbmail-smtp I was checking
that it might have somthing to do with from address parsing? To recreate
this you should be able to do a valgrind (recomend new version 3.2.0 btw)
on dbmail-smtp and feed it the test-scripts/testbox: e.g.

valgrind --suppressions=contrib/dbmail.supp --tool=memcheck
--leak-check=full --show-reachable=yes .libs/lt-dbmail-smtp -u testuser1 
test-scripts/testbox


Also Paul, I seems to be having an error with the current testimap.py
script with the past few releases and svn versions:

..E
==
ERROR: testLsub (__main__.testImapServer)
--
Traceback (most recent call last):
  File ./test-scripts/testimap.py, line 343, in testLsub
self.assertEquals('(\\hasnochildren) / %s' % mailboxes[6],
self.o.lsub()[1][7])
IndexError: list index out of range

--
Ran 31 tests in 155.825s

FAILED (errors=1)


any ideas?
Thanks,
Leif




Re: [Dbmail-dev] dbmail 2.1.7 minor memory leak in db.c and other questions

2006-07-26 Thread UEMURA (fka. MAENAKA) Tetsuya
Posted on Wed, 26 Jul 2006 02:55:20 -0400 (EDT)
by author Leif Jackson [EMAIL PROTECTED]
  It seems that there is a minor memory leak in the 2.1.7 release. Sorry.
 see minor patch below.

Leif, your patch isn't a minor. It fixes a major leak which keeps me
annoying for a few months now. Without the patch, I can make imapd
consuming hundreds MB within a minute. Now I can't do.

Thanks a lot.

-- 
UEMURA (fka. MAENAKA) Tetsuya [EMAIL PROTECTED]



Re: [Dbmail-dev] dbmail 2.1.7 minor memory leak in db.c and other questions

2006-07-26 Thread Leif Jackson
On Wed, July 26, 2006 3:38 am, UEMURA (fka. MAENAKA) Tetsuya wrote:
 Posted on Wed, 26 Jul 2006 02:55:20 -0400 (EDT)
 by author Leif Jackson [EMAIL PROTECTED]
 It seems that there is a minor memory leak in the 2.1.7 release. Sorry.
  see minor patch below.

 Leif, your patch isn't a minor. It fixes a major leak which keeps me
 annoying for a few months now. Without the patch, I can make imapd
 consuming hundreds MB within a minute. Now I can't do.

 Thanks a lot.

Glad to hear that, did you file a bug report on this? I would recomend
next time you see somthing like this let the guys know, that usualy can
find it quickly with the steps to replicate. But your welcome glad I count
help out.

Thanks,
Leif




 --
 UEMURA (fka. MAENAKA) Tetsuya [EMAIL PROTECTED]


 ___
 Dbmail-dev mailing list
 Dbmail-dev@dbmail.org
 http://twister.fastxs.net/mailman/listinfo/dbmail-dev






Re: [Dbmail-dev] dbmail 2.1.7 minor memory leak in db.c and other questions

2006-07-26 Thread Aaron Stone
On Wed, 2006-07-26 at 16:38 +0900, UEMURA (fka. MAENAKA) Tetsuya wrote:
 Posted on Wed, 26 Jul 2006 02:55:20 -0400 (EDT)
 by author Leif Jackson [EMAIL PROTECTED]
   It seems that there is a minor memory leak in the 2.1.7 release. Sorry.
  see minor patch below.
 
 Leif, your patch isn't a minor. It fixes a major leak which keeps me
 annoying for a few months now. Without the patch, I can make imapd
 consuming hundreds MB within a minute. Now I can't do.
 
 Thanks a lot.

Applied to SVN, Thanks!. Did I copy the bug from the old mailbox
splitting code in imapcommand.c over to the new function? 

Aaron