Thanks for these very useful bug reports! I'll have another round of updates coming this weekend, including refactored send_reply, send_notification, send_vacation.
Aaron On Thu, 2006-02-16 at 03:45 +0300, Oleg Lapshin wrote: > > > But GLib-CRITICAL messages stil exist. > > > > > > May be this help: > > > part of running "strace dbmail-lmtpd -n" > > > > I does point in the right direction. A valgrind or gdb trace would be even > > better. > > > > What are you doing here exactly? Are you sending empty messages into lmtpd? > > There's already a bug in the tracker regarding empty messages over lmtp. > > I'd like some way to reproduce this. > > I get this messages with all messages, received by dbmail-lmtpd > > Output from valgrind (real data masked by x.x.x.x): > > $ valgrind --leak-check=full -v \ > --show-reachable=yes /usr/local/sbin/dbmail-lmtpd -n > > ==4209== Memcheck, a memory error detector. > ==4209== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. > ==4209== Using LibVEX rev 1367, a library for dynamic binary translation. > ==4209== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. > ==4209== Using valgrind-3.0.1, a dynamic binary instrumentation framework. > ==4209== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. > --4209-- Valgrind library directory: /usr/lib/valgrind > --4209-- Command line > --4209-- /usr/local/sbin/dbmail-lmtpd > --4209-- -n > --4209-- Startup, with flags: > --4209-- --leak-check=full > --4209-- -v > --4209-- --show-reachable=yes > --4209-- Contents of /proc/version: > --4209-- Linux version 2.6.15 ([EMAIL PROTECTED]) (gcc version 3.4.5) #7 > PREEMPT Fri > Jan 20 12:42:50 MSK 2006 > --4209-- Reading syms from /usr/local/sbin/dbmail-lmtpd (0x8048000) > --4209-- Reading syms from /lib/ld-2.3.6.so (0x1B8E4000) > --4209-- Reading syms from /usr/lib/valgrind/stage2 (0xB0000000) > --4209-- Reading suppressions file: /usr/lib/valgrind/default.supp > ==4209== > --4209-- Reading syms from /usr/lib/valgrind/vg_preload_core.so (0x1B8FC000) > --4209-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck.so > (0x1B8FE000) > --4209-- REDIR: 0x1B8F5CC0 (index) redirected to 0x1B901220 (index) > --4209-- REDIR: 0x1B8F5E80 (strlen) redirected to 0x1B901490 (strlen) > --4209-- Reading syms from /usr/local/lib/libdbmail.so.0.0.0 (0x1B91C000) > --4209-- Reading syms from /usr/local/lib/dbmail/libmysql.so.0.0.0 > (0x1B94D000) > --4209-- Reading syms from /usr/lib/mysql/libmysqlclient.so.14.0.0 > (0x1B952000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /lib/tls/libm-2.3.6.so (0x1BA6E000) > --4209-- Reading syms from /usr/local/lib/dbmail/libsort_sieve.so.0.0.0 > (0x1BA91000) > --4209-- Reading syms from /usr/local/lib/libsieve.so.1.0.5 (0x1BA97000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /usr/local/lib/dbmail/libauth_sql.so.0.0.0 > (0x1BACF000) > --4209-- Reading syms from /usr/local/lib/libgmime-2.0.so.2.1.15 (0x1BAD7000) > --4209-- Reading syms from /usr/lib/libgmodule-2.0.so.0.800.4 (0x1BB24000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /lib/tls/libdl-2.3.6.so (0x1BB28000) > --4209-- Reading syms from /usr/lib/libgthread-2.0.so.0.800.4 (0x1BB2C000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /lib/tls/libpthread-2.3.6.so (0x1BB30000) > --4209-- DWARF2 CFI reader: unhandled CFI instruction 0:50 > --4209-- DWARF2 CFI reader: unhandled CFI instruction 0:50 > --4209-- Reading syms from /usr/lib/libz.so.1.2.3 (0x1BB43000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /lib/tls/libnsl-2.3.6.so (0x1BB55000) > --4209-- Reading syms from /usr/lib/libgobject-2.0.so.0.800.4 (0x1BB6B000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /usr/lib/libglib-2.0.so.0.800.4 (0x1BB9F000) > --4209-- object doesn't have a symbol table > --4209-- Reading syms from /lib/tls/libcrypt-2.3.6.so (0x1BC21000) > --4209-- Reading syms from /lib/tls/libc-2.3.6.so (0x1BC4F000) > --4209-- DWARF2 CFI reader: unhandled CFI instruction 0:50 > --4209-- DWARF2 CFI reader: unhandled CFI instruction 0:50 > --4209-- REDIR: 0x1BCBA040 (memset) redirected to 0x1B901BE0 (memset) > --4209-- REDIR: 0x1BCBA560 (memcpy) redirected to 0x1B9017D0 (memcpy) > --4209-- REDIR: 0x1BCB9470 (rindex) redirected to 0x1B9010E0 (rindex) > --4209-- REDIR: 0x1BCB9090 (strlen) redirected to 0x1B901470 (strlen) > --4209-- REDIR: 0x1BCB41B0 (malloc) redirected to 0x1B8FF85C (malloc) > --4209-- REDIR: 0x1BCB47E0 (realloc) redirected to 0x1B900BBA (realloc) > --4209-- REDIR: 0x1BCB8B20 (strcmp) redirected to 0x1B901720 (strcmp) > --4209-- REDIR: 0x1BCB3E90 (calloc) redirected to 0x1B900B0F (calloc) > --4209-- REDIR: 0x1BCB9FB0 (memmove) redirected to 0x1B901C10 (memmove) > --4209-- REDIR: 0x1BCB89B0 (index) redirected to 0x1B9011F0 (index) > --4209-- REDIR: 0x1BCB8800 (strcat) redirected to 0x1B901280 (strcat) > --4209-- REDIR: 0x1BCB2090 (free) redirected to 0x1B900353 (free) > --4209-- REDIR: 0x1BCB93B0 (strncpy) redirected to 0x1B901590 (strncpy) > --4209-- REDIR: 0x1BCB9290 (strncmp) redirected to 0x1B9016C0 (strncmp) > --4209-- REDIR: 0x1BCBA240 (stpcpy) redirected to 0x1B9019A0 (stpcpy) > --4209-- REDIR: 0x1BCB8BB0 (strcpy) redirected to 0x1B9014D0 (strcpy) > --4209-- REDIR: 0x1BCB9DF0 (memchr) redirected to 0x1B9017A0 (memchr) > --4209-- REDIR: 0x1BCBAEB0 (strchrnul) redirected to 0x1B901C80 (strchrnul) > --4209-- Reading syms from /lib/tls/libnss_files-2.3.6.so (0x1B903000) > --4209-- REDIR: 0x1BCBADE0 (rawmemchr) redirected to 0x1B901CA0 (rawmemchr) > 220 fox DBMail LMTP service ready to rock > mail from: <[EMAIL PROTECTED]> > 250 Sender <[EMAIL PROTECTED]> OK > rcpt to: <[EMAIL PROTECTED]> > 250 Recipient <[EMAIL PROTECTED]> OK > data > 354 Start mail input; end with <CRLF>.<CRLF> > Return-path: [EMAIL PROTECTED] > Envelope-to: [EMAIL PROTECTED] > Delivery-date: Thu, 16 Feb 2006 01:03:49 +0300 > Received: from mail by xxxxxxxx.xxxxxxx > with virus-scanned (Exim 4.60) (envelope-from <[EMAIL PROTECTED]>) > id 1F9UkV-0001eZ-P7 for [EMAIL PROTECTED]; Thu, 16 Feb 2006 > 01:03:47 > +0300 > Received: from [x.x.x.x] (helo=xxxxxxx) by xxxxxx.xxxxxxxx > with esmtp (Exim 4.60) (envelope-from <[EMAIL PROTECTED]>) id > 1F9UkV-0001eM-EF > for [EMAIL PROTECTED]; Thu, 16 Feb 2006 01:03:47 +0300 > From: Oleg Lapshin <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: xxxxxxxxxxx > Date: Thu, 16 Feb 2006 01:03:46 +0300 > User-Agent: KMail/1.9.1 > Message-Id: <[EMAIL PROTECTED]> > Received-SPF: pass (xxxxxxxx.xxxxxxxxxx: domain of [EMAIL PROTECTED] > designates x.x.x.x as permitted sender) > X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on > xxxxxxx.xxxxxxxxxx > X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 > autolearn=ham version=3.0.4 > X-Spam-Level: > MIME-Version: 1.0 > Content-Type: text/plain; > charset=koi8-r > Content-Transfer-Encoding: 8bit > Content-Disposition: inline > X-Length: 1277 > X-UID: 49085 > > test > -- > .. > --4209-- REDIR: 0x1BCB9140 (strnlen) redirected to 0x1B901430 (strnlen) > > (process:4209): GLib-CRITICAL **: g_string_truncate: assertion `string != > NULL' failed > > (process:4209): GLib-CRITICAL **: g_string_append_len: assertion `string != > NULL' failed > 215 Recipient <[EMAIL PROTECTED]> OK > quit > 221 fox BYE > --4209-- discard syms at 0x1B903000-0x1B90E000 > in /lib/tls/libnss_files-2.3.6.so due to munmap() > ==4209== > ==4209== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 52 from 3) > --4209-- > --4209-- supp: 3 index-not-intercepted-early-enough-HACK-2 > --4209-- supp: 47 dl_relocate_object > --4209-- supp: 2 strlen/*dl_map_object*(Cond) > ==4209== malloc/free: in use at exit: 97487 bytes in 473 blocks. > ==4209== malloc/free: 6603 allocs, 6130 frees, 7214553 bytes allocated. > ==4209== > ==4209== searching for pointers to 473 not-freed blocks. > ==4209== checked 1537048 bytes. > ==4209== > ==4209== 8 bytes in 1 blocks are definitely lost in loss record 1 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1BA92985: sort_getheader (sortsieve.c:289) > ==4209== > ==4209== > ==4209== 12 bytes in 1 blocks are indirectly lost in loss record 2 of 13 > ==4209== at 0x1B900B95: calloc (vg_replace_malloc.c:279) > ==4209== by 0x1BBCA64E: g_malloc0 (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1B92C667: dm_list_nodeadd (list.c:78) > ==4209== by 0x1BA929C4: sort_getheader (sortsieve.c:294) > ==4209== > ==4209== > ==4209== 24 (12 direct, 12 indirect) bytes in 1 blocks are definitely lost in > loss record 3 of 13 > ==4209== at 0x1B900B95: calloc (vg_replace_malloc.c:279) > ==4209== by 0x1BBCA64E: g_malloc0 (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1B92C667: dm_list_nodeadd (list.c:78) > ==4209== by 0x1BA929D8: sort_getheader (sortsieve.c:295) > ==4209== > ==4209== > ==4209== 30 bytes in 2 blocks are definitely lost in loss record 4 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1B9367F0: find_bounded (misc.c:453) > ==4209== by 0x8049D9E: lmtp (lmtp.c:411) > ==4209== by 0x804A2A3: lmtp_handle_connection (lmtp.c:190) > ==4209== by 0x1B939D36: manage_start_cli_server (serverchild.c:410) > ==4209== by 0x1B938C86: StartCliServer (server.c:99) > ==4209== by 0x804AD85: main (lmtpd.c:126) > ==4209== > ==4209== > ==4209== 800 bytes in 20 blocks are possibly lost in loss record 5 of 13 > ==4209== at 0x1B900B95: calloc (vg_replace_malloc.c:279) > ==4209== by 0x1BBCA64E: g_malloc0 (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB86B86: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB86EE5: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E471: g_type_init_with_debug_flags > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E591: g_type_init (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BAE2764: g_mime_init (gmime.c:52) > ==4209== by 0x804AB5E: main (lmtpd.c:75) > ==4209== > ==4209== > ==4209== 2048 bytes in 1 blocks are possibly lost in loss record 6 of 13 > ==4209== at 0x1B900C75: realloc (vg_replace_malloc.c:306) > ==4209== by 0x1BBCA6D0: g_realloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBABB0C: (within /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBAB710: g_array_set_size > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBAC42A: g_byte_array_set_size > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB01F09: stream_write (gmime-stream-mem.c:150) > ==4209== by 0x1BAFDF3B: g_mime_stream_write (gmime-stream.c:197) > ==4209== by 0x1BAFE616: g_mime_stream_write_string (gmime-stream.c:499) > ==4209== by 0x1BAEE666: write_default (gmime-header.c:315) > ==4209== by 0x1BAEE729: g_mime_header_write_to_stream (gmime-header.c:351) > ==4209== by 0x1BAF0A73: message_write_to_stream (gmime-message.c:807) > ==4209== by 0x1BAF70AC: g_mime_object_write_to_stream (gmime-object.c:660) > ==4209== > ==4209== > ==4209== 2548 bytes in 64 blocks are still reachable in loss record 7 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1B900BFE: realloc (vg_replace_malloc.c:306) > ==4209== by 0x1BBCA6D0: g_realloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBB18CA: (within /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBB16F7: g_quark_from_static_string > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB8E401: g_type_init_with_debug_flags > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E591: g_type_init (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BAE2764: g_mime_init (gmime.c:52) > ==4209== by 0x804AB5E: main (lmtpd.c:75) > ==4209== > ==4209== > ==4209== 4316 bytes in 11 blocks are still reachable in loss record 8 of 13 > ==4209== at 0x1B900C75: realloc (vg_replace_malloc.c:306) > ==4209== by 0x1BBCA6D0: g_realloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB720E7: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB71EB7: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB716DA: g_boxed_type_register_static > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB712B6: g_value_array_get_type > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB7D88E: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E548: g_type_init_with_debug_flags > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E591: g_type_init (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BAE2764: g_mime_init (gmime.c:52) > ==4209== by 0x804AB5E: main (lmtpd.c:75) > ==4209== > ==4209== > ==4209== 6144 bytes in 3 blocks are definitely lost in loss record 9 of 13 > ==4209== at 0x1B900C75: realloc (vg_replace_malloc.c:306) > ==4209== by 0x1BBCA6D0: g_realloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBABB0C: (within /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBAB710: g_array_set_size > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBAC42A: g_byte_array_set_size > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB01F09: stream_write (gmime-stream-mem.c:150) > ==4209== by 0x1BAFDF3B: g_mime_stream_write (gmime-stream.c:197) > ==4209== by 0x1BAFE616: g_mime_stream_write_string (gmime-stream.c:499) > ==4209== by 0x1BAEE666: write_default (gmime-header.c:315) > ==4209== by 0x1BAEE729: g_mime_header_write_to_stream (gmime-header.c:351) > ==4209== by 0x1BAF0A73: message_write_to_stream (gmime-message.c:807) > ==4209== by 0x1BAF70AC: g_mime_object_write_to_stream (gmime-object.c:660) > ==4209== > ==4209== > ==4209== 6780 bytes in 175 blocks are still reachable in loss record 10 of 13 > ==4209== at 0x1B900B95: calloc (vg_replace_malloc.c:279) > ==4209== by 0x1BBCA64E: g_malloc0 (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB88071: (within /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E4F3: g_type_init_with_debug_flags > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E591: g_type_init (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BAE2764: g_mime_init (gmime.c:52) > ==4209== by 0x804AB5E: main (lmtpd.c:75) > ==4209== > ==4209== > ==4209== 12288 bytes in 6 blocks are definitely lost in loss record 11 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1B900BFE: realloc (vg_replace_malloc.c:306) > ==4209== by 0x1BBCA6D0: g_realloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBDD6D8: (within /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBDD7B1: g_string_sized_new > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBDD88D: g_string_new (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1B926789: g_mime_object_get_body (dbmail-message.c:73) > ==4209== by 0x1B9270FF: dbmail_message_body_to_string > (dbmail-message.c:444) > ==4209== by 0x1B927141: dbmail_message_hdrs_to_string > (dbmail-message.c:451) > ==4209== by 0x1B93B510: insert_messages (pipe.c:460) > ==4209== by 0x8049EB7: lmtp (lmtp.c:619) > ==4209== by 0x804A2A3: lmtp_handle_connection (lmtp.c:190) > ==4209== > ==4209== > ==4209== 21621 bytes in 178 blocks are still reachable in loss record 12 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1BBCA5C6: g_malloc (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBB6B9E: g_hash_table_new_full > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBB6B73: g_hash_table_new > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BBB1719: g_quark_from_static_string > (in /usr/lib/libglib-2.0.so.0.800.4) > ==4209== by 0x1BB8E401: g_type_init_with_debug_flags > (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BB8E591: g_type_init (in /usr/lib/libgobject-2.0.so.0.800.4) > ==4209== by 0x1BAE2764: g_mime_init (gmime.c:52) > ==4209== by 0x804AB5E: main (lmtpd.c:75) > ==4209== > ==4209== > ==4209== 40880 bytes in 10 blocks are still reachable in loss record 13 of 13 > ==4209== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149) > ==4209== by 0x1B96BE0A: my_once_alloc > (in /usr/lib/mysql/libmysqlclient.so.14.0.0) > ==4209== by 0x1B96D598: (within /usr/lib/mysql/libmysqlclient.so.14.0.0) > ==4209== by 0x1B96D407: get_charset_by_csname > (in /usr/lib/mysql/libmysqlclient.so.14.0.0) > ==4209== by 0x1B988110: mysql_real_connect > (in /usr/lib/mysql/libmysqlclient.so.14.0.0) > ==4209== by 0x1B94DF2E: db_connect (dbmysql.c:97) > ==4209== > ==4209== LEAK SUMMARY: > ==4209== definitely lost: 18482 bytes in 13 blocks. > ==4209== indirectly lost: 12 bytes in 1 blocks. > ==4209== possibly lost: 2848 bytes in 21 blocks. > ==4209== still reachable: 76145 bytes in 438 blocks. > ==4209== suppressed: 0 bytes in 0 blocks. > --4209-- memcheck: sanity checks: 184 cheap, 8 expensive > --4209-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use > --4209-- memcheck: auxmaps: 0 searches, 0 comparisons > --4209-- memcheck: secondaries: 96 issued (6144k, 6M) > --4209-- memcheck: secondaries: 43 accessible and distinguished (2752k, 2M) > --4209-- tt/tc: 36098 tt lookups requiring 44199 probes > --4209-- tt/tc: 36098 fast-cache updates, 5 flushes > --4209-- translate: new 13610 (282841 -> 4584104; ratio 162:10) [0 scs] > --4209-- translate: dumped 0 (0 -> ??) > --4209-- translate: discarded 125 (2116 -> ??) > --4209-- scheduler: 9242240 jumps (bb entries). > --4209-- scheduler: 184/36014 major/minor sched events. > --4209-- sanity: 185 cheap, 8 expensive checks. > --4209-- exectx: 4999 lists, 3955 contexts (avg 0 per list) > --4209-- exectx: 12706 searches, 10633 full compares (836 per 1000) > --4209-- exectx: 1398 cmp2, 146 cmp4, 0 cmpAll > > _______________________________________________ > Dbmail-dev mailing list > [email protected] > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
