On Wednesday 05 June 2013 14:42:21 Paul J Stevens wrote: > On 06/05/2013 12:28 PM, Alan Hicks wrote: > > On Tuesday 04 June 2013 19:16:21 Paul J Stevens wrote: > >> On 06/04/2013 07:07 PM, Paul J Stevens wrote: > >>> I suspect there is a problem with g_strdup_vprintf or my usage of it. > >> > >> looks like the latter. > >> > >> va_start and va_copy *both* need their own va_end it seems. > >> > >> I misread the man-page. > > > > Alas doesn't appear to be the issue here, g_strdup_vprintf still segfaults > > with va_end. Will continue checking. > > Alan, > > Sometimes gdb is wrong. It may help to see what valgrind has to say.
Some progress, getting rid of the %lu issues by replacing almost all of them with %llu gets everything running, though dbmail-deliver corrupts the message, for info copied below. The imap daemon appears to be ok, the sieve daemon appears ok for a short while then starts to eat cpu maxing near 100%. Warning messages from the compilation are listed further down. Alas other projects are calling for my time so should be able to investigate further in a week or so. Alan 1 Valgrind output 2 Warnings 3 Corrupted email 1 Valgrind found lots of issues with uninitialised variables and the following three issues that I've not been able to track down. ==74422== Invalid read of size 4 ==74422== at 0x20146: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x12F2C: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x15307: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x15CC2: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x169F9: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x236409: g_module_open (in /usr/local/lib/libgmodule-2.0.so.0) ==74422== by 0x8D9DE: sort_load_driver (sortmodule.c:59) ==74422== by 0x8DCBC: sort_process (sortmodule.c:97) ==74422== by 0x53516: sort_and_deliver (dbmail-message.c:2038) ==74422== by 0x5585E: insert_messages (dbmail-message.c:2680) ==74422== by 0x8049FA4: main (main.c:328) ==74422== Address 0xcbade0 is 16 bytes inside a block of size 17 alloc'd ==74422== at 0x34F68: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==74422== by 0x2DBF82: g_malloc (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2F3E58: g_strdup (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x236728: g_module_open (in /usr/local/lib/libgmodule-2.0.so.0) ==74422== by 0x8D9DE: sort_load_driver (sortmodule.c:59) ==74422== by 0x8DCBC: sort_process (sortmodule.c:97) ==74422== by 0x53516: sort_and_deliver (dbmail-message.c:2038) ==74422== by 0x5585E: insert_messages (dbmail-message.c:2680) ==74422== by 0x8049FA4: main (main.c:328) ==74422== Invalid read of size 4 ==74422== at 0x20146: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x13036: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x152AD: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x15CC2: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x169F9: ??? (in /libexec/ld-elf.so.1) ==74422== by 0x236409: g_module_open (in /usr/local/lib/libgmodule-2.0.so.0) ==74422== by 0x8D9DE: sort_load_driver (sortmodule.c:59) ==74422== by 0x8DCBC: sort_process (sortmodule.c:97) ==74422== by 0x53516: sort_and_deliver (dbmail-message.c:2038) ==74422== by 0x5585E: insert_messages (dbmail-message.c:2680) ==74422== by 0x8049FA4: main (main.c:328) ==74422== Address 0xcbade0 is 16 bytes inside a block of size 17 alloc'd ==74422== at 0x34F68: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==74422== by 0x2DBF82: g_malloc (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2F3E58: g_strdup (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x236728: g_module_open (in /usr/local/lib/libgmodule-2.0.so.0) ==74422== by 0x8D9DE: sort_load_driver (sortmodule.c:59) ==74422== by 0x8DCBC: sort_process (sortmodule.c:97) ==74422== by 0x53516: sort_and_deliver (dbmail-message.c:2038) ==74422== by 0x5585E: insert_messages (dbmail-message.c:2680) ==74422== by 0x8049FA4: main (main.c:328) ==74422== Invalid free() / delete / delete[] / realloc() ==74422== at 0x3497C: free (in /usr/local/lib/valgrind/vgpreload_memcheck- x86-freebsd.so) ==74422== by 0x2EF87D: ??? (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2EFB13: ??? (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2EFC04: ??? (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2F133F: g_slice_free_chain_with_offset (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x2D29AC: g_list_free (in /usr/local/lib/libglib-2.0.so.0) ==74422== by 0x5E0EE: MailboxState_remap (dm_mailboxstate.c:249) ==74422== by 0x5E13E: MailboxState_setMsginfo (dm_mailboxstate.c:261) ==74422== by 0x5DC3F: state_load_messages (dm_mailboxstate.c:172) ==74422== by 0x5DDFF: MailboxState_new (dm_mailboxstate.c:207) ==74422== by 0x537ED: sort_deliver_to_mailbox (dbmail-message.c:2106) ==74422== by 0xE318E7: sort_fileinto (sortsieve.c:407) ==74422== Address 0x106a800 is not stack'd, malloc'd or (recently) free'd 2 Remaining compilation warning messages checking maximum warning verbosity option... for C++ -W -Wall -Wpointer-arith -Wstrict-prototypes for C authldap.c:108: warning: 'g_static_private_init' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:243) authldap.c:118: warning: 'g_static_private_get' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:246) authldap.c:121: warning: 'g_static_private_get' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:246) authldap.c:172: warning: 'g_thread_init' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:260) authldap.c:212: warning: 'g_static_private_set' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:251) authldap.c:594: warning: 'g_static_private_free' is deprecated (declared at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:254) authldap.c:1296: warning: passing argument 2 of '__auth_get_every_match' from incompatible pointer type dbmail-message.c:799: warning: format '%ld' expects type 'long int', but argument 7 has type 'time_t' dbmail-message.c:2649: warning: the address of 'val' will always evaluate as 'true' dbmail-message.c:2651: warning: the address of 'val' will always evaluate as 'true' dm_misc.c:639: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t' dm_misc.c:639: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t' dm_misc.c:2242: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2244: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2246: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2248: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2250: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2252: warning: the address of 'hash_algorithm' will always evaluate as 'true' dm_misc.c:2339: warning: format '%ld' expects type 'long int', but argument 6 has type 'size_t' dm_string.c:154: warning: comparison of unsigned expression >= 0 is always true .../src/mpool/mpool.c:59: warning: 'version' defined but not used server.c:539: warning: unused parameter 'event' server.c:254: warning: '_cb_log_event' defined but not used clientbase.c:286: warning: format '%ld' expects type 'long int', but argument 6 has type 'size_t' clientbase.c:292: warning: format '%ld' expects type 'long int', but argument 6 has type 'size_t' clientbase.c:301: warning: format '%ld' expects type 'long int', but argument 7 has type 'ssize_t' clientbase.c:301: warning: format '%ld' expects type 'long int', but argument 8 has type 'size_t' clientbase.c:352: warning: format '%ld' expects type 'long int', but argument 7 has type 'time_t' clientbase.c:366: warning: format '%ld' expects type 'long int', but argument 7 has type 'ssize_t' clientbase.c:428: warning: format '%ld' expects type 'long int', but argument 6 has type 'size_t' clientbase.c:436: warning: format '%ld' expects type 'long int', but argument 7 has type 'size_t' dm_request.c:121: warning: format '%ld' expects type 'long int', but argument 6 has type 'gsize' authmodule.c:163: warning: passing argument 2 of 'auth->validate' discards qualifiers from pointer target type authmodule.c:163: warning: passing argument 3 of 'auth->validate' discards qualifiers from pointer target type imap4.c:164: warning: unused parameter 'fd' imap4.c:164: warning: unused parameter 'what' imap4.c:205: warning: format '%ld' expects type 'long int', but argument 8 has type 'size_t' imap4.c:205: warning: format '%ld' expects type 'long int', but argument 9 has type 'size_t' imap4.c:221: warning: unused parameter 'fd' dbmail-imapsession.c:1799: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'size_t' dbmail-imapsession.c:1799: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'size_t' /usr/home/alan/projects/dbmail/work/dbmail-3.0.2/src/sievecmd.c:350: warning: warning: tempnam() possibly used unsafely; consider using mkstemp() timsieve.c:234: warning: format '%ld' expects type 'long int', but argument 7 has type 'size_t' timsieve.c:407: warning: format '%ld' expects type 'long int', but argument 6 has type 'size_t' 3 Corrupted message when saved in the database. Received: from schnittke.p-o.co.uk ([192.168.202.5]) by p-o.co.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from <ahi...@p-o.co.uk>) id 1UkFlw-0008pu-1v for a...@p-o.co.uk; Wed, 05 Jun 2013 16:37:15 +0100 From: Alan Hicks <ahi...@p-o.co.uk> To: Alan Hicks <a...@p-o.co.uk> Subject: another html test email Date: Wed, 05 Jun 2013 16:37:05 +0100 Message-ID: <1476318.uj4kxoa...@schnittke.p-o.co.uk> User-Agent: KMail/4.10.3 (FreeBSD/9.1-RELEASE-p3; KDE/4.10.3; i386; ; ) MIME-Version: 1.0 X-Spam-Score: -1.5 (-) Return-Path: Alan Hicks <ahi...@p-o.co.uk> Content-Type: multipart/alternative; boundary=nextPart1814526.M5M7HV3kkm Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart1814526.M5M7HV3kkm ransfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" ano*The* ano*The* test -- Persistent Objects Ltd 128 Lilleshall Road Morden Surrey SM4 6DR t: 079 3030 5004 e: ahi...@p-o.co.uk s: alan-hicks-london w: p-o.co.uk --nextPa --nextPart1814526.M5M7HV3kkm ransfer-Encoding: 7Bit Content-Type: text/html; charset="utf-8" <!DOCTYP <!DOCTYP HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font- weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">ano<span style=" font-weight:600;">The</span>r test</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Persistent Objects Ltd</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">128 Lilleshall Road</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Morden</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Surrey</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">SM4 6DR</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin- left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">t: 079 3030 5004</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">e: ahi...@p-o.co.uk</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">s: alan- hicks-london</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin- right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">w: p- o.co.uk</p></body></html> --nextPa --nextPart1814526.M5M7HV3kkm-- _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev